diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-05-10 01:48:56 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-05-10 01:48:56 +0200 |
commit | 8f54093de1616d3a92ec39ad4e77e84d11d838cb (patch) | |
tree | 3ca9f2943e845953e38a1ea258766cb247cf8217 /src/control/PathFind.cpp | |
parent | Merge remote-tracking branch 'origin/miami' into lcs (diff) | |
parent | fix (diff) | |
download | re3-8f54093de1616d3a92ec39ad4e77e84d11d838cb.tar re3-8f54093de1616d3a92ec39ad4e77e84d11d838cb.tar.gz re3-8f54093de1616d3a92ec39ad4e77e84d11d838cb.tar.bz2 re3-8f54093de1616d3a92ec39ad4e77e84d11d838cb.tar.lz re3-8f54093de1616d3a92ec39ad4e77e84d11d838cb.tar.xz re3-8f54093de1616d3a92ec39ad4e77e84d11d838cb.tar.zst re3-8f54093de1616d3a92ec39ad4e77e84d11d838cb.zip |
Diffstat (limited to 'src/control/PathFind.cpp')
-rw-r--r-- | src/control/PathFind.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/control/PathFind.cpp b/src/control/PathFind.cpp index 3d18eb0d..f9d58687 100644 --- a/src/control/PathFind.cpp +++ b/src/control/PathFind.cpp @@ -200,8 +200,8 @@ CPedPath::AddBlockade(CEntity *pEntity, CPedPathNode(*pathNodes)[40], CVector *p const float fBoundMaxY = boundingBox.max.y + 0.3f; const float fBoundMinY = boundingBox.min.y - 0.3f; const float fBoundMaxX = boundingBox.max.x + 0.3f; - const float fDistanceX = pPosition->x - pEntity->m_matrix.GetPosition().x; - const float fDistanceY = pPosition->y - pEntity->m_matrix.GetPosition().y; + const float fDistanceX = pPosition->x - pEntity->GetMatrix().GetPosition().x; + const float fDistanceY = pPosition->y - pEntity->GetMatrix().GetPosition().y; const float fBoundRadius = pEntity->GetBoundRadius(); CVector vecBoundCentre; pEntity->GetBoundCentre(vecBoundCentre); @@ -215,8 +215,8 @@ CPedPath::AddBlockade(CEntity *pEntity, CPedPathNode(*pathNodes)[40], CVector *p if (!pathNodes[x][y].bBlockade) { const float pointY = y * 0.7f + fDistanceY; CVector2D point(pointX, pointY); - if (fBoundMaxX > Abs(DotProduct2D(point, pEntity->m_matrix.GetRight()))) { - float fDotProduct = DotProduct2D(point, pEntity->m_matrix.GetForward()); + if (fBoundMaxX > Abs(DotProduct2D(point, pEntity->GetMatrix().GetRight()))) { + float fDotProduct = DotProduct2D(point, pEntity->GetMatrix().GetForward()); if (fBoundMaxY > fDotProduct && fBoundMinY < fDotProduct) pathNodes[x][y].bBlockade = true; } |