mirror of https://github.com/OpenRCT2/OpenRCT2.git
Actually return the game action result in CheatSetAction::Query
This commit is contained in:
parent
caa21b740c
commit
93536c802e
|
@ -70,18 +70,18 @@ GameActions::Result CheatSetAction::Query() const
|
|||
{
|
||||
if (static_cast<uint32_t>(_cheatType) >= static_cast<uint32_t>(CheatType::Count))
|
||||
{
|
||||
GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE);
|
||||
}
|
||||
|
||||
ParametersRange validRange = GetParameterRange(static_cast<CheatType>(_cheatType.id));
|
||||
|
||||
if (_param1 < validRange.first.first || _param1 > validRange.first.second)
|
||||
{
|
||||
GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE);
|
||||
}
|
||||
if (_param2 < validRange.second.first || _param2 > validRange.second.second)
|
||||
{
|
||||
GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE);
|
||||
return GameActions::Result(GameActions::Status::InvalidParameters, STR_NONE, STR_NONE);
|
||||
}
|
||||
|
||||
return GameActions::Result();
|
||||
|
|
Loading…
Reference in New Issue