summaryrefslogtreecommitdiff
path: root/src/path_finder.cpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-11-06 20:17:58 +0000
committerPaweł Redman <pawel.redman@gmail.com>2017-11-06 20:18:31 +0000
commit6ab51bfb002af08da74a693f386c4154d2c4108a (patch)
treeee1954051f88f2cacd6470ab4418bef468b91735 /src/path_finder.cpp
parentbdd1b10cb8d6c405de58031e1de57c7f2b24225f (diff)
More support for cflags.
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]++) {