mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-26 08:14:38 +01:00
Use more specific types where appropriate (#14388)
It takes marginally more time to get a Peep than a Guest/Staff so may as well go straight to the correct type
This commit is contained in:
@@ -39,7 +39,7 @@ void GuestSetFlagsAction::Serialise(DataSerialiser& stream)
|
||||
|
||||
GameActions::Result::Ptr GuestSetFlagsAction::Query() const
|
||||
{
|
||||
Peep* peep = TryGetEntity<Peep>(_peepId);
|
||||
auto* peep = TryGetEntity<Guest>(_peepId);
|
||||
if (peep == nullptr)
|
||||
{
|
||||
log_error("Used invalid sprite index for peep: %u", static_cast<uint32_t>(_peepId));
|
||||
@@ -50,7 +50,7 @@ GameActions::Result::Ptr GuestSetFlagsAction::Query() const
|
||||
|
||||
GameActions::Result::Ptr GuestSetFlagsAction::Execute() const
|
||||
{
|
||||
Peep* peep = TryGetEntity<Peep>(_peepId);
|
||||
auto* peep = TryGetEntity<Guest>(_peepId);
|
||||
if (peep == nullptr)
|
||||
{
|
||||
log_error("Used invalid sprite index for peep: %u", static_cast<uint32_t>(_peepId));
|
||||
|
||||
Reference in New Issue
Block a user