From b5b6e93a03ab0dbfa0fd66085e4b1c04119be2ac Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Tue, 12 Jan 2016 17:32:16 +0000 Subject: [PATCH] Fix #2701. Rotated trains no longer disobey physics when crashing. --- src/ride/vehicle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ride/vehicle.c b/src/ride/vehicle.c index 35cc18668e..9ac840591a 100644 --- a/src/ride/vehicle.c +++ b/src/ride/vehicle.c @@ -2553,8 +2553,8 @@ static void vehicle_update_crash_setup(rct_vehicle* vehicle) { lastVehicle = trainVehicle; trainVehicle->sub_state = 0; - int x = RCT2_ADDRESS(0x009A3AC4, sint16)[trainVehicle->sprite_direction * 2]; - int y = RCT2_ADDRESS(0x009A3AC6, sint16)[trainVehicle->sprite_direction * 2]; + int x = RCT2_ADDRESS(0x009A3AC4, sint16)[trainVehicle->sprite_direction & 0xFE]; + int y = RCT2_ADDRESS(0x009A3AC6, sint16)[trainVehicle->sprite_direction & 0xFE]; int ecx = RCT2_ADDRESS(0x009A37E4, uint32)[trainVehicle->var_1F] >> 15; x *= ecx;