From 2fe0fcf14c0e90fa596e415eb5f61332637cdb09 Mon Sep 17 00:00:00 2001 From: Indev Date: Wed, 17 Dec 2025 01:40:42 +0300 Subject: [PATCH] Make music credit animation arguments optional in lua S_ShowMusicCredit Signed-off-by: NepDisk --- src/lua_baselib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lua_baselib.c b/src/lua_baselib.c index 10b84d341..0d7bd43a2 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -3140,9 +3140,9 @@ static int lib_sShowMusicCredit(lua_State *L) if (!player) return LUA_ErrInvalid(L, "player_t"); } - fixed_t yoffset = luaL_checkfixed(L, 2); - UINT16 animtime = lua_isnone(L, 3) ? 5*TICRATE : luaL_checkinteger(L, 3); - INT32 snapflags = luaL_checkinteger(L, 4); + fixed_t yoffset = luaL_optfixed(L, 2, 0); + UINT16 animtime = luaL_optinteger(L, 3, 5*TICRATE); + INT32 snapflags = luaL_optinteger(L, 4, 0); if (!player || P_IsLocalPlayer(player)) S_ShowMusicCredit(yoffset, animtime, snapflags); return 0;