OrionVeteran
Deity
I'm attempting to convert a Python function to SDK. The function compiles OK, but the game hangs, like it's stuck in a never ending loop. Can someone examine this code and recommend any improvements?
Spoiler :
Code:
/************************************************************************************************/
/* Mine Warfare MOD Start OrionVeteran */
/************************************************************************************************/
bool CvCity::isInteriorCity() const
{
CvPlot* pCityPlot = plot();
CvPlot* pLoopPlot;
int iI, iDist;
PlayerTypes eOwner = getOwnerINLINE();
bool bFoundBorderCity = false;
for (iI = 0; iI < GC.getMapINLINE().numPlotsINLINE(); iI++)
{
pLoopPlot = GC.getMapINLINE().plotByIndexINLINE(iI);
iDist = GC.getMapINLINE().calculatePathDistance(pCityPlot, pLoopPlot);
if (iDist < 6)
{
if (pLoopPlot != NULL)
{
if (!pLoopPlot->isCity())
{
if (!pLoopPlot->isImpassable())
{
//If pLoopPlot is unowned or is not owned by the City owner
if (!(pLoopPlot->isOwned()) || (pLoopPlot->getOwnerINLINE() != eOwner))
{
bFoundBorderCity = true;
break;
}
}
}
}
}
}
if (!bFoundBorderCity)
{
return true;
}
return false;
}
/************************************************************************************************/
/* Mine Warfare MOD End OrionVeteran */
/************************************************************************************************/