Skip to content

Commit 8a6dc20

Browse files
committed
Fix hollow collision for clearpipes
Removed new falling object detection for potential issues (shoes) Fix fireballs on slopes (might need a bounces property for other entity) Tweak thwomp direction correction speed Tweak GLaDOS collision to ignore mario Tweak Mario's hammers y velocity
1 parent d831ed4 commit 8a6dc20

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed

enemies/glados.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function glados:init(x, y, r)
1313
self.category = 4
1414
self.gravity = 0
1515

16-
self.mask = {true, true, false, false}
16+
self.mask = {true, true, true, false}
1717

1818
self.emancipatecheck = false
1919
self.autodelete = false

enemies/thwomp.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ function thwomp:update(dt)
249249
--slow down if being flung in wrong direction
250250
if (self.t == "left" or self.t == "right") and (not self.track) then
251251
if self.speedy ~= 0 then
252-
self.speedy = math.max(0,math.abs(self.speedy)-4*dt)*(self.speedy/math.abs(self.speedy))
252+
self.speedy = math.max(0,math.abs(self.speedy)-10*dt)*(self.speedy/math.abs(self.speedy))
253+
print("hey")
253254
end
254255
end
255256

fireball.lua

+3
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ function fireball:floorcollide(a, b)
214214
else
215215
self.speedy = -fireballjumpforce
216216
end
217+
if b.SLOPE then
218+
self.speedy = self.speedy -b.incline*10
219+
end
217220
return false
218221
end
219222

main.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ local debugGraph,fpsGraph,memGraph,drawGraph
5656
local debugGraphs = false
5757

5858
VERSION = 13.0124
59-
VERSIONSTRING = "13e (3/7/22)"
59+
VERSIONSTRING = "13.1 (2/6/23)"
6060

6161
android = (love.system.getOS() == "Android" or love.system.getOS() == "iOS") --[DROID]
6262
androidtest = false--testing android on pc

mariohammer.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ mariohammer = class:new()
33
function mariohammer:init(x, y, dir, v)
44
--PHYSICS STUFF
55
self.y = y+4/16
6-
self.speedy = (-math.sqrt(2*yacceleration*3.5))+v.speedy --bobthelawyer?
6+
self.speedy = (-math.sqrt(2*yacceleration*3.5))--+v.speedy --bobthelawyer?
77
if dir == "right" then
88
self.speedx = hammerspeed+v.speedx
99
self.x = x+3/16

physics.lua

+5-5
Original file line numberDiff line numberDiff line change
@@ -340,16 +340,16 @@ function physicsupdate(dt)
340340
if v.startfall then
341341
if (not (v.stopjump and v.jumping)) and (not v.quicksand) then
342342
if v.gravitydir then
343-
if (v.gravitydir == "down" and v.speedy == oldspeedy + v.gravity*dt) or (v.gravitydir == "up" and v.speedy == oldspeedy - v.gravity*dt) then
343+
if (v.gravitydir == "down" and v.speedy == v.gravity*dt) or (v.gravitydir == "up" and v.speedy == -v.gravity*dt) then
344344
v:startfall(i)
345345
end
346-
elseif v.speedy == oldspeedy + v.gravity*dt then
346+
elseif v.speedy == v.gravity*dt then
347347
v:startfall(i)
348348
end
349349
end
350350
end
351351
else
352-
if v.speedy == oldspeedy + yacceleration*dt and v.startfall then
352+
if v.speedy == yacceleration*dt and v.startfall then
353353
v:startfall(i)
354354
end
355355
end
@@ -373,7 +373,7 @@ function physicsupdate(dt)
373373
if v.gravity then
374374
if v.startfall then
375375
if v.gravitydir then
376-
if (v.gravitydir == "right" and v.speedx == oldspeedx + v.gravity*dt) or (v.gravitydir == "left" and v.speedx == oldspeedx - v.gravity*dt) then
376+
if (v.gravitydir == "right" and v.speedx == v.gravity*dt) or (v.gravitydir == "left" and v.speedx == -v.gravity*dt) then
377377
v:startfall(i)
378378
end
379379
end
@@ -481,7 +481,7 @@ function cancollideside(t, side, v)
481481
elseif side == "right" then
482482
return (safe or t.PLATFORMRIGHT)
483483
elseif side =="passive" then
484-
return safe and (not t.hollow)
484+
return safe
485485
end
486486
end
487487

0 commit comments

Comments
 (0)