diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/phys.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/phys.lua b/src/phys.lua index 126b5a8..d35f612 100644 --- a/src/phys.lua +++ b/src/phys.lua @@ -89,7 +89,7 @@ function phys.Box:touching_vertical() end function phys.Box:touching() - return self.touchx ~= 0 and self.touchy ~= 0 + return self.touchx ~= 0 or self.touchy ~= 0 end function phys.Box:get_rect() @@ -148,7 +148,7 @@ function phys.Box:update(velx, vely, dt) before = self.y self.y = self.y + vely * dt * p if collision_check(self) then - self.touchy = velx > 0 and 1 or -1 + self.touchy = vely > 0 and 1 or -1 vely = 0 self.y = before end |
