summaryrefslogtreecommitdiffstats
path: root/src/control/PathFind.cpp
diff options
context:
space:
mode:
authorsaml1er <danishroar@gmail.com>2020-04-14 14:05:51 +0200
committersaml1er <danishroar@gmail.com>2020-04-14 14:05:51 +0200
commitbf040c7cd1c336af160d8672324b3029f5ba7cc3 (patch)
tree2604f91c87d92565e92a2461c76e6633558a4907 /src/control/PathFind.cpp
parentRefactor CPedPath::CalcPedRoute (diff)
downloadre3-bf040c7cd1c336af160d8672324b3029f5ba7cc3.tar
re3-bf040c7cd1c336af160d8672324b3029f5ba7cc3.tar.gz
re3-bf040c7cd1c336af160d8672324b3029f5ba7cc3.tar.bz2
re3-bf040c7cd1c336af160d8672324b3029f5ba7cc3.tar.lz
re3-bf040c7cd1c336af160d8672324b3029f5ba7cc3.tar.xz
re3-bf040c7cd1c336af160d8672324b3029f5ba7cc3.tar.zst
re3-bf040c7cd1c336af160d8672324b3029f5ba7cc3.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 f0431db9..ea81b9b7 100644
--- a/src/control/PathFind.cpp
+++ b/src/control/PathFind.cpp
@@ -136,8 +136,8 @@ CPedPath::CalcPedRoute(int8 pathType, CVector position, CVector destination, CVe
else if (nodeIdX < 39 && nodeIdY < 39 && pathNodes[nodeIdX + 1][nodeIdY + 1].id + 7 == pPathNode->id)
pPathNode = &pathNodes[nodeIdX + 1][nodeIdY + 1];
pointPoses[*pointsFound] = vecSectorStartPos;
- pointPoses[*pointsFound].x += (float)pPathNode->nodeIdX * 0.7f;
- pointPoses[*pointsFound].y += (float)pPathNode->nodeIdY * 0.7f;
+ pointPoses[*pointsFound].x += pPathNode->nodeIdX * 0.7f;
+ pointPoses[*pointsFound].y += pPathNode->nodeIdY * 0.7f;
}
return true;
}
@@ -203,10 +203,10 @@ CPedPath::AddBlockade(CEntity *pEntity, CPedPathNode(*pathNodes)[40], CVector *p
vecBoundCentre.x - fBoundRadius <= pPosition->x + 28.0f &&
vecBoundCentre.y - fBoundRadius <= pPosition->y + 28.0f) {
for (int16 x = 0; x < 40; x++) {
- const float pointX = (float)x * 0.7f + fDistanceX;
+ const float pointX = x * 0.7f + fDistanceX;
for (int16 y = 0; y < 40; y++) {
if (!pathNodes[x][y].bBlockade) {
- const float pointY = (float)y * 0.7f + fDistanceY;
+ 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());