mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-12-11 21:32:17 +00:00
Lua FadeMusicFromVolume, GetMusicName refactor
This commit is contained in:
parent
f6789a6eb7
commit
d6aa2c23aa
1 changed files with 5 additions and 5 deletions
|
@ -2242,7 +2242,7 @@ static int lib_sChangeMusic(lua_State *L)
|
||||||
|
|
||||||
if (!player || P_IsLocalPlayer(player))
|
if (!player || P_IsLocalPlayer(player))
|
||||||
{
|
{
|
||||||
S_ChangeMusicWithFade(music_name, music_flags, looping, position, prefadems, fadeinms);
|
S_ChangeMusicAdvanced(music_name, music_flags, looping, position, prefadems, fadeinms);
|
||||||
lua_pushboolean(L, true);
|
lua_pushboolean(L, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2468,7 +2468,7 @@ static int lib_sMusicType(lua_State *L)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int lib_sMusicName(lua_State *L)
|
static int lib_sGetMusicName(lua_State *L)
|
||||||
{
|
{
|
||||||
player_t *player = NULL;
|
player_t *player = NULL;
|
||||||
NOHUD
|
NOHUD
|
||||||
|
@ -2479,7 +2479,7 @@ static int lib_sMusicName(lua_State *L)
|
||||||
return LUA_ErrInvalid(L, "player_t");
|
return LUA_ErrInvalid(L, "player_t");
|
||||||
}
|
}
|
||||||
if (!player || P_IsLocalPlayer(player))
|
if (!player || P_IsLocalPlayer(player))
|
||||||
lua_pushstring(L, S_MusicName());
|
lua_pushstring(L, S_GetMusicName());
|
||||||
else
|
else
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -2599,7 +2599,7 @@ static int lib_sFadeMusic(lua_State *L)
|
||||||
NOHUD
|
NOHUD
|
||||||
|
|
||||||
if (!player || P_IsLocalPlayer(player))
|
if (!player || P_IsLocalPlayer(player))
|
||||||
lua_pushboolean(L, S_FadeMusicFromLevel(target_volume, source_volume, ms));
|
lua_pushboolean(L, S_FadeMusicFromVolume(target_volume, source_volume, ms));
|
||||||
else
|
else
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -3015,7 +3015,7 @@ static luaL_Reg lib[] = {
|
||||||
{"S_MusicPlaying",lib_sMusicPlaying},
|
{"S_MusicPlaying",lib_sMusicPlaying},
|
||||||
{"S_MusicPaused",lib_sMusicPaused},
|
{"S_MusicPaused",lib_sMusicPaused},
|
||||||
{"S_MusicType",lib_sMusicType},
|
{"S_MusicType",lib_sMusicType},
|
||||||
{"S_MusicName",lib_sMusicName},
|
{"S_GetMusicName",lib_sGetMusicName},
|
||||||
{"S_MusicExists",lib_sMusicExists},
|
{"S_MusicExists",lib_sMusicExists},
|
||||||
{"S_SetInternalMusicVolume", lib_sSetInternalMusicVolume},
|
{"S_SetInternalMusicVolume", lib_sSetInternalMusicVolume},
|
||||||
{"S_StopFadingMusic",lib_sStopFadingMusic},
|
{"S_StopFadingMusic",lib_sStopFadingMusic},
|
||||||
|
|
Loading…
Reference in a new issue