aboutsummaryrefslogtreecommitdiff
path: root/src/player.zig
diff options
context:
space:
mode:
authortslil clingman <>2021-10-15 17:11:06 -0400
committertslil clingman <>2021-10-15 17:11:06 -0400
commit61856ed5407a227aab35d7b800daad883c265dd9 (patch)
treea864bf8f06835fa6b1723f9d1271864d5ec4721b /src/player.zig
parentb45b9388cfd96fa5e89ea11db99ee11a1c95386a (diff)
Well, there's no reason not to do this ... Multiple polygon layers!
Diffstat (limited to 'src/player.zig')
-rw-r--r--src/player.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/player.zig b/src/player.zig
index 258b924..eef41a7 100644
--- a/src/player.zig
+++ b/src/player.zig
@@ -65,9 +65,9 @@ pub const Player = struct {
if (!map.inBounds(nix, iy) or
blk: {
- const cell = map.lookup(nix, iy);
- if (cell.floor_height > 0) break :blk true;
- if (cell.ceiling_height < self.height) break :blk true;
+ // const cell = map.lookup(nix, iy);
+ // if (cell.floor_height > 0) break :blk true;
+ // if (cell.ceiling_height < self.height) break :blk true;
break :blk false;
}) {
next_x = fx + if (self.vel_x > 0) 1 - min_dist else min_dist;
@@ -75,7 +75,7 @@ pub const Player = struct {
self.acc_x = 0;
}
- if (!map.inBounds(ix, niy) or map.lookup(ix, niy).floor_height > 0) {
+ if (!map.inBounds(ix, niy)) { // or map.lookup(ix, niy).floor_height > 0
next_y = fy + if (self.vel_y > 0) 1 - min_dist else min_dist;
self.vel_y = 0;
self.acc_y = 0;