forked from rosebudai/OpenRCT2-Web
add object property validation
This commit is contained in:
1 parent
7e1f948e19
commit
2cade7dd13
7 files changed
+68
No files matched your search
@@ -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