From 599d806113940550e2cef600c7259ee33ba183de Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Sat, 16 Jan 2016 10:11:56 +0000 Subject: [PATCH] Fix #2740. Swinging animations should now work correctly --- src/ride/vehicle.c | 2 +- src/ride/vehicle.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ride/vehicle.c b/src/ride/vehicle.c index 19eb0e4a13..c2674de06b 100644 --- a/src/ride/vehicle.c +++ b/src/ride/vehicle.c @@ -5567,7 +5567,7 @@ static int vehicle_get_swing_amount(rct_vehicle *vehicle) static void vehicle_update_swinging_car(rct_vehicle *vehicle) { sint32 dword_F64E08 = RCT2_GLOBAL(0x00F64E08, sint32); - vehicle->var_4E = (-vehicle->swinging_car_var_0) >> 6; + vehicle->var_4E += (-vehicle->swinging_car_var_0) >> 6; int swingAmount = vehicle_get_swing_amount(vehicle); if (swingAmount < 0) { vehicle->var_4E -= dword_F64E08 >> (-swingAmount); diff --git a/src/ride/vehicle.h b/src/ride/vehicle.h index 840a064696..5d76f38b8e 100644 --- a/src/ride/vehicle.h +++ b/src/ride/vehicle.h @@ -148,7 +148,7 @@ typedef struct { sint8 ferris_wheel_var_1; // 0x4D }; }; - uint16 var_4E; + sint16 var_4E; uint8 status; // 0x50 uint8 sub_state; // 0x51 uint16 peep[32]; // 0x52