mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Lua: Fix music functions not returning proper values
# Conflicts: # src/lua_baselib.c
This commit is contained in:
parent
2e3837e656
commit
456652021e
1 changed files with 4 additions and 3 deletions
|
|
@ -2206,7 +2206,6 @@ static int lib_sChangeMusic(lua_State *L)
|
||||||
music_name = luaL_checkstring(L, 1);
|
music_name = luaL_checkstring(L, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
looping = (boolean)lua_opttrueboolean(L, 2);
|
looping = (boolean)lua_opttrueboolean(L, 2);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
@ -2231,6 +2230,8 @@ static int lib_sChangeMusic(lua_State *L)
|
||||||
#endif
|
#endif
|
||||||
music_flags = (UINT16)luaL_optinteger(L, 4, 0);
|
music_flags = (UINT16)luaL_optinteger(L, 4, 0);
|
||||||
|
|
||||||
|
fadein_ms = luaL_optinteger(L, 5, 0);
|
||||||
|
|
||||||
if (!player || P_IsLocalPlayer(player))
|
if (!player || P_IsLocalPlayer(player))
|
||||||
{
|
{
|
||||||
S_ChangeMusic(music_name, music_flags, looping);
|
S_ChangeMusic(music_name, music_flags, looping);
|
||||||
|
|
@ -2238,7 +2239,7 @@ static int lib_sChangeMusic(lua_State *L)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lib_sSpeedMusic(lua_State *L)
|
static int lib_sSpeedMusic(lua_State *L)
|
||||||
|
|
@ -2348,7 +2349,7 @@ static int lib_sStopMusic(lua_State *L)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lib_sDigitalPlaying(lua_State *L)
|
static int lib_sDigitalPlaying(lua_State *L)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue