mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-20 09:11:01 +00:00
Music lua: Return nil for invalid players and non-nil for valid players
# Conflicts: # src/lua_baselib.c
This commit is contained in:
parent
9dbc807528
commit
c71719ac6b
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue