Create constant for BLOCK_BRAKE_BASE_SPEED

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

No files matched your search

+2
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)
+3 -3
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;
}