From 878ea3655901c81ecb49413adfade04826faf946 Mon Sep 17 00:00:00 2001 From: mazmazz Date: Sun, 4 Mar 2018 18:14:39 -0500 Subject: [PATCH] Lua: Make P_RestoreMusic follow the non-local player nil output convention --- src/lua_baselib.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lua_baselib.c b/src/lua_baselib.c index 28073da64..d6e268534 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -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)