1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 21:13:05 +01:00

Fix toilets image loading

This commit is contained in:
Ted John
2017-12-05 18:57:14 +00:00
committed by Gymnasiast
parent ad21e962ee
commit 32d588d765
4 changed files with 39 additions and 27 deletions

View File

@@ -219,22 +219,13 @@ namespace ObjectFactory
auto objectType = std::string(json_string_value(jObjectType));
if (objectType == "ride")
{
std::string objectName;
const char * id = json_string_value(json_object_get(jRoot, "id"));
if (String::Equals(id, "rct1.icecr"))
{
objectName = "#RCT1ICE";
}
else
{
objectName = "#RCT1TOI";
}
auto id = json_string_value(json_object_get(jRoot, "id"));
auto originalId = json_string_value(json_object_get(jRoot, "originalId"));
rct_object_entry entry = { 0 };
memcpy(entry.name, objectName.c_str(), 8);
memcpy(entry.name, originalId, 8);
result = new RideObject(entry);
auto readContext = ReadObjectContext(objectName.c_str());
auto readContext = ReadObjectContext(id);
result->ReadJson(&readContext, jRoot);
if (readContext.WasError())
{