1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Fix #7418: Staff walk off paths with a connection but no adjacent path

This commit is contained in:
oli414
2018-05-02 18:12:13 +02:00
committed by Aaron van Geffen
parent 8c9b56d0f2
commit 8c5b56dda1
2 changed files with 12 additions and 0 deletions

View File

@@ -25,6 +25,7 @@
- Fix: [#7382] Opening the mini-map reverts the size of the land tool to 1x1, regardless of what was selected before.
- Fix: [#7402] Edges of neigbouring footpaths stay connected after removing a path that's underneath a ride entrance.
- Fix: [#7405] Rides can be covered by placing scenery underneath them.
- Fix: [#7418] Staff walk off paths with a connection but no adjacent path.
- Fix: [#7436] Only the first 32 vehicles of a train can be painted.
- Fix: [#7480] Graphs skip values of 0.
- Improved: [#2989] Multiplayer window now changes title when tab changes.

View File

@@ -3272,6 +3272,17 @@ void rct_peep::PerformNextAction(uint8 & pathing_result, rct_tile_element * & ti
return;
}
if (type == PEEP_TYPE_STAFF && !GetNextIsSurface())
{
// Prevent staff from leaving the path on their own unless they're allowed to mow.
if (!((this->staff_orders & STAFF_ORDERS_MOWING) && this->staff_mowing_timeout >= 12))
{
peep_return_to_centre_of_tile(this);
return;
}
}
// The peep is on a surface and not on a path
next_x = actionX & 0xFFE0;
next_y = actionY & 0xFFE0;
next_z = tileElement->base_height;