Abide by the rules for reference objects

It fixes crashes on certain maps (also official).
It bases on 3ec0b1218d
This commit is contained in:
aurhat
2020-11-02 22:42:00 +01:00
parent ae65a64828
commit c2e09cac76
7 changed files with 37 additions and 37 deletions
+1 -1
View File
@@ -103,7 +103,7 @@ void mapmodelreset()
if(execcontext==IEXC_MAPCFG) mapmodels.shrink(0);
}
mapmodelinfo &getmminfo(int i) { return mapmodels.inrange(i) ? mapmodels[i] : *(mapmodelinfo *)0; }
mapmodelinfo *getmminfo(int i) { return mapmodels.inrange(i) ? &mapmodels[i] : NULL; }
COMMAND(mapmodel, "iiiss");
COMMAND(mapmodelreset, "");