From d0be87d32929c42502fb842aa2b0ab0233313b93 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Tue, 7 Nov 2017 13:50:52 +0100 Subject: Refactoring, introduce text.cpp, closer to an actual game. --- src/world.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/world.cpp') diff --git a/src/world.cpp b/src/world.cpp index 004f03f..ef056db 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -113,7 +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); - if (finder.find()) + if (!finder.find()) return false; finder.export_path(path); @@ -270,6 +270,11 @@ void world_t::debug_point(sf::Vector2f point) printf("sector (%zd, %zd)\n", index[0], index[1]); } +entity_t::entity_t(int type_) +{ + type = type_; +} + void entity_t::link_to_sector(sector_t *sector) { parents.push_back(sector); -- cgit