mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-29 17:54:50 +01:00
Create kMaximumBrakeSpeed
This commit is contained in:
committed by
Michael Steenbeek
parent
575cd756b3
commit
dbbfc2f1d1
@@ -68,6 +68,12 @@ GameActions::Result TrackSetBrakeSpeedAction::QueryExecute(bool isExecuting) con
|
||||
GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_TILE_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
if (_brakeSpeed > kMaximumBrakeSpeed)
|
||||
{
|
||||
LOG_WARNING("Invalid speed for track, speed = %d", _brakeSpeed);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_SPEED_TOO_HIGH, STR_NONE);
|
||||
}
|
||||
|
||||
if (isExecuting)
|
||||
{
|
||||
GetTrackElementOriginAndApplyChanges(
|
||||
|
||||
Reference in New Issue
Block a user