From 1f4b4b2c3f8d60f5ed5b52d749b3788dc6a9d4f2 Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Thu, 31 Dec 2015 10:27:33 +0000 Subject: [PATCH] Fix flying boats when entering the station. Issue was caused by not clearing the word var_34 but instead only the byte var_34. This caused track_progress (word var_34) to become a very large negative number that would be interpreted as a valid track_progress. This would eventually end up reading invalid memory. --- src/ride/vehicle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ride/vehicle.c b/src/ride/vehicle.c index 6a95a2a079..79a6e2a0c8 100644 --- a/src/ride/vehicle.c +++ b/src/ride/vehicle.c @@ -3190,7 +3190,7 @@ static void loc_6DA9F9(rct_vehicle *vehicle, int x, int y, int bx, int dx) (mapElement->properties.track.type << 2) | (ride->boat_hire_return_direction & 3); - vehicle->var_34 = 0; + vehicle->track_progress = 0; vehicle->status = VEHICLE_STATUS_TRAVELLING; unk_F64E20->x = x; unk_F64E20->y = y;