diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-05-11 15:34:37 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-05-11 15:34:37 +0200 |
| commit | 2f493c24e3771bca9b9ee717cb3d7c18c406678f (patch) | |
| tree | 9613b0ee6e1adf495e1171b399d818b7111565de /src/pathfinding.c | |
| parent | 2f9e8a6033075f68bbed46a66d22712a84b8f678 (diff) | |
map work
Diffstat (limited to 'src/pathfinding.c')
| -rw-r--r-- | src/pathfinding.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pathfinding.c b/src/pathfinding.c index 939adbe..05acad7 100644 --- a/src/pathfinding.c +++ b/src/pathfinding.c @@ -10,6 +10,7 @@ bool can_walk_at(float x, float y) for (int i = 0; i < MAX_OBJECTS; i++) { object o = loaded_map.objects[i]; if (!o.active) continue; + if (!o.collision) continue; if (x >= o.position.x && x < o.position.x + o.size.x && y >= o.position.y && y < o.position.y + o.size.y) return false; } return true; |
