From 5de81eb62b1819ae62d3e107c344fecd11e3e83b Mon Sep 17 00:00:00 2001 From: NepDisk Date: Tue, 10 Feb 2026 11:35:42 -0500 Subject: [PATCH] Fix map hooks not providing the current maps in compatmode --- src/lua_hooklib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lua_hooklib.c b/src/lua_hooklib.c index f88c193a8..7d49d81df 100644 --- a/src/lua_hooklib.c +++ b/src/lua_hooklib.c @@ -640,8 +640,7 @@ void LUA_HookGamemap(int hook_type) Hook_State hook = {}; if (prepare_hook(&hook, 0, hook_type)) { - lua_pushinteger(gL, gamemap); - lua_pushinteger(gL, G_NativeMapToKart(gamemap)); + lua_pushinteger(gL, lua_compatmode ? G_NativeMapToKart(gamemap) : gamemap); init_hook_call(&hook, 0, res_none); hook.values = 1; call_mapped_gamemap(&hook, &hookIds[hook.hook_type]);