From 50f2244db3826db02e11de343719307bdfb271eb Mon Sep 17 00:00:00 2001 From: JugadorXEI Date: Tue, 5 Aug 2025 15:12:59 +0200 Subject: [PATCH] Lua: add INLEVEL check and return value to K_KartBouncing --- src/lua_baselib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lua_baselib.c b/src/lua_baselib.c index cf0c8f777..0abcd51e8 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -3591,12 +3591,13 @@ static int lib_kKartBouncing(lua_State *L) mobj_t *mobj1 = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ)); mobj_t *mobj2 = *((mobj_t **)luaL_checkudata(L, 2, META_MOBJ)); NOHUD + INLEVEL if (!mobj1) return LUA_ErrInvalid(L, "mobj_t"); if (!mobj2) return LUA_ErrInvalid(L, "mobj_t"); - K_KartBouncing(mobj1, mobj2); - return 0; + lua_pushboolean(L, K_KartBouncing(mobj1, mobj2)); + return 1; } static int lib_kKartPainEnergyFling(lua_State *L)