1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Remove unnecessary condition

It is impossible for two positive integers, each <= 0x7fff, to form a
sum larger than 0xffff
This commit is contained in:
Michał Janiszewski
2017-10-30 10:21:26 +01:00
committed by Michael Steenbeek
parent e656418286
commit 216836cd12

View File

@@ -7613,9 +7613,6 @@ static bool vehicle_update_motion_collision_detection(rct_vehicle * vehicle, sin
if (y_diff > 0x7FFF)
return false;
if (x_diff + y_diff > 0xFFFF)
return false;
sint32 z_diff = abs(z - collideVehicle->z);
if (x_diff + y_diff + z_diff > 0xFFFF)
return false;
@@ -7674,9 +7671,6 @@ static bool vehicle_update_motion_collision_detection(rct_vehicle * vehicle, sin
if (y_diff > 0x7FFF)
continue;
if (x_diff + y_diff > 0xFFFF)
continue;
uint8 cl = Math::Min(vehicle->var_CD, collideVehicle->var_CD);
uint8 ch = Math::Max(vehicle->var_CD, collideVehicle->var_CD);
if (cl != ch)