diff --git a/autogen/convert_constants.py b/autogen/convert_constants.py index 0854287a..11b4aacb 100644 --- a/autogen/convert_constants.py +++ b/autogen/convert_constants.py @@ -51,7 +51,8 @@ in_files = [ exclude_constants = { "*": [ "^MAXCONTROLLERS$", "^AREA_[^T].*", "^AREA_T[HTO]", "^CONT_ERR.*", "^READ_MASK$", "^SIGN_RANGE$", ], "src/game/obj_behaviors.c": [ "^o$" ], - "src/pc/djui/djui_console.h": [ "CONSOLE_MAX_TMP_BUFFER" ] + "src/pc/djui/djui_console.h": [ "CONSOLE_MAX_TMP_BUFFER" ], + "src/pc/lua/smlua_hooks.h": [ "MAX_HOOKED_MOD_MENU_ELEMENTS" ] } include_constants = { diff --git a/autogen/lua_definitions/constants.lua b/autogen/lua_definitions/constants.lua index b49c4ee2..c1690280 100644 --- a/autogen/lua_definitions/constants.lua +++ b/autogen/lua_definitions/constants.lua @@ -9213,7 +9213,7 @@ HOOK_ON_COLLIDE_LEVEL_BOUNDS = 37 HOOK_MIRROR_MARIO_RENDER = 38 --- @type LuaHookedEventType -HOOK_OVERRIDE_PHYS_STEP_DEFACTO_SPEED = 39 +HOOK_MARIO_OVERRIDE_PHYS_STEP_DEFACTO_SPEED = 39 --- @type LuaHookedEventType HOOK_ON_OBJECT_LOAD = 40 diff --git a/docs/lua/constants.md b/docs/lua/constants.md index c8a20795..684aa6fc 100644 --- a/docs/lua/constants.md +++ b/docs/lua/constants.md @@ -3289,7 +3289,7 @@ | HOOK_ON_HUD_RENDER_BEHIND | 36 | | HOOK_ON_COLLIDE_LEVEL_BOUNDS | 37 | | HOOK_MIRROR_MARIO_RENDER | 38 | -| HOOK_OVERRIDE_PHYS_STEP_DEFACTO_SPEED | 39 | +| HOOK_MARIO_OVERRIDE_PHYS_STEP_DEFACTO_SPEED | 39 | | HOOK_ON_OBJECT_LOAD | 40 | | HOOK_ON_PLAY_SOUND | 41 | | HOOK_ON_SEQ_LOAD | 42 | diff --git a/mods/mquake/_mquake_f_hooks.lua b/mods/mquake/_mquake_f_hooks.lua index 05d972dd..d5074e98 100644 --- a/mods/mquake/_mquake_f_hooks.lua +++ b/mods/mquake/_mquake_f_hooks.lua @@ -8,7 +8,7 @@ hook_mario_action(ACT_DM_AIR_MOVEMENT_METAL, act_dm_air_movement) hook_mario_action(ACT_DM_POLE_MOVEMENT, act_dm_pole_movement) hook_mario_action(ACT_DM_WATER_MOVEMENT, act_dm_water_movement) hook_event(HOOK_ON_PLAYER_CONNECTED, on_player_connected) -hook_event(HOOK_OVERRIDE_PHYS_STEP_DEFACTO_SPEED, override_defacto) +hook_event(HOOK_MARIO_OVERRIDE_PHYS_STEP_DEFACTO_SPEED, override_defacto) hook_event(HOOK_CHARACTER_SOUND, allow_voice) hook_event(HOOK_BEFORE_SET_MARIO_ACTION, before_set_mario_action) hook_event(HOOK_ON_SET_MARIO_ACTION, on_set_mario_action) diff --git a/src/game/mario_step.c b/src/game/mario_step.c index b84d9d53..362c0377 100644 --- a/src/game/mario_step.c +++ b/src/game/mario_step.c @@ -363,7 +363,7 @@ s32 perform_ground_step(struct MarioState *m) { Vec3f step = { 0 }; if (m->floor) { f32 floorNormal; - if (!smlua_call_event_hooks_mario_param_ret_float(HOOK_OVERRIDE_PHYS_STEP_DEFACTO_SPEED, m, &floorNormal)) { + if (!smlua_call_event_hooks_mario_param_ret_float(HOOK_MARIO_OVERRIDE_PHYS_STEP_DEFACTO_SPEED, m, &floorNormal)) { floorNormal = m->floor->normal.y; } step[0] = floorNormal * (m->vel[0] / 4.0f); diff --git a/src/pc/lua/smlua_constants_autogen.c b/src/pc/lua/smlua_constants_autogen.c index a9c4e5ea..80011197 100644 --- a/src/pc/lua/smlua_constants_autogen.c +++ b/src/pc/lua/smlua_constants_autogen.c @@ -3286,7 +3286,7 @@ char gSmluaConstants[] = "" "HOOK_ON_HUD_RENDER_BEHIND = 36\n" "HOOK_ON_COLLIDE_LEVEL_BOUNDS = 37\n" "HOOK_MIRROR_MARIO_RENDER = 38\n" -"HOOK_OVERRIDE_PHYS_STEP_DEFACTO_SPEED = 39\n" +"HOOK_MARIO_OVERRIDE_PHYS_STEP_DEFACTO_SPEED = 39\n" "HOOK_ON_OBJECT_LOAD = 40\n" "HOOK_ON_PLAY_SOUND = 41\n" "HOOK_ON_SEQ_LOAD = 42\n" diff --git a/src/pc/lua/smlua_hooks.h b/src/pc/lua/smlua_hooks.h index cbc48c3a..67a87bbf 100644 --- a/src/pc/lua/smlua_hooks.h +++ b/src/pc/lua/smlua_hooks.h @@ -50,7 +50,7 @@ enum LuaHookedEventType { HOOK_ON_HUD_RENDER_BEHIND, HOOK_ON_COLLIDE_LEVEL_BOUNDS, HOOK_MIRROR_MARIO_RENDER, - HOOK_OVERRIDE_PHYS_STEP_DEFACTO_SPEED, + HOOK_MARIO_OVERRIDE_PHYS_STEP_DEFACTO_SPEED, HOOK_ON_OBJECT_LOAD, HOOK_ON_PLAY_SOUND, HOOK_ON_SEQ_LOAD, @@ -99,7 +99,7 @@ static const char* LuaHookedEventTypeName[] = { "HOOK_ON_HUD_RENDER_BEHIND", "HOOK_ON_COLLIDE_LEVEL_BOUNDS", "HOOK_MIRROR_MARIO_RENDER", - "HOOK_OVERRIDE_PHYS_STEP_DEFACTO_SPEED", + "HOOK_MARIO_OVERRIDE_PHYS_STEP_DEFACTO_SPEED", "HOOK_ON_OBJECT_LOAD", "HOOK_ON_PLAY_SOUND", "HOOK_ON_SEQ_LOAD",