summaryrefslogtreecommitdiff
path: root/game/network/link.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-02-07 11:32:15 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-07 11:32:15 +0000
commit30e3c9625856c24fa88ec148da6865657414c77d (patch)
tree76050748b6816606254117b02d3a681edeb77666 /game/network/link.h
parentFix up the maths in creating curved rails (diff)
downloadilt-30e3c9625856c24fa88ec148da6865657414c77d.tar.bz2
ilt-30e3c9625856c24fa88ec148da6865657414c77d.tar.xz
ilt-30e3c9625856c24fa88ec148da6865657414c77d.zip
Links have length, ends have entry direction
Diffstat (limited to 'game/network/link.h')
-rw-r--r--game/network/link.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/game/network/link.h b/game/network/link.h
index 0da413c..b22d0d0 100644
--- a/game/network/link.h
+++ b/game/network/link.h
@@ -26,15 +26,15 @@ using NodePtr = std::shared_ptr<Node>;
// it joins 2 nodes
class Link {
public:
- // side determines which edges can be moved to next, must alternate
- using End = std::pair<NodePtr, bool /*side*/>;
+ using End = std::pair<NodePtr, float /*dir*/>;
- Link(End, End);
+ Link(End, End, float);
virtual ~Link() = default;
NO_COPY(Link);
NO_MOVE(Link);
std::array<End, 2> ends;
+ float length;
};
template<typename T> struct PtrSorter {