1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 16:24:35 +01:00

Reset Entity to 0 on removal (#13835)

This is to force any use after remove bugs to the surface
This commit is contained in:
Duncan
2021-01-16 15:48:39 +00:00
committed by GitHub
parent fb4d14e843
commit 4ff5b9a89f
2 changed files with 3 additions and 5 deletions

View File

@@ -797,10 +797,8 @@ void sprite_remove(SpriteBase* sprite)
EntityTweener::Get().RemoveEntity(sprite);
move_sprite_to_list(sprite, EntityListId::Free);
sprite->sprite_identifier = SpriteIdentifier::Null;
_spriteFlashingList[sprite->sprite_index] = false;
SpriteSpatialRemove(sprite);
sprite_reset(sprite);
}
static bool litter_can_be_at(const CoordsXYZ& mapPos)