mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-17 12:03:07 +01:00
add object property validation
This commit is contained in:
@@ -80,6 +80,20 @@ void RideObject::ReadLegacy(IReadObjectContext * context, IStream * stream)
|
||||
}
|
||||
|
||||
GetImageTable()->Read(context, stream);
|
||||
|
||||
// Validate properties
|
||||
if (_legacyType.excitement_multipler > 75)
|
||||
{
|
||||
context->LogError(OBJECT_ERROR_INVALID_PROPERTY, "Excitement multiplier too high.");
|
||||
}
|
||||
if (_legacyType.intensity_multipler > 75)
|
||||
{
|
||||
context->LogError(OBJECT_ERROR_INVALID_PROPERTY, "Intensity multiplier too high.");
|
||||
}
|
||||
if (_legacyType.nausea_multipler > 75)
|
||||
{
|
||||
context->LogError(OBJECT_ERROR_INVALID_PROPERTY, "Nausea multiplier too high.");
|
||||
}
|
||||
}
|
||||
|
||||
void RideObject::Load()
|
||||
|
||||
Reference in New Issue
Block a user