aboutsummaryrefslogtreecommitdiffstats
path: root/src/world.cpp
diff options
context:
space:
mode:
authordrumsetmonkey <abelleisle@roadrunner.com>2016-05-02 08:46:48 -0400
committerdrumsetmonkey <abelleisle@roadrunner.com>2016-05-02 08:46:48 -0400
commit13cd55136ffd09afd9f4828a00716ed9f94f0e0b (patch)
treed7841da0e6c1b1e4c2c5dc0dd2b492e4fcaeee18 /src/world.cpp
parentc61cbf691bee6dec791c3a161145ae16b448ac2b (diff)
Sword
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.
*/