summaryrefslogtreecommitdiff
path: root/src/path_finder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/path_finder.cpp')
-rw-r--r--src/path_finder.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/path_finder.cpp b/src/path_finder.cpp
index 3d97df7..aeded09 100644
--- a/src/path_finder.cpp
+++ b/src/path_finder.cpp
@@ -42,16 +42,13 @@ void path_finder_t::setup_nodes(v2f_t src_, v2f_t dst_, cflags_t cflags_)
nodes[i].dist = INFINITY;
}
-void path_finder_t::eliminate_nodes(cmodel_t cmodel)
+void path_finder_t::eliminate_nodes(rectf_t bounds)
{
rect_t<coord_t, 2> index_bounds;
tile_index_t index;
- if (!(cmodel.cflags & cflags))
- return;
-
- index_bounds[0] = tile_index_t(cmodel.bounds[0].floor()) - base;
- index_bounds[1] = tile_index_t(cmodel.bounds[1].ceil()) - base;
+ index_bounds[0] = tile_index_t(bounds[0].floor()) - base;
+ index_bounds[1] = tile_index_t(bounds[1].ceil()) - base;
for (index[1] = index_bounds[0][1]; index[1] <= index_bounds[1][1]; index[1]++)
for (index[0] = index_bounds[0][0]; index[0] <= index_bounds[1][0]; index[0]++) {