summaryrefslogtreecommitdiff
path: root/game/vehicles/linkHistory.h
blob: 6944727da52366ab415a98e32c5c867224bfde0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#pragma once

#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};
};