]> git.localhorst.tv Git - blank.git/blobdiff - src/ai/RandomWalk.hpp
group entity updates in as few packets as possible
[blank.git] / src / ai / RandomWalk.hpp
index a25d4db502bedf56ca98affa5997ff89646185cf..8a0a19da51aaa898499d5cdba4202075bed5797f 100644 (file)
@@ -3,6 +3,10 @@
 
 #include "Controller.hpp"
 
+#include "../rand/GaloisLFSR.hpp"
+
+#include <glm/glm.hpp>
+
 
 namespace blank {
 
@@ -11,13 +15,26 @@ class RandomWalk
 : public Controller {
 
 public:
-       explicit RandomWalk(Entity &) noexcept;
+       RandomWalk(Entity &, std::uint64_t seed) noexcept;
        ~RandomWalk();
 
        void Update(int dt) override;
 
 private:
-       int time_left;
+       void Change() noexcept;
+
+private:
+       GaloisLFSR random;
+
+       glm::vec3 start_vel;
+       glm::vec3 target_vel;
+
+       glm::vec3 start_rot;
+       glm::vec3 target_rot;
+
+       int switch_time;
+       float lerp_max;
+       float lerp_time;
 
 };