1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 01:04:50 +01:00

Remove AsPeep

This commit is contained in:
duncanspumpkin
2020-06-06 10:55:01 +01:00
parent 7ba795e96c
commit 5c48e5f0bb
10 changed files with 10 additions and 21 deletions

View File

@@ -745,7 +745,7 @@ void sprite_set_coordinates(int16_t x, int16_t y, int16_t z, SpriteBase* sprite)
*/
void sprite_remove(SpriteBase* sprite)
{
auto peep = (reinterpret_cast<rct_sprite*>(sprite))->AsPeep();
auto peep = sprite->As<Peep>();
if (peep != nullptr)
{
peep->SetName({});