summaryrefslogtreecommitdiffstats
path: root/src/control/PathFind.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-09-14 19:53:04 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-09-14 19:53:04 +0200
commit57f24ad5336594c3355c83c2571ea373f6167a62 (patch)
treef3ff779ddc0716189677d63dfa9ccbc87d2d29c6 /src/control/PathFind.h
parentMerge remote-tracking branch 'upstream/master' into carctrl_dev (diff)
downloadre3-57f24ad5336594c3355c83c2571ea373f6167a62.tar
re3-57f24ad5336594c3355c83c2571ea373f6167a62.tar.gz
re3-57f24ad5336594c3355c83c2571ea373f6167a62.tar.bz2
re3-57f24ad5336594c3355c83c2571ea373f6167a62.tar.lz
re3-57f24ad5336594c3355c83c2571ea373f6167a62.tar.xz
re3-57f24ad5336594c3355c83c2571ea373f6167a62.tar.zst
re3-57f24ad5336594c3355c83c2571ea373f6167a62.zip
Diffstat (limited to '')
-rw-r--r--src/control/PathFind.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/control/PathFind.h b/src/control/PathFind.h
index d3f89154..91e2e0b1 100644
--- a/src/control/PathFind.h
+++ b/src/control/PathFind.h
@@ -75,6 +75,15 @@ struct CCarPathLink
uint8 bBridgeLights : 1;
// more?
+
+ float OneWayLaneOffset()
+ {
+ if (numLeftLanes == 0)
+ return 0.5f - 0.5f * numRightLanes;
+ if (numRightLanes == 0)
+ return 0.5f - 0.5f * numLeftLanes;
+ return 0.5f;
+ }
};
struct CPathInfoForObject