- 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:
Randy Heit 2009-03-12 03:54:23 +00:00
commit 69c2c4de64
6 changed files with 109 additions and 40 deletions

View file

@ -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);
}
}
}
//===========================================================================
//