1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 20:13:07 +01:00

Allow 3 cars per train on the Rocket cars

This commit is contained in:
Michael Steenbeek
2016-11-16 14:25:37 +01:00
committed by Ted John
parent ec6724b4d4
commit 736437aa6e
2 changed files with 12 additions and 0 deletions

View File

@@ -16,6 +16,7 @@
#include "../core/IStream.hpp"
#include "../core/Memory.hpp"
#include "../core/String.hpp"
#include "../core/Util.hpp"
#include "ObjectRepository.h"
#include "RideObject.h"
@@ -123,6 +124,8 @@ void RideObject::ReadLegacy(IReadObjectContext * context, IStream * stream)
{
context->LogError(OBJECT_ERROR_INVALID_PROPERTY, "Nausea multiplier too high.");
}
PerformRCT1CompatibilityFixes();
}
void RideObject::Load()
@@ -438,3 +441,11 @@ void RideObject::ReadLegacyVehicle(IReadObjectContext * context, IStream * strea
vehicle->special_frames = stream->ReadValue<uint8>();
stream->Seek(4, STREAM_SEEK_CURRENT);
}
void RideObject::PerformRCT1CompatibilityFixes()
{
if (String::Equals(GetIdentifier(), "RCKC ")) {
// The rocket cars could take 3 cars per train in RCT1. Restore this.
_legacyType.max_cars_in_train = 3 + _legacyType.zero_cars;
}
}

View File

@@ -49,4 +49,5 @@ public:
private:
void ReadLegacyVehicle(IReadObjectContext * context, IStream * stream, rct_ride_entry_vehicle * vehicle);
void PerformRCT1CompatibilityFixes();
};