From 4a6db953f75266ff6cdb82b618817e556c2da122 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Thu, 5 Nov 2020 17:43:51 +0100 Subject: [PATCH] Convert a register to a variable --- src/openrct2/ride/Vehicle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index 992e653ebd..88d3c92733 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -8322,10 +8322,10 @@ loc_6DB967: } auto head = otherVeh->TrainHead(); - regs.eax = abs(velocity - head->velocity); + auto velocityDelta = abs(velocity - head->velocity); if (!(rideEntry->flags & RIDE_ENTRY_FLAG_DISABLE_COLLISION_CRASHES)) { - if (regs.eax > 0xE0000) + if (velocityDelta > 0xE0000) { if (!(vehicleEntry->flags & VEHICLE_ENTRY_FLAG_BOAT_HIRE_COLLISION_DETECTION)) {