Fix #8207: ride_create_command ignoring game action result. (#8208)

This commit is contained in:
ζeh Matt 2018-11-02 21:13:41 +01:00 committed by Michał Janiszewski
parent 0cd7f1e07c
commit e083116bc7
1 changed files with 6 additions and 0 deletions

View File

@ -122,6 +122,12 @@ money32 ride_create_command(int32_t type, int32_t subType, int32_t flags, uint8_
auto r = GameActions::Execute(&gameAction);
const RideCreateGameActionResult* res = static_cast<RideCreateGameActionResult*>(r.get());
// Callee's of this function expect MONEY32_UNDEFINED in case of failure.
if (res->Error != GA_ERROR::OK)
{
return MONEY32_UNDEFINED;
}
*outRideIndex = res->rideIndex;
*outRideColour = colour1;