aboutsummaryrefslogtreecommitdiffstats
path: root/src/world.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/world.cpp b/src/world.cpp
index a7c2fdf..0e4fd84 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -637,11 +637,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) {
@@ -786,6 +788,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.
*/