From a7c17a329a569fa389b6ea0d314dda4716883860 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Thu, 7 May 2020 00:27:10 +0300 Subject: fixed lane offset --- src/control/PathFind.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/control/PathFind.h b/src/control/PathFind.h index a83f97ae..51bdbd7f 100644 --- a/src/control/PathFind.h +++ b/src/control/PathFind.h @@ -119,6 +119,7 @@ struct CCarPathLink float GetY(void) { return y/8.0f; } float GetDirX(void) { return dirX/100.0f; } float GetDirY(void) { return dirY/100.0f; } + float GetLaneOffset(void) { return width/80.0f; } float OneWayLaneOffset() { @@ -126,7 +127,7 @@ struct CCarPathLink return 0.5f - 0.5f * numRightLanes; if (numRightLanes == 0) return 0.5f - 0.5f * numLeftLanes; - return 0.5f; + return 0.5f + GetLaneOffset(); } }; -- cgit v1.2.3