From 8903a0e185cca8cc026c5ddc21e2fedcaf49b106 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Fri, 17 Mar 2017 17:18:14 +0000 Subject: [PATCH] Yeah, this wasn't network safe. --- src/lua_mobjlib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lua_mobjlib.c b/src/lua_mobjlib.c index 0935f56de..8ec277189 100644 --- a/src/lua_mobjlib.c +++ b/src/lua_mobjlib.c @@ -511,9 +511,8 @@ static int mobj_set(lua_State *L) for (i = 0; i < numskins; i++) if (fastcmp(skins[i].name, skin)) { - if (mo->player && !R_SkinUnlock(mo->player-players, i)) - return luaL_error(L, "mobj.skin '%s' not found!", skin); - mo->skin = &skins[i]; + if (!mo->player || R_SkinUnlock(mo->player-players, i)) + mo->skin = &skins[i]; return 0; } return luaL_error(L, "mobj.skin '%s' not found!", skin);