diff --git a/src/game/interaction.c b/src/game/interaction.c index f57d10049..6edf0fc54 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -166,7 +166,8 @@ u32 determine_interaction(struct MarioState *m, struct Object *o) { if ((interaction == 0 || interaction & INT_LUA) && action & ACT_FLAG_ATTACKING) { u32 flags = (MARIO_PUNCHING | MARIO_KICKING | MARIO_TRIPPING); - if (m->flags & flags) { + if ((action == ACT_PUNCHING || action == ACT_MOVE_PUNCHING || action == ACT_JUMP_KICK) || + ((m->flags & flags) && (interaction & INT_LUA))) { s16 dYawToObject = mario_obj_angle_to_object(m, o) - m->faceAngle[1]; if (m->flags & MARIO_PUNCHING) { diff --git a/src/pc/lua/smlua_hooks.c b/src/pc/lua/smlua_hooks.c index fadc0187e..39d68e636 100644 --- a/src/pc/lua/smlua_hooks.c +++ b/src/pc/lua/smlua_hooks.c @@ -1177,12 +1177,12 @@ int smlua_hook_mario_action(lua_State* L) { lua_Integer interactionType = 0; if (paramCount >= 3) { interactionType = smlua_to_integer(L, 3); - interactionType |= (1 << 31); /* INT_LUA */ if (!gSmLuaConvertSuccess) { LOG_LUA_LINE("Hook Action: tried to hook invalid interactionType: %lld, %u", interactionType, gSmLuaConvertSuccess); return 0; } } + interactionType |= (1 << 31); /* INT_LUA */ struct LuaHookedMarioAction* hooked = &sHookedMarioActions[sHookedMarioActionsCount];