summaryrefslogtreecommitdiff
path: root/game/vehicles/linkHistory.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/vehicles/linkHistory.h')
-rw-r--r--game/vehicles/linkHistory.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/game/vehicles/linkHistory.h b/game/vehicles/linkHistory.h
new file mode 100644
index 0000000..31d0023
--- /dev/null
+++ b/game/vehicles/linkHistory.h
@@ -0,0 +1,21 @@
+#ifndef LINKHISTORY_H
+#define LINKHISTORY_H
+
+#include <game/network/link.h>
+#include <utility>
+#include <vector>
+
+class LinkHistory {
+public:
+ using WEntry = std::pair<LinkWPtr, unsigned char /*dir*/>;
+ using Entry = std::pair<LinkCPtr, unsigned char /*dir*/>;
+ Entry add(const LinkWPtr &, unsigned char);
+ [[nodiscard]] Entry getCurrent() const;
+ [[nodiscard]] Entry getAt(float, float *) const;
+
+private:
+ std::vector<WEntry> links;
+ float totalLen {0.F};
+};
+
+#endif