diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-11-07 12:41:23 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-11-07 12:41:23 +0100 |
commit | e28a62894f368cccc64932fe83c91f32d7cb7288 (patch) | |
tree | 63588a2791d1fa474327807b9185f864d1e2974e /src/world.cpp | |
parent | 7471347839f30a85e985891b945a721967fcfb86 (diff) |
Hide debug draws by default, start working on selecting.
Diffstat (limited to 'src/world.cpp')
-rw-r--r-- | src/world.cpp | 21 |
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); |