Yeah, this wasn't network safe.

This commit is contained in:
toasterbabe 2017-03-17 17:18:14 +00:00
parent ed3569feae
commit 8903a0e185

View file

@ -511,8 +511,7 @@ static int mobj_set(lua_State *L)
for (i = 0; i < numskins; i++) for (i = 0; i < numskins; i++)
if (fastcmp(skins[i].name, skin)) if (fastcmp(skins[i].name, skin))
{ {
if (mo->player && !R_SkinUnlock(mo->player-players, i)) if (!mo->player || R_SkinUnlock(mo->player-players, i))
return luaL_error(L, "mobj.skin '%s' not found!", skin);
mo->skin = &skins[i]; mo->skin = &skins[i];
return 0; return 0;
} }