Merge pull request #7483 from oli414/new-new-offroad-staff

Fix #7418: Staff walk off paths with a connection but no adjacent path
This commit is contained in:
Hielke Morsink 2018-05-19 19:55:24 +02:00 committed by GitHub
commit 72b66c6c9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 1 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.
- Fix: [#7528] In park entrance pricing tab, switching tabs happens on mouse-down instead of mouse-up

View File

@ -34,7 +34,7 @@
// This string specifies which version of network stream current build uses.
// It is used for making sure only compatible builds get connected, even within
// single OpenRCT2 version.
#define NETWORK_STREAM_VERSION "12"
#define NETWORK_STREAM_VERSION "13"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
static rct_peep* _pickup_peep = nullptr;

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;