diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-05-10 01:34:21 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-05-10 01:45:04 +0200 |
commit | 3dda658e4296c0b009f0670d6a9c6d2da2878569 (patch) | |
tree | 42fd6704034e4ebb218a0b23a5fe727f58822a07 /src/control/PathFind.cpp | |
parent | Small Acos fix (diff) | |
download | re3-3dda658e4296c0b009f0670d6a9c6d2da2878569.tar re3-3dda658e4296c0b009f0670d6a9c6d2da2878569.tar.gz re3-3dda658e4296c0b009f0670d6a9c6d2da2878569.tar.bz2 re3-3dda658e4296c0b009f0670d6a9c6d2da2878569.tar.lz re3-3dda658e4296c0b009f0670d6a9c6d2da2878569.tar.xz re3-3dda658e4296c0b009f0670d6a9c6d2da2878569.tar.zst re3-3dda658e4296c0b009f0670d6a9c6d2da2878569.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 bf72199d..80d40b45 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; } |