Skip to content

Commit d91b7af

Browse files
authored
This change allows custom attacking actions to be able to break star road's breakable windows (#1090)
Before this commit custom characters like the sonic in this pull request #1081 can't break some star road windows due to giving up vanilla actions. This pull request remedies that by allowing any custom attacking action to be used in place of vanilla actions for breaking said windows.
1 parent e4aad97 commit d91b7af

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

mods/star-road/helpers.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ function check_mario_attacking(obj, mario)
5252
if mario.action == ACT_WALL_KICK_AIR then
5353
return 2
5454
end
55+
if (mario.action & ACT_FLAG_CUSTOM_ACTION ~= 0) and (mario.action & ACT_FLAG_ATTACKING ~= 0) then
56+
return 2
57+
end
5558
end
5659
end
5760

@@ -121,4 +124,4 @@ function object_drop_to_floor(obj)
121124
local floorHeight = find_floor_height(x, y + 200, z)
122125
obj.oPosY = floorHeight
123126
obj.oMoveFlags = (obj.oMoveFlags | OBJ_MOVE_ON_GROUND)
124-
end
127+
end

0 commit comments

Comments
 (0)