From 57f24ad5336594c3355c83c2571ea373f6167a62 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 14 Sep 2019 20:53:04 +0300 Subject: more CCarCtrl --- src/control/PathFind.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/control/PathFind.h') 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 -- cgit v1.2.3