mirror of https://github.com/OpenRCT2/OpenRCT2.git
Remove IsMoneyEffect
This commit is contained in:
parent
f5772fae48
commit
881afc7579
|
@ -23,16 +23,10 @@ template<> bool SpriteBase::Is<MoneyEffect>() const
|
|||
return sprite_identifier == SPRITE_IDENTIFIER_MISC && type == SPRITE_MISC_MONEY_EFFECT;
|
||||
}
|
||||
|
||||
bool rct_sprite::IsMoneyEffect()
|
||||
{
|
||||
return this->money_effect.sprite_identifier == SPRITE_IDENTIFIER_MISC
|
||||
&& this->money_effect.type == SPRITE_MISC_MONEY_EFFECT;
|
||||
}
|
||||
|
||||
MoneyEffect* rct_sprite::AsMoneyEffect()
|
||||
{
|
||||
MoneyEffect* result = nullptr;
|
||||
if (IsMoneyEffect())
|
||||
if (generic.Is<MoneyEffect>())
|
||||
{
|
||||
result = reinterpret_cast<MoneyEffect*>(this);
|
||||
}
|
||||
|
|
|
@ -895,7 +895,7 @@ uint16_t remove_floating_sprites()
|
|||
removed++;
|
||||
}
|
||||
}
|
||||
else if (rctSprite->IsMoneyEffect())
|
||||
else if (rctSprite->generic.Is<MoneyEffect>())
|
||||
{
|
||||
sprite_remove(rctSprite->AsMoneyEffect());
|
||||
sprite_misc_update(rctSprite);
|
||||
|
|
|
@ -137,7 +137,6 @@ union rct_sprite
|
|||
CrashSplashParticle crash_splash;
|
||||
SteamParticle steam_particle;
|
||||
|
||||
bool IsMoneyEffect();
|
||||
bool IsPeep() const;
|
||||
Balloon* AsBalloon();
|
||||
Duck* AsDuck();
|
||||
|
|
Loading…
Reference in New Issue