diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2017-11-07 13:50:52 +0100 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2017-11-07 13:52:04 +0100 |
commit | d0be87d32929c42502fb842aa2b0ab0233313b93 (patch) | |
tree | c88b88f63d08cbeaec100eff876676f60ddf78ba /src/world.cpp | |
parent | e28a62894f368cccc64932fe83c91f32d7cb7288 (diff) |
Refactoring, introduce text.cpp, closer to an actual game.
Diffstat (limited to 'src/world.cpp')
-rw-r--r-- | src/world.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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); |