1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

Update ride_find_closest_mechanic() to search using the station exit location, fixes #5284

This commit is contained in:
zaxcav
2017-03-27 20:00:50 +02:00
committed by Michael Steenbeek
parent 2ce4b51528
commit 071c8135ba
2 changed files with 4 additions and 5 deletions

View File

@@ -55,7 +55,7 @@ extern "C" {
// This define 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 "10"
#define NETWORK_STREAM_VERSION "11"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
#ifdef __cplusplus

View File

@@ -2590,7 +2590,7 @@ static void ride_call_closest_mechanic(sint32 rideIndex)
rct_peep *ride_find_closest_mechanic(rct_ride *ride, sint32 forInspection)
{
sint32 x, y, z, stationIndex, direction;
sint32 x, y, z, stationIndex;
uint16 xy;
rct_map_element *mapElement;
@@ -2613,9 +2613,8 @@ rct_peep *ride_find_closest_mechanic(rct_ride *ride, sint32 forInspection)
x *= 32;
y *= 32;
direction = mapElement->type & 3;
x -= TileDirectionDelta[direction].x;
y -= TileDirectionDelta[direction].y;
// Set x,y to centre of the station exit for the mechanic search.
x += 16;
y += 16;