summaryrefslogtreecommitdiff
path: root/src/world.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/world.cpp b/src/world.cpp
index 2339dbf..004f03f 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -86,7 +86,6 @@ bool world_t::find_path(v2f_t src, v2f_t dst, cmodel_t *cmodel, entity_t *ignore
path_finder_t finder;
rectf_t bounds;
v2f_t cmodel_dims;
- bool found;
finder.setup_nodes(src, dst, cmodel->cflags);
@@ -114,25 +113,7 @@ bool world_t::find_path(v2f_t src, v2f_t dst, cmodel_t *cmodel, entity_t *ignore
if (ent != ignore)
finder.eliminate_nodes(ent->cmodel.bounds);
- found = finder.find();
-
- debug.clear();
-
- for (size_t y = 0; y < finder.height; y++)
- for (size_t x = 0; x < finder.width; x++) {
- path_node_t *node = finder.nodes + y * finder.width + x;
- std::stringstream ss;
-
- ss << finder.base + tile_index_t(x, y) << "\n";
- if (node->accessible)
- ss << node->dist;
- else
- ss << "inaccessible";
-
- debug.push_back((debug_t){finder.base + tile_index_t(x, y), ss.str()});
- }
-
- if (!found)
+ if (finder.find())
return false;
finder.export_path(path);