summaryrefslogtreecommitdiff
path: root/game/network/link.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-03-10 00:09:41 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-03-10 00:09:41 +0000
commit95c56f9a14d5f1df739ee6790ad9b1359e8b49ca (patch)
tree0633dede8002451c61e386994529c9fd18272566 /game/network/link.h
parentCreate a new loop of test track (diff)
downloadilt-95c56f9a14d5f1df739ee6790ad9b1359e8b49ca.tar.bz2
ilt-95c56f9a14d5f1df739ee6790ad9b1359e8b49ca.tar.xz
ilt-95c56f9a14d5f1df739ee6790ad9b1359e8b49ca.zip
Merge nexts into ends
Diffstat (limited to 'game/network/link.h')
-rw-r--r--game/network/link.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/game/network/link.h b/game/network/link.h
index afb3900..a174275 100644
--- a/game/network/link.h
+++ b/game/network/link.h
@@ -32,7 +32,14 @@ using LinkCPtr = std::shared_ptr<const Link>;
using LinkWPtr = std::weak_ptr<const Link>;
class Link {
public:
- using End = std::pair<NodePtr, float /*dir*/>;
+ using Next = std::pair<LinkWPtr, unsigned char /*end*/>;
+ using Nexts = std::vector<Next>;
+
+ struct End {
+ NodePtr node;
+ float dir;
+ Nexts nexts {};
+ };
Link(End, End, float);
virtual ~Link() = default;
@@ -43,9 +50,6 @@ public:
std::array<End, 2> ends;
float length;
- using Next = std::pair<LinkWPtr, unsigned char /*end*/>;
- using Nexts = std::vector<Next>;
- std::array<Nexts, 2> nexts;
};
bool operator<(const glm::vec3 & a, const glm::vec3 & b);