mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
some cleanup
This commit is contained in:
parent
fd5486864a
commit
a473c3f619
@ -66,14 +66,6 @@ namespace MWMechanics
|
|||||||
{
|
{
|
||||||
cellX = cell->mData.mX;
|
cellX = cell->mData.mX;
|
||||||
cellY = cell->mData.mY;
|
cellY = cell->mData.mY;
|
||||||
float xCell = 0;
|
|
||||||
float yCell = 0;
|
|
||||||
|
|
||||||
if(cell->isExterior())
|
|
||||||
{
|
|
||||||
xCell = cell->mData.mX * ESM::Land::REAL_SIZE;
|
|
||||||
yCell = cell->mData.mY * ESM::Land::REAL_SIZE;
|
|
||||||
}
|
|
||||||
|
|
||||||
ESM::Pathgrid::Point dest;
|
ESM::Pathgrid::Point dest;
|
||||||
dest.mX = mX;
|
dest.mX = mX;
|
||||||
|
@ -117,7 +117,7 @@ namespace
|
|||||||
if(current == goal) break;
|
if(current == goal) break;
|
||||||
|
|
||||||
closedset.push_back(current);
|
closedset.push_back(current);
|
||||||
|
|
||||||
for(int j = 0;j<graph[current].edges.size();j++)
|
for(int j = 0;j<graph[current].edges.size();j++)
|
||||||
{
|
{
|
||||||
//int next = graph[current].edges[j].destination
|
//int next = graph[current].edges[j].destination
|
||||||
@ -197,7 +197,7 @@ namespace MWMechanics
|
|||||||
|
|
||||||
void PathFinder::cleanUpAStar()
|
void PathFinder::cleanUpAStar()
|
||||||
{
|
{
|
||||||
for(int i=0;i<mGraph.size();i++)
|
for(int i=0;i<static_cast<int> (mGraph.size());i++)
|
||||||
{
|
{
|
||||||
mGraph[i].parent = -1;
|
mGraph[i].parent = -1;
|
||||||
mGScore[i] = -1;
|
mGScore[i] = -1;
|
||||||
@ -225,8 +225,8 @@ namespace MWMechanics
|
|||||||
if(current == goal) break;
|
if(current == goal) break;
|
||||||
|
|
||||||
closedset.push_back(current);
|
closedset.push_back(current);
|
||||||
|
|
||||||
for(int j = 0;j<mGraph[current].edges.size();j++)
|
for(int j = 0;j<static_cast<int> (mGraph[current].edges.size());j++)
|
||||||
{
|
{
|
||||||
//int next = mGraph[current].edges[j].destination
|
//int next = mGraph[current].edges[j].destination
|
||||||
if(std::find(closedset.begin(),closedset.end(),mGraph[current].edges[j].destination) == closedset.end())
|
if(std::find(closedset.begin(),closedset.end(),mGraph[current].edges[j].destination) == closedset.end())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user