mirror of https://github.com/OpenRCT2/OpenRCT2.git
Add an implicit "else"
After "vehicle->velocity = 0", the sentence: "vehicle->velocity -= vehicle->velocity >> 3" doesn't have any effect, so insert an "else" can clarify the code
This commit is contained in:
parent
95e727d376
commit
efb720326d
|
@ -5453,11 +5453,12 @@ static void sub_6DAB4C_chunk_2(rct_vehicle *vehicle)
|
|||
// Slow it down till completely stop the car
|
||||
RCT2_GLOBAL(0x00F64E18, uint32) |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_10;
|
||||
vehicle->acceleration = 0;
|
||||
// If the vehicle is slow enough, stop it
|
||||
// If the vehicle is slow enough, stop it. If not, slow it down
|
||||
if (vehicle->velocity <= 0x20000) {
|
||||
vehicle->velocity = 0;
|
||||
} else {
|
||||
vehicle->velocity -= vehicle->velocity >> 3;
|
||||
}
|
||||
vehicle->velocity -= vehicle->velocity >> 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue