Skip to content

Commit 3b5c80d

Browse files
committed
Fix iceblock killing, userects, android jumping
1 parent 9f1fc3c commit 3b5c80d

File tree

6 files changed

+22
-4
lines changed

6 files changed

+22
-4
lines changed

enemy.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -2123,6 +2123,8 @@ function enemy:update(dt)
21232123
end
21242124
end
21252125
end
2126+
end
2127+
if self.userect then
21262128
self.userect.x, self.userect.y = self.x+self.carryrange[1], self.y+self.carryrange[2]
21272129
end
21282130
end
@@ -3253,7 +3255,7 @@ function enemy:output(transformed)
32533255
self.userect.delete = true
32543256
self.destroying = true
32553257
end
3256-
if self.userect and not self.userect.delete then
3258+
if self.userect then
32573259
self.userect.delete = true
32583260
end
32593261
if self.blockportaltile and not self.dontremoveblockportaltileondeath then

game.lua

+5
Original file line numberDiff line numberDiff line change
@@ -2359,6 +2359,11 @@ function game_draw()
23592359
end
23602360
end
23612361
end
2362+
2363+
for j, w in pairs(userects) do
2364+
love.graphics.setColor(0, 255, 255, 150)
2365+
love.graphics.rectangle("line", math.floor((w.x-xscroll)*16*scale)+.5, math.floor((w.y-yscroll-.5)*16*scale)+.5, w.width*16*scale-1, w.height*16*scale-1)
2366+
end
23622367
love.graphics.setLineWidth(lw)
23632368

23642369
--animation numbers

ice.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,10 @@ function ice:meltice(destroy)
286286
if a ~= "bowser" then
287287
addpoints(firepoints[a], self.x, self.y)
288288
end
289-
elseif self.a == "enemy" and (not b.resistsiceblock) and (not b.resistsenemykill) and (not b.resistseverything) and (not b.resistseverything) and b:shotted("right", nil, nil, false, true) then
290-
addpoints(firepoints[b.t] or 100, self.x, self.y)
289+
elseif self.a == "enemy" then
290+
if (not b.resistsiceblock) and (not b.resistsenemykill) and (not b.resistseverything) and (not b.resistseverything) and b:shotted("right", nil, nil, false, true) then
291+
addpoints(firepoints[b.t] or 100, self.x, self.y)
292+
end
291293
else
292294
b.instantdelete = true
293295
end

main.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -2515,7 +2515,9 @@ if android then
25152515

25162516
local button = getandroidbutton(x, y)
25172517
if button == "jump" and ((not editormode) or ((not editormenuopen) and (not HIDEANDROIDBUTTONS))) then --a
2518-
love.keypressed(controls[1]["jump"][1])
2518+
if not touchkey[controls[1]["jump"][1]] then
2519+
love.keypressed(controls[1]["jump"][1])
2520+
end
25192521
touchkey[controls[1]["jump"][1]] = id
25202522
return true
25212523
elseif button == "run" and ((not editormode) or ((not editormenuopen) and (not HIDEANDROIDBUTTONS))) then--b

mario.lua

+4
Original file line numberDiff line numberDiff line change
@@ -655,6 +655,9 @@ function mario:update(dt)
655655
self.yoshitoungeenemy = {graphic=v.graphic,quad=v.quad,width=v.width,height=v.height,
656656
offsetX=v.offsetX or 0,offsetY=v.offsetY or 0,quadcenterX=v.quadcenterX or 0,quadcenterY=v.quadcenterY or 0,
657657
animationscalex=v.animationscalex, animationscaley=v.animationscaley}
658+
if v.output then
659+
v:output()
660+
end
658661
v.instantdelete = true
659662
end
660663
local dobreak = true
@@ -8081,6 +8084,7 @@ function mario:flag()
80818084
--kill shit
80828085
for i, v in pairs(objects["enemy"]) do
80838086
if v.deleteonflagpole then
8087+
v:output()
80848088
v.instantdelete = true
80858089
end
80868090
end

yoshi.lua

+3
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ function yoshi:update(dt)
118118
if (not v.shot) and v.width and aabb(x, y, w, h, v.x, v.y, v.width, v.height) then
119119
addpoints(firepoints[obj], v.x, v.y)
120120
v:shotted(self.animationdirection)
121+
if v.output then
122+
v:output()
123+
end
121124
v.instantdelete = true
122125
self.toungeenemy = {graphic=v.graphic, quad=v.quad}
123126
local dobreak = true

0 commit comments

Comments
 (0)