forked from mirror/openmw-tes3mp
Use correct type of variable. Remove unnecessary casts.
This commit is contained in:
parent
f942db2b27
commit
0095737c40
1 changed files with 8 additions and 8 deletions
|
@ -313,27 +313,27 @@ namespace MWMechanics
|
||||||
return path; // for some reason couldn't build a path
|
return path; // for some reason couldn't build a path
|
||||||
|
|
||||||
// reconstruct path to return, using world co-ordinates
|
// reconstruct path to return, using world co-ordinates
|
||||||
float xCell = 0;
|
int xCell = 0;
|
||||||
float yCell = 0;
|
int yCell = 0;
|
||||||
if (mIsExterior)
|
if (mIsExterior)
|
||||||
{
|
{
|
||||||
xCell = static_cast<float>(mPathgrid->mData.mX * ESM::Land::REAL_SIZE);
|
xCell = mPathgrid->mData.mX * ESM::Land::REAL_SIZE;
|
||||||
yCell = static_cast<float>(mPathgrid->mData.mY * ESM::Land::REAL_SIZE);
|
yCell = mPathgrid->mData.mY * ESM::Land::REAL_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
while(graphParent[current] != -1)
|
while(graphParent[current] != -1)
|
||||||
{
|
{
|
||||||
ESM::Pathgrid::Point pt = mPathgrid->mPoints[current];
|
ESM::Pathgrid::Point pt = mPathgrid->mPoints[current];
|
||||||
pt.mX += static_cast<int>(xCell);
|
pt.mX += xCell;
|
||||||
pt.mY += static_cast<int>(yCell);
|
pt.mY += yCell;
|
||||||
path.push_front(pt);
|
path.push_front(pt);
|
||||||
current = graphParent[current];
|
current = graphParent[current];
|
||||||
}
|
}
|
||||||
|
|
||||||
// add first node to path explicitly
|
// add first node to path explicitly
|
||||||
ESM::Pathgrid::Point pt = mPathgrid->mPoints[start];
|
ESM::Pathgrid::Point pt = mPathgrid->mPoints[start];
|
||||||
pt.mX += static_cast<int>(xCell);
|
pt.mX += xCell;
|
||||||
pt.mY += static_cast<int>(yCell);
|
pt.mY += yCell;
|
||||||
path.push_front(pt);
|
path.push_front(pt);
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue