summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-06 23:27:10 +0200
committerGitHub <noreply@github.com>2020-05-06 23:27:10 +0200
commita7c17a329a569fa389b6ea0d314dda4716883860 (patch)
tree7630f56478144bf2f6431f434e831217e2ba48d3
parentwaterlevel with offset (from Fire_Head) (diff)
downloadre3-a7c17a329a569fa389b6ea0d314dda4716883860.tar
re3-a7c17a329a569fa389b6ea0d314dda4716883860.tar.gz
re3-a7c17a329a569fa389b6ea0d314dda4716883860.tar.bz2
re3-a7c17a329a569fa389b6ea0d314dda4716883860.tar.lz
re3-a7c17a329a569fa389b6ea0d314dda4716883860.tar.xz
re3-a7c17a329a569fa389b6ea0d314dda4716883860.tar.zst
re3-a7c17a329a569fa389b6ea0d314dda4716883860.zip
-rw-r--r--src/control/PathFind.h3
1 files changed, 2 insertions, 1 deletions
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();
}
};