Implement model_data access.
@@ -50,6 +50,7 @@ int mapstrings_entity_property(ScriptVariant **varlist, int paramCount)
"energy_status",
"exists",
"model",
+ "model_data",
"model_default",
"name",
"opponent",
@@ -344,6 +345,13 @@ HRESULT openbor_get_entity_property(ScriptVariant **varlist , ScriptVariant **pr
break;
+ case _ENTITY_MODEL_DATA:
+
+ ScriptVariant_ChangeType(*pretvar, VT_PTR);
+ (*pretvar)->ptrVal = (VOID *)&handle->modeldata;
+
+ break;
+
case _ENTITY_MODEL_DEFAULT:
ScriptVariant_ChangeType(*pretvar, VT_PTR);
@@ -747,6 +755,10 @@ HRESULT openbor_set_entity_property(ScriptVariant **varlist, ScriptVariant **pre
break;
+ case _ENTITY_MODEL_DATA:
+
+ // Read only.
+
case _ENTITY_MODEL_DEFAULT:
handle->defaultmodel = (s_model *)varlist[ARG_VALUE]->ptrVal;
