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:
committed by
Ted John
parent
ec6724b4d4
commit
736437aa6e
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,4 +49,5 @@ public:
|
||||
|
||||
private:
|
||||
void ReadLegacyVehicle(IReadObjectContext * context, IStream * stream, rct_ride_entry_vehicle * vehicle);
|
||||
void PerformRCT1CompatibilityFixes();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user