mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Lua merge fixes
This commit is contained in:
parent
e68187edfe
commit
24270b4998
1 changed files with 13 additions and 3 deletions
|
|
@ -2293,8 +2293,18 @@ static int lib_sSetMusicPosition(lua_State *L)
|
||||||
|
|
||||||
static int lib_sGetMusicPosition(lua_State *L)
|
static int lib_sGetMusicPosition(lua_State *L)
|
||||||
{
|
{
|
||||||
|
player_t *player = NULL;
|
||||||
NOHUD
|
NOHUD
|
||||||
lua_pushinteger(L, (UINT32)S_GetMusicPosition());
|
if (!lua_isnone(L, 2) && lua_isuserdata(L, 2))
|
||||||
|
{
|
||||||
|
player = *((player_t **)luaL_checkudata(L, 2, META_PLAYER));
|
||||||
|
if (!player)
|
||||||
|
return LUA_ErrInvalid(L, "player_t");
|
||||||
|
}
|
||||||
|
if (!player || P_IsLocalPlayer(player))
|
||||||
|
lua_pushinteger(L, (int)S_GetMusicPosition());
|
||||||
|
else
|
||||||
|
lua_pushnil(L);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2322,9 +2332,9 @@ static int lib_sResumeMusic(lua_State *L)
|
||||||
{
|
{
|
||||||
player_t *player = NULL;
|
player_t *player = NULL;
|
||||||
NOHUD
|
NOHUD
|
||||||
if (!lua_isnone(L, 2) && lua_isuserdata(L, 2))
|
if (!lua_isnone(L, 1) && lua_isuserdata(L, 1))
|
||||||
{
|
{
|
||||||
player = *((player_t **)luaL_checkudata(L, 2, META_PLAYER));
|
player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||||
if (!player)
|
if (!player)
|
||||||
return LUA_ErrInvalid(L, "player_t");
|
return LUA_ErrInvalid(L, "player_t");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue