diff --git a/data/scripts/entities/player.lua b/data/scripts/entities/player.lua index e490357..7d01d6e 100644 --- a/data/scripts/entities/player.lua +++ b/data/scripts/entities/player.lua @@ -194,9 +194,12 @@ function Player:DoPhysics() if self.isHooked then local hook = Vector(self.pos.x, self.pos.y, self.hookAnchor.x, self.hookAnchor.y) if GetVectorValue(hook) > self.hookedDistance then + self.canFall = false local hook_angle = GetAngleFromVector(hook[1],hook[2]) - self.pos.x = self.hookAnchor.x + self.hookedDistance * math.cos(-math.rad(180)+hook_angle) - self.pos.y = self.hookAnchor.y + self.hookedDistance * math.sin(-math.rad(180)+hook_angle) + --pos_x = self.hookAnchor.x + self.hookedDistance * math.cos(-math.rad(180)+hook_angle) + ((gravity ^ 2)/2) * math.sin(hook_angle) + --pos_y = self.hookAnchor.y + self.hookedDistance * math.sin(-math.rad(180)+hook_angle) + ((gravity ^ 2)/2) * math.cos(hook_angle) + self.vel.x = self.vel.x + gravity * (-math.sin(hook_angle)) + self.vel.y = self.vel.y + gravity * math.cos(hook_angle) end end