Lua: Make P_RestoreMusic follow the non-local player nil output convention

This commit is contained in:
mazmazz 2018-03-04 18:14:39 -05:00
parent 8fe4c369bf
commit 878ea36559

View file

@ -954,8 +954,14 @@ static int lib_pRestoreMusic(lua_State *L)
INLEVEL
if (!player)
return LUA_ErrInvalid(L, "player_t");
P_RestoreMusic(player);
return 0;
if (!player || P_IsLocalPlayer(player))
{
P_RestoreMusic(player);
lua_pushboolean(L, true);
}
else
lua_pushnil(L);
return 1;
}
static int lib_pSpawnShieldOrb(lua_State *L)