Fix gamemap hooks returning the wrong mapid because of compatmode check

Thanks Indev!!!!!!!!
This commit is contained in:
NepDisk 2026-02-17 11:40:16 -05:00
parent f8316526ee
commit 7be815369f

View file

@ -502,7 +502,8 @@ static int call_mapped_gamemap(Hook_State *hook, const hook_t *map)
for (k = 0; k < map->numHooks; ++k)
{
get_hook(hook, map->ids, k);
lua_pushvalue(gL, hook->top - !lua_compatmode);
boolean compat = in_bit_array(hookCompat, hook->id);
lua_pushvalue(gL, hook->top - !compat);
call_single_hook_no_copy(hook);
}