- did some more lightening on the PlayerPawn class. 4 more properties and one native member function have been handled.

This commit is contained in:
Christoph Oelckers 2019-01-03 10:06:45 +01:00
commit 9e5c5b68c5
11 changed files with 61 additions and 61 deletions

View file

@ -819,18 +819,6 @@ void APlayerPawn::Serialize(FSerializer &arc)
("fullheight", FullHeight, def->FullHeight);
}
//===========================================================================
//
// APlayerPawn :: MarkPlayerSounds
//
//===========================================================================
DEFINE_ACTION_FUNCTION(APlayerPawn, MarkPlayerSounds)
{
PARAM_SELF_PROLOGUE(APlayerPawn);
S_MarkPlayerSounds(self->GetSoundClass());
return 0;
}
//===========================================================================
//
// APlayerPawn :: BeginPlay
@ -954,30 +942,10 @@ void APlayerPawn::GiveDeathmatchInventory()
}
}
//===========================================================================
//
// APlayerPawn :: GetSoundClass
//
//===========================================================================
const char *APlayerPawn::GetSoundClass() const
{
if (player != NULL &&
(player->mo == NULL || !(player->mo->flags4 &MF4_NOSKIN)) &&
(unsigned int)player->userinfo.GetSkin() >= PlayerClasses.Size () &&
(unsigned)player->userinfo.GetSkin() < Skins.Size())
{
return Skins[player->userinfo.GetSkin()].Name.GetChars();
}
return SoundClass != NAME_None? SoundClass.GetChars() : "player";
}
//===========================================================================
//
// APlayerPawn :: hasBuddha
//
//===========================================================================
int APlayerPawn::hasBuddha()
@ -2088,7 +2056,6 @@ DEFINE_FIELD(APlayerPawn, ViewBob)
DEFINE_FIELD(APlayerPawn, curBob)
DEFINE_FIELD(APlayerPawn, FullHeight)
DEFINE_FIELD(APlayerPawn, SoundClass)
DEFINE_FIELD(APlayerPawn, Face)
DEFINE_FIELD(APlayerPawn, Portrait)
DEFINE_FIELD(APlayerPawn, Slot)
DEFINE_FIELD(APlayerPawn, HexenArmor)