- replaced the last remaining s() calls in Blood's interface and deleted the method.

This commit is contained in:
Christoph Oelckers 2021-12-25 18:37:58 +01:00
parent 4dad58e557
commit 6dcc8761fe
3 changed files with 8 additions and 18 deletions

View file

@ -44,16 +44,6 @@ public:
return (unsigned)spr.statnum < MAXSTATUS;
}
const spritetype& s() const
{
return spr;
}
spritetype& s()
{
return spr;
}
int GetIndex() const
{
// This is only identical with the sprite index for items spawned at map start.

View file

@ -109,37 +109,37 @@ public:
void SetSpecialOwner() // nnext hackery
{
ownerActor = nullptr;
s().owner = kMagicOwner;
spr.owner = kMagicOwner;
}
bool GetSpecialOwner()
{
return ownerActor == nullptr && (s().owner == kMagicOwner);
return ownerActor == nullptr && (spr.owner == kMagicOwner);
}
bool IsPlayerActor()
{
return s().type >= kDudePlayer1 && s().type <= kDudePlayer8;
return spr.type >= kDudePlayer1 && spr.type <= kDudePlayer8;
}
bool IsDudeActor()
{
return s().type >= kDudeBase && s().type < kDudeMax;
return spr.type >= kDudeBase && spr.type < kDudeMax;
}
bool IsItemActor()
{
return s().type >= kItemBase && s().type < kItemMax;
return spr.type >= kItemBase && spr.type < kItemMax;
}
bool IsWeaponActor()
{
return s().type >= kItemWeaponBase && s().type < kItemWeaponMax;
return spr.type >= kItemWeaponBase && spr.type < kItemWeaponMax;
}
bool IsAmmoActor()
{
return s().type >= kItemAmmoBase && s().type < kItemAmmoMax;
return spr.type >= kItemAmmoBase && spr.type < kItemAmmoMax;
}
bool isActive()

View file

@ -484,7 +484,7 @@ void DBloodActor::Serialize(FSerializer& arc)
// GenDudeExtra only contains valid info for kDudeModernCustom and kDudeModernCustomBurning so only save when needed as these are not small.
if (s().type == kDudeModernCustom || s().type == kDudeModernCustomBurning)
if (spr.type == kDudeModernCustom || spr.type == kDudeModernCustomBurning)
{
arc("gendudeextra", genDudeExtra);
}