- made the BUddha checks readable again.

This commit is contained in:
Christoph Oelckers 2018-12-03 09:48:05 +01:00
commit 39d90d022b
3 changed files with 27 additions and 6 deletions

View file

@ -1008,6 +1008,25 @@ const char *APlayerPawn::GetSoundClass() const
return SoundClass != NAME_None? SoundClass.GetChars() : "player";
}
//===========================================================================
//
// APlayerPawn :: hasBuddha
//
//===========================================================================
int APlayerPawn::hasBuddha()
{
if (player->playerstate == PST_DEAD) return 0;
if (player->cheats & CF_BUDDHA2) return 2;
if ((player->cheats & CF_BUDDHA) ||
(player->mo->flags7 & MF7_BUDDHA) ||
player->mo->FindInventory (PClass::FindActor(NAME_PowerBuddha),true) != nullptr) return 1;
return 0;
}
//===========================================================================
//
// APlayerPawn :: GetMaxHealth