diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-30 19:09:58 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-30 19:09:58 +0200 |
commit | 49a897c3b3371ed59ea314a0359f3ed989f191e9 (patch) | |
tree | c607baa0208324c359f8365409de0eeff687087f | |
parent | roadblocks (diff) | |
download | re3-49a897c3b3371ed59ea314a0359f3ed989f191e9.tar re3-49a897c3b3371ed59ea314a0359f3ed989f191e9.tar.gz re3-49a897c3b3371ed59ea314a0359f3ed989f191e9.tar.bz2 re3-49a897c3b3371ed59ea314a0359f3ed989f191e9.tar.lz re3-49a897c3b3371ed59ea314a0359f3ed989f191e9.tar.xz re3-49a897c3b3371ed59ea314a0359f3ed989f191e9.tar.zst re3-49a897c3b3371ed59ea314a0359f3ed989f191e9.zip |
-rw-r--r-- | src/control/PathFind.h | 2 | ||||
-rw-r--r-- | src/control/RoadBlocks.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/control/PathFind.h b/src/control/PathFind.h index 171a79c5..e481f4c6 100644 --- a/src/control/PathFind.h +++ b/src/control/PathFind.h @@ -88,7 +88,7 @@ struct CPathNode float GetY(void) { return y/8.0f; } float GetZ(void) { return z/8.0f; } bool HasDivider(void) { return width != 0; } - float GetDivider(void) { return width/(2*8.0f); } + float GetDividerWidth(void) { return width/(2*8.0f); } CPathNode *GetPrev(void); CPathNode *GetNext(void); void SetPrev(CPathNode *node); diff --git a/src/control/RoadBlocks.cpp b/src/control/RoadBlocks.cpp index 67847cf9..5d466be2 100644 --- a/src/control/RoadBlocks.cpp +++ b/src/control/RoadBlocks.cpp @@ -131,11 +131,11 @@ CRoadBlocks::GenerateRoadBlocks(void) forward.Normalise(); if (ThePaths.m_pathNodes[node].HasDivider()) { CreateRoadBlockBetween2Points( - ThePaths.m_pathNodes[node].GetPosition() + (length * 0.5f + ThePaths.m_pathNodes[node].GetDivider()) * forward, - ThePaths.m_pathNodes[node].GetPosition() + ThePaths.m_pathNodes[node].GetDivider() * forward); + ThePaths.m_pathNodes[node].GetPosition() + (length * 0.5f + ThePaths.m_pathNodes[node].GetDividerWidth()) * forward, + ThePaths.m_pathNodes[node].GetPosition() + ThePaths.m_pathNodes[node].GetDividerWidth() * forward); CreateRoadBlockBetween2Points( - ThePaths.m_pathNodes[node].GetPosition() - ThePaths.m_pathNodes[node].GetDivider() * forward, - ThePaths.m_pathNodes[node].GetPosition() - (length * 0.5f + ThePaths.m_pathNodes[node].GetDivider()) * forward); + ThePaths.m_pathNodes[node].GetPosition() - ThePaths.m_pathNodes[node].GetDividerWidth() * forward, + ThePaths.m_pathNodes[node].GetPosition() - (length * 0.5f + ThePaths.m_pathNodes[node].GetDividerWidth()) * forward); } else { CreateRoadBlockBetween2Points( |