Provide conversion from gamecommand in replay manager

This commit is contained in:
duncanspumpkin 2019-02-22 11:24:13 +00:00
parent e1977d1a2f
commit 9d76c609f3
1 changed files with 10 additions and 0 deletions

View File

@ -16,6 +16,7 @@
#include "PlatformEnvironment.h"
#include "actions/GameAction.h"
#include "actions/TrackPlaceAction.hpp"
#include "actions/RideSetSetting.hpp"
#include "config/Config.h"
#include "core/DataSerialiser.h"
#include "core/Path.hpp"
@ -492,6 +493,15 @@ namespace OpenRCT2
result.action->SetFlags(command.ebx & 0xFF);
break;
}
case GAME_COMMAND_SET_RIDE_SETTING:
{
ride_id_t rideId = command.edx & 0xFF;
RideSetSetting setting = static_cast<RideSetSetting>((command.edx >> 8) & 0xFF);
uint8_t value = (command.ebx >> 8) & 0xFF;
result.action = std::make_unique<RideSetSettingAction>(rideId, setting, value);
result.action->SetFlags(command.ebx & 0xFF);
}
default:
throw std::runtime_error("Deprecated game command requires replay translation.");
}