From e28a62894f368cccc64932fe83c91f32d7cb7288 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Tue, 7 Nov 2017 12:41:23 +0100 Subject: Hide debug draws by default, start working on selecting. --- src/world.cpp | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'src/world.cpp') 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); -- cgit