aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/engine.hpp32
1 files changed, 1 insertions, 31 deletions
diff --git a/include/engine.hpp b/include/engine.hpp
index 112fd3c..5824950 100644
--- a/include/engine.hpp
+++ b/include/engine.hpp
@@ -65,36 +65,6 @@ public:
}
};
-class LockableEntityManager : public entityx::EntityManager {
-private:
- std::atomic_bool locked;
-
-public:
- LockableEntityManager(entityx::EventManager& ev)
- : EntityManager(ev) {
- locked.store(false);
- }
-
- void lock(void) {
- while (locked.load())
- std::this_thread::sleep_for(std::chrono::milliseconds(10));
-
- locked.store(true);
- }
-
- void unlock(void) {
- locked.store(false);
- }
-
- bool try_lock(void) {
- if (locked.load())
- return false;
-
- locked.store(true);
- return true;
- }
-};
-
namespace game {
/**
* Handles all game events.
@@ -104,7 +74,7 @@ namespace game {
/**
* Handles entity data.
*/
- extern LockableEntityManager entities;
+ extern entityx::EntityManager entities;
/**
* An instance of the main game engine.