- Moved weapon slot initialization into APlayerPawn::PostBeginPlay() so that
they can be initialized when players respawn in multiplayer. SVN r1476 (trunk)
This commit is contained in:
parent
c65dc5bad4
commit
69c2c4de64
6 changed files with 109 additions and 40 deletions
|
|
@ -491,7 +491,26 @@ void APlayerPawn::Tick()
|
|||
Super::Tick();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// APlayerPawn :: PostBeginPlay
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void APlayerPawn::PostBeginPlay()
|
||||
{
|
||||
// If we're not a voodoo doll, set up our weapons.
|
||||
if (player != NULL && player->mo == this)
|
||||
{
|
||||
player->weapons.StandardSetup(GetClass());
|
||||
if (player - players == consoleplayer)
|
||||
{ // If we're the local player, then there's a bit more work to do.
|
||||
FWeaponSlots local_slots(player->weapons);
|
||||
local_slots.LocalSetup(GetClass());
|
||||
local_slots.SendDifferences(player->weapons);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue