1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Create constant for BLOCK_BRAKE_BASE_SPEED

This commit is contained in:
blackhand1001
2020-05-05 17:35:34 +02:00
committed by Gymnasiast
parent f3c0476673
commit 7fab48e2eb
2 changed files with 5 additions and 3 deletions

View File

@@ -15,6 +15,8 @@
constexpr const uint16_t RideConstructionSpecialPieceSelected = 0x100;
constexpr const int32_t BLOCK_BRAKE_BASE_SPEED = 0x20364;
using track_type_t = uint16_t;
#pragma pack(push, 1)

View File

@@ -6626,10 +6626,10 @@ static void apply_non_stop_block_brake(Vehicle* vehicle, bool block_brake_closed
if (vehicle->velocity >= 0)
{
// If the vehicle is below the speed limit
if (vehicle->velocity <= 0x20364)
if (vehicle->velocity <= BLOCK_BRAKE_BASE_SPEED)
{
// Boost it to the fixed block brake speed
vehicle->velocity = 0x20364;
vehicle->velocity = BLOCK_BRAKE_BASE_SPEED;
vehicle->acceleration = 0;
}
else if (block_brake_closed)
@@ -7587,7 +7587,7 @@ static void vehicle_update_handle_scenery_door(Vehicle* vehicle)
static void vehicle_update_play_water_splash_sound()
{
if (_vehicleVelocityF64E08 <= 0x20364)
if (_vehicleVelocityF64E08 <= BLOCK_BRAKE_BASE_SPEED)
{
return;
}