Skip to content
Snippets Groups Projects
Commit c71719ac authored by Marco Z's avatar Marco Z
Browse files

Music lua: Return nil for invalid players and non-nil for valid players

# Conflicts:
#	src/lua_baselib.c
parent 9dbc8075
No related branches found
No related tags found
No related merge requests found
......@@ -2291,7 +2291,10 @@ static int lib_sPauseMusic(lua_State *L)
return LUA_ErrInvalid(L, "player_t");
}
if (!player || P_IsLocalPlayer(player))
{
S_PauseAudio();
lua_pushboolean(L, true);
}
else
lua_pushnil(L);
return 1;
......@@ -2314,7 +2317,10 @@ static int lib_sResumeMusic(lua_State *L)
return LUA_ErrInvalid(L, "player_t");
}
if (!player || P_IsLocalPlayer(player))
{
S_ResumeAudio();
lua_pushboolean(L, true);
}
else
lua_pushnil(L);
return 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment