summaryrefslogtreecommitdiffstats
path: root/src/control/PathFind.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-05-10 01:34:21 +0200
committerSergeanur <s.anureev@yandex.ua>2021-06-24 20:32:43 +0200
commit6537dfe7f103161676a8850801383b0d63efd40e (patch)
treef5c7fc57cd126bfcdc27f17076d8c390efa5aa22 /src/control/PathFind.cpp
parentupdate librw (diff)
downloadre3-6537dfe7f103161676a8850801383b0d63efd40e.tar
re3-6537dfe7f103161676a8850801383b0d63efd40e.tar.gz
re3-6537dfe7f103161676a8850801383b0d63efd40e.tar.bz2
re3-6537dfe7f103161676a8850801383b0d63efd40e.tar.lz
re3-6537dfe7f103161676a8850801383b0d63efd40e.tar.xz
re3-6537dfe7f103161676a8850801383b0d63efd40e.tar.zst
re3-6537dfe7f103161676a8850801383b0d63efd40e.zip
Diffstat (limited to '')
-rw-r--r--src/control/PathFind.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/control/PathFind.cpp b/src/control/PathFind.cpp
index 49e43c81..c6407820 100644
--- a/src/control/PathFind.cpp
+++ b/src/control/PathFind.cpp
@@ -201,8 +201,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);
@@ -216,8 +216,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;
}