add object property validation

This commit is contained in:
Ted John committed 2016-07-08 22:58:38 +01:00
1 parent 7e1f948e19
commit 2cade7dd13
7 files changed
+68

No files matched your search

+14
View File
@@ -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()