mirror of https://github.com/OpenRCT2/OpenRCT2.git
Make PeepPickupAction *actually* take a CoordsXYZ
This commit is contained in:
parent
5dc4b3e136
commit
7759b54c2f
|
@ -1283,7 +1283,7 @@ void window_guest_overview_tool_down(rct_window* w, rct_widgetindex widgetIndex,
|
|||
return;
|
||||
|
||||
PeepPickupAction pickupAction{
|
||||
PeepPickupType::Place, w->number, { destCoords, tileElement->base_height }, network_get_current_player_id()
|
||||
PeepPickupType::Place, w->number, { destCoords, tileElement->GetBaseZ() }, network_get_current_player_id()
|
||||
};
|
||||
pickupAction.SetCallback([](const GameAction* ga, const GameActionResult* result) {
|
||||
if (result->Error != GA_ERROR::OK)
|
||||
|
|
|
@ -1198,7 +1198,7 @@ void window_staff_overview_tool_down(rct_window* w, rct_widgetindex widgetIndex,
|
|||
return;
|
||||
|
||||
PeepPickupAction pickupAction{
|
||||
PeepPickupType::Place, w->number, { destCoords, tileElement->base_height }, network_get_current_player_id()
|
||||
PeepPickupType::Place, w->number, { destCoords, tileElement->GetBaseZ() }, network_get_current_player_id()
|
||||
};
|
||||
pickupAction.SetCallback([](const GameAction* ga, const GameActionResult* result) {
|
||||
if (result->Error != GA_ERROR::OK)
|
||||
|
|
|
@ -104,7 +104,7 @@ public:
|
|||
return MakeResult(GA_ERROR::UNKNOWN, STR_ERR_CANT_PLACE_PERSON_HERE);
|
||||
}
|
||||
|
||||
if (!peep->Place({ _loc.x / 32, _loc.y / 32, _loc.z }, false))
|
||||
if (!peep->Place(TileCoordsXYZ(_loc), false))
|
||||
{
|
||||
return MakeResult(GA_ERROR::UNKNOWN, STR_ERR_CANT_PLACE_PERSON_HERE, gGameCommandErrorText);
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ public:
|
|||
break;
|
||||
case PeepPickupType::Place:
|
||||
res->Position = _loc;
|
||||
if (!peep->Place({ _loc.x / 32, _loc.y / 32, _loc.z }, true))
|
||||
if (!peep->Place(TileCoordsXYZ(_loc), true))
|
||||
{
|
||||
return MakeResult(GA_ERROR::UNKNOWN, STR_ERR_CANT_PLACE_PERSON_HERE, gGameCommandErrorText);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue