mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-15 17:21:34 +00:00
Expose S_ShowMusicCredit to Lua
This commit is contained in:
parent
d3a38a4375
commit
cff7d2795d
1 changed files with 16 additions and 0 deletions
|
@ -1839,6 +1839,21 @@ static int lib_sStopSoundByID(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lib_sShowMusicCredit(lua_State *L)
|
||||
{
|
||||
player_t *player = NULL;
|
||||
//HUDSAFE
|
||||
if (!lua_isnone(L, 1) && lua_isuserdata(L, 1))
|
||||
{
|
||||
player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||
if (!player)
|
||||
return LUA_ErrInvalid(L, "player_t");
|
||||
}
|
||||
if (!player || P_IsLocalPlayer(player))
|
||||
S_ShowMusicCredit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lib_sChangeMusic(lua_State *L)
|
||||
{
|
||||
#ifdef MUSICSLOT_COMPATIBILITY
|
||||
|
@ -2666,6 +2681,7 @@ static luaL_Reg lib[] = {
|
|||
{"S_StartSoundAtVolume",lib_sStartSoundAtVolume},
|
||||
{"S_StopSound",lib_sStopSound},
|
||||
{"S_StopSoundByID",lib_sStopSoundByID},
|
||||
{"S_ShowMusicCredit",lib_sShowMusicCredit},
|
||||
{"S_ChangeMusic",lib_sChangeMusic},
|
||||
{"S_SpeedMusic",lib_sSpeedMusic},
|
||||
{"S_StopMusic",lib_sStopMusic},
|
||||
|
|
Loading…
Reference in a new issue