From 7ca46a9a01d978b08d29f193d90a749e5af2f035 Mon Sep 17 00:00:00 2001 From: lustlion Date: Sat, 26 Feb 2022 21:35:09 +0100 Subject: [PATCH] please begone --- e82fdc16_0001-walljumps.patch | 89 ----------------------------------- 1 file changed, 89 deletions(-) delete mode 100644 e82fdc16_0001-walljumps.patch diff --git a/e82fdc16_0001-walljumps.patch b/e82fdc16_0001-walljumps.patch deleted file mode 100644 index 7408842..0000000 --- a/e82fdc16_0001-walljumps.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 1d8685c91e64daedfef9607ec122c3de05be36e5 Mon Sep 17 00:00:00 2001 -From: binarycat -Date: Sat, 26 Feb 2022 15:12:25 -0500 -Subject: [PATCH] walljumps - ---- - code/debug.lua | 1 + - code/entities/player.lua | 12 ++++++++++++ - code/entity.lua | 3 ++- - 3 files changed, 15 insertions(+), 1 deletion(-) - -diff --git a/code/debug.lua b/code/debug.lua -index 5a9e094..68c61cf 100644 ---- a/code/debug.lua -+++ b/code/debug.lua -@@ -22,6 +22,7 @@ function DebugUI() - end - end - -- player isOnGroundCheck -+ --love.graphics.main_Player - love.graphics.setColor(1,0,0) - end - -diff --git a/code/entities/player.lua b/code/entities/player.lua -index ea2d811..824cc25 100644 ---- a/code/entities/player.lua -+++ b/code/entities/player.lua -@@ -14,6 +14,8 @@ function Player:New(x,y) - - o.jumpImpulse = 3.5 -- gameworld pixels - -+ self.wallJumpImpulse = { x = 2.5, y = 3.5 } -+ - o.coyoteAmount = 5 -- int - o.coyoteValue = 5 -- frames - -@@ -46,6 +48,7 @@ function Player:New(x,y) - o.canFall = true - o.canFriction = true - o.maskType = animation.moth_mask -+ o.wallHit = 0 - - o.anchorRespawn = { - x = o.pos.x, -@@ -93,6 +96,9 @@ function Player:Smart() - if self.coyoteValue > 0 then - self.vel.y = -self.jumpImpulse - self.coyoteValue = 0 -+ elseif self.wallHit ~= 0 then -+ self.vel.y = -self.wallJumpImpulse.y -+ self.vel.x = -self.wallJumpImpulse.x * self.wallHit - end - end - end -@@ -233,7 +239,9 @@ function Player:DoPhysics() - -- horizontal collision - if not self:isCollidingAt(self.pos.x + self.vel.x + self.move_x, self.pos.y, LoadedObjects.Collisions) then - self.pos.x = self.pos.x + self.vel.x + self.move_x -+ self.wallHit = 0 - else -+ self.wallHit = math.sign(self.vel.x + self.move_x) - self.vel.x = 0 - end - -@@ -313,3 +321,7 @@ function Player:Unhook() - self.isHooked = false - self.hookAnchor = nil - end -+ -+function Player:Debug() -+ love.graphics.print("wallHit: "..self.wallHit) -+end -diff --git a/code/entity.lua b/code/entity.lua -index 9bb582f..b43df21 100644 ---- a/code/entity.lua -+++ b/code/entity.lua -@@ -158,7 +158,8 @@ function Entity:getBoundingBox(animation,top,left,bottom,right) - self.boxCollision.to.y = animation.imgs[1]:getHeight()/2 + bottom - end - ---- returns true if theres a collision at that point. also marks collisioned tile as collision true -+-- checks if the the reciever would collide with an object if it was positioned at the given point. -+-- also marks collisioned tile as collision true - function Entity:isCollidingAt(x,y,object) - for _, collision in pairs(object) do - if collision.disable then --- -2.35.1 -