diff options
Diffstat (limited to 'src/world.cpp')
-rw-r--r-- | src/world.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/world.cpp b/src/world.cpp index 477432c..223a8bc 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -636,11 +636,13 @@ detect(Player *p) int l; // handle the player - std::thread(&World::singleDetect, this, p).detach(); + singleDetect(p); + //std::thread(&World::singleDetect, this, p).detach(); // handle other entities for (auto &e : entity) - std::thread(&World::singleDetect, this, e).detach(); + singleDetect(e); + //std::thread(&World::singleDetect, this, e).detach(); // handle particles for (auto &part : particles) { @@ -791,6 +793,16 @@ getLastMob(void) return mob.back(); } +std::vector<Entity*> World:: +getMobs(void) +{ + std::vector<Entity*> meme; + for (auto &m : mob) { + meme.push_back(m); + } + return meme; +} + /** * Get the interactable entity that is closest to the entity provided. */ |