]> git.localhorst.tv Git - blank.git/blobdiff - src/ai/Spawner.hpp
group entity updates in as few packets as possible
[blank.git] / src / ai / Spawner.hpp
index b36e520f7d38cb7273e33109052bbc6435ea205b..d4c0a57f2c6b345d5749c04aa81ef31a22a0b8ca 100644 (file)
@@ -2,7 +2,7 @@
 #define BLANK_AI_SPAWNER_HPP_
 
 #include "../app/IntervalTimer.hpp"
-#include "../model/EntityModel.hpp"
+#include "../rand/GaloisLFSR.hpp"
 
 #include <vector>
 #include <glm/glm.hpp>
 namespace blank {
 
 class Controller;
+class Entity;
+class Skeletons;
 class World;
 
 class Spawner {
 
 public:
-       explicit Spawner(World &);
+       Spawner(World &, Skeletons &, std::uint64_t seed);
        ~Spawner();
 
        void Update(int dt);
@@ -24,13 +26,14 @@ public:
 private:
        void CheckDespawn() noexcept;
        void TrySpawn();
-       void Spawn(const glm::ivec3 &, const glm::vec3 &);
+       void Spawn(Entity &reference, const glm::ivec3 &, const glm::vec3 &);
 
 private:
        World &world;
+       Skeletons &skeletons;
        std::vector<Controller *> controllers;
 
-       EntityModel models[14];
+       GaloisLFSR random;
 
        IntervalTimer timer;
        float despawn_range;