]> git.localhorst.tv Git - blank.git/blobdiff - src/ai/Spawner.hpp
avoid library rand()
[blank.git] / src / ai / Spawner.hpp
index 7b56130f5f090aba00cfe9426637b1aa7d7d4bab..9fb3d368de0dcd2a02156006422526a54a95a53f 100644 (file)
@@ -4,6 +4,7 @@
 #include "../app/IntervalTimer.hpp"
 #include "../model/CompositeModel.hpp"
 #include "../model/EntityModel.hpp"
+#include "../rand/GaloisLFSR.hpp"
 
 #include <vector>
 #include <glm/glm.hpp>
@@ -17,7 +18,7 @@ class World;
 class Spawner {
 
 public:
-       explicit Spawner(World &);
+       Spawner(World &, std::uint64_t seed);
        ~Spawner();
 
        void Update(int dt);
@@ -34,6 +35,8 @@ private:
        EntityModel models[3];
        CompositeModel skeletons[3];
 
+       GaloisLFSR random;
+
        IntervalTimer timer;
        float despawn_range;
        float spawn_distance;