mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-28 17:24:47 +01:00
Remove direct access to DirectionX and DirectionY
This commit is contained in:
@@ -743,7 +743,7 @@ namespace OpenRCT2::Scripting
|
||||
auto peep = GetPeep();
|
||||
if (peep != nullptr)
|
||||
{
|
||||
return ToDuk(ctx, CoordsXY(peep->DestinationX, peep->DestinationY));
|
||||
return ToDuk(ctx, peep->GetDestination());
|
||||
}
|
||||
return ToDuk(ctx, nullptr);
|
||||
}
|
||||
@@ -755,8 +755,7 @@ namespace OpenRCT2::Scripting
|
||||
if (peep != nullptr)
|
||||
{
|
||||
auto pos = FromDuk<CoordsXY>(value);
|
||||
peep->DestinationX = pos.x;
|
||||
peep->DestinationY = pos.y;
|
||||
peep->SetDestination(pos);
|
||||
peep->Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user