diff options
author | aap <aap@papnet.eu> | 2020-06-01 10:44:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-01 10:44:33 +0200 |
commit | 6d3e54369ce9ac826ab7c74da4be1c15d3ff3df0 (patch) | |
tree | 5f09d5f4358b1518262068d65ac713993b2cf437 /src/control/PathFind.h | |
parent | Merge branch 'miami' of https://github.com/GTAmodding/re3 into miami (diff) | |
parent | fix (diff) | |
download | re3-6d3e54369ce9ac826ab7c74da4be1c15d3ff3df0.tar re3-6d3e54369ce9ac826ab7c74da4be1c15d3ff3df0.tar.gz re3-6d3e54369ce9ac826ab7c74da4be1c15d3ff3df0.tar.bz2 re3-6d3e54369ce9ac826ab7c74da4be1c15d3ff3df0.tar.lz re3-6d3e54369ce9ac826ab7c74da4be1c15d3ff3df0.tar.xz re3-6d3e54369ce9ac826ab7c74da4be1c15d3ff3df0.tar.zst re3-6d3e54369ce9ac826ab7c74da4be1c15d3ff3df0.zip |
Diffstat (limited to 'src/control/PathFind.h')
-rw-r--r-- | src/control/PathFind.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/control/PathFind.h b/src/control/PathFind.h index 7abc455a..e481f4c6 100644 --- a/src/control/PathFind.h +++ b/src/control/PathFind.h @@ -5,6 +5,8 @@ class CVehicle; class CPtrList; +#define LANE_WIDTH 5.0f + enum { NodeTypeExtern = 1, @@ -85,6 +87,8 @@ struct CPathNode float GetX(void) { return x/8.0f; } float GetY(void) { return y/8.0f; } float GetZ(void) { return z/8.0f; } + bool HasDivider(void) { return width != 0; } + float GetDividerWidth(void) { return width/(2*8.0f); } CPathNode *GetPrev(void); CPathNode *GetNext(void); void SetPrev(CPathNode *node); @@ -120,7 +124,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 GetLaneOffset(void) { return width/(2*8.0f*LANE_WIDTH); } float OneWayLaneOffset() { |