1
0
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:
Matt
2021-02-10 20:47:11 +02:00
parent 2bb5bb9988
commit 965041b437
9 changed files with 123 additions and 158 deletions

View File

@@ -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();
}
}