mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-03-26 21:11:43 +00:00
Properly fix lua interaction flags (#704)
Reverts a change Isaac did a little while ago and fixes the source of the issue
This commit is contained in:
parent
edacdcc7e4
commit
dc4ac0f681
2 changed files with 3 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue