mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 05:23:04 +01:00
Implement GetSprite and use it in a number of places
This will eventually replace all of the get_sprite and try_get_sprite calls Further use of GetSprite Use GetSprite in all remaining easy to use functions Correct formatting Rename GetSprite to GetEntity Make suggested changes Remove const to allow for building Fix crashes due to next sprite
This commit is contained in:
@@ -1573,11 +1573,11 @@ static int32_t cc_mp_desync(InteractiveConsole& console, const arguments_t& argv
|
||||
|
||||
for (int i = 0; i < MAX_SPRITES; i++)
|
||||
{
|
||||
rct_sprite* sprite = get_sprite(i);
|
||||
if (sprite->generic.sprite_identifier == SPRITE_IDENTIFIER_NULL)
|
||||
auto* sprite = GetEntity(i);
|
||||
if (sprite->sprite_identifier == SPRITE_IDENTIFIER_NULL)
|
||||
continue;
|
||||
|
||||
auto peep = sprite->generic.As<Peep>();
|
||||
auto peep = sprite->As<Peep>();
|
||||
if (peep != nullptr)
|
||||
peeps.push_back(peep);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user