Check types for spawn object transmission

This commit is contained in:
MysterD 2022-03-21 12:49:37 -07:00
parent a35165bd9f
commit 03dcb25273

View file

@ -19,6 +19,11 @@ void spawn_object_remember_field(struct LuaObjectField* field) {
return;
}
// make sure it's a field that can be transmitted
if (field->valueType != LVT_F32 && field->valueType != LVT_S32 && field->valueType != LVT_U32) {
return;
}
// check for duplicates
for (int i = 0; i < gSpawnObjectFieldCount; i++) {
if (field->valueOffset == gSpawnObjectFields[i].valueOffset) { return; }