From 6ab51bfb002af08da74a693f386c4154d2c4108a Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Mon, 6 Nov 2017 20:17:58 +0000 Subject: More support for cflags. --- src/path_finder.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/path_finder.cpp') 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 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]++) { -- cgit