- commit
- 03920ab22fa44fafeea35168858f6c6f8e6e750f
- parent
- 41f992cb1f0982c1ebf0d17c3c3c58db7ae1a2f7
- Author
- Tobias Bengfort <tobias.bengfort@gmx.net>
- Date
- 2014-11-01 10:42
include floor layer in collision check
Diffstat
| M | laneya/map.py | 4 | +++- |
1 files changed, 3 insertions, 1 deletions
diff --git a/laneya/map.py b/laneya/map.py
@@ -110,7 +110,9 @@ class Map(object): 110 110 111 111 def is_collision_free(self, x, y): 112 112 """Check whether a sprite can move to field (x, y)."""113 -1 return self.movable_layer[x][y] is None-1 113 return ( -1 114 self.movable_layer[x][y] is None and -1 115 self.floor_layer[x][y] == 'floor') 114 116 115 117 def move_sprite(self, sprite, dx, dy): 116 118 """Move a sprite."""