mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 06:44:38 +01:00
Clean up many other coordinates
This commit is contained in:
@@ -1571,11 +1571,7 @@ static int32_t guest_path_find_entering_park(Peep* peep, uint8_t edges)
|
||||
if (chosenEntrance == 0xFF)
|
||||
return guest_path_find_aimless(peep, edges);
|
||||
|
||||
int16_t x = gParkEntrances[chosenEntrance].x;
|
||||
int16_t y = gParkEntrances[chosenEntrance].y;
|
||||
int16_t z = gParkEntrances[chosenEntrance].z;
|
||||
|
||||
gPeepPathFindGoalPosition = { x / 32, y / 32, z >> 3 };
|
||||
gPeepPathFindGoalPosition = TileCoordsXYZ(gParkEntrances[chosenEntrance]);
|
||||
gPeepPathFindIgnoreForeignQueues = true;
|
||||
gPeepPathFindQueueRideIndex = RIDE_ID_NULL;
|
||||
|
||||
@@ -1624,15 +1620,11 @@ static int32_t guest_path_find_leaving_park(Peep* peep, uint8_t edges)
|
||||
if (chosenSpawn == 0xFF)
|
||||
return guest_path_find_aimless(peep, edges);
|
||||
|
||||
PeepSpawn* peepSpawn = &gPeepSpawns[chosenSpawn];
|
||||
const auto peepSpawnLoc = gPeepSpawns[chosenSpawn].ToTileStart();
|
||||
Direction direction = peepSpawnLoc.direction;
|
||||
|
||||
int16_t x = peepSpawn->x & 0xFFE0;
|
||||
int16_t y = peepSpawn->y & 0xFFE0;
|
||||
uint8_t z = peepSpawn->z / 8;
|
||||
Direction direction = peepSpawn->direction;
|
||||
|
||||
gPeepPathFindGoalPosition = { x / 32, y / 32, z };
|
||||
if (x == peep->NextLoc.x && y == peep->NextLoc.y)
|
||||
gPeepPathFindGoalPosition = TileCoordsXYZ(peepSpawnLoc);
|
||||
if (peepSpawnLoc.x == peep->NextLoc.x && peepSpawnLoc.y == peep->NextLoc.y)
|
||||
{
|
||||
return peep_move_one_tile(direction, peep);
|
||||
}
|
||||
@@ -1683,11 +1675,8 @@ static int32_t guest_path_find_park_entrance(Peep* peep, uint8_t edges)
|
||||
}
|
||||
|
||||
const auto& entrance = gParkEntrances[peep->current_ride];
|
||||
int16_t x = entrance.x;
|
||||
int16_t y = entrance.y;
|
||||
int16_t z = entrance.z;
|
||||
|
||||
gPeepPathFindGoalPosition = { x / 32, y / 32, z >> 3 };
|
||||
gPeepPathFindGoalPosition = TileCoordsXYZ(entrance);
|
||||
gPeepPathFindIgnoreForeignQueues = true;
|
||||
gPeepPathFindQueueRideIndex = RIDE_ID_NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user