Bazaar developer reference

CvIgnoreUnitsPathFinder::GetPreviousPlot()

Defined in
CvAStar.cpp, line 3205
Class
CvIgnoreUnitsPathFinder
Hook name
CivHooks::CvIgnoreUnitsPathFinder_GetPreviousPlot

Hooks

static bool BeforeCvIgnoreUnitsPathFinder_GetPreviousPlot(CvIgnoreUnitsPathFinder* self, CvPlot*& result);static void AfterCvIgnoreUnitsPathFinder_GetPreviousPlot(CvIgnoreUnitsPathFinder* self, CvPlot*& result);static CvPlot* ReplaceCvIgnoreUnitsPathFinder_GetPreviousPlot(CvPlot* (*original)(CvIgnoreUnitsPathFinder*), CvIgnoreUnitsPathFinder* self);CivRegisterBefore<CivHooks::CvIgnoreUnitsPathFinder_GetPreviousPlot>(host, &BeforeCvIgnoreUnitsPathFinder_GetPreviousPlot);CivRegisterAfter<CivHooks::CvIgnoreUnitsPathFinder_GetPreviousPlot>(host, &AfterCvIgnoreUnitsPathFinder_GetPreviousPlot);CivRegisterReplace<CivHooks::CvIgnoreUnitsPathFinder_GetPreviousPlot>(host, &ReplaceCvIgnoreUnitsPathFinder_GetPreviousPlot);

Code

3204/// Get final plot on path [should be used after a call to DoesPathExist()]3205CvPlot* CvIgnoreUnitsPathFinder::GetPreviousPlot()3206{3207	CvPlot* pPlot = NULL;32083209	if(m_pCurNode != NULL)3210	{3211		m_pCurNode = m_pCurNode->m_pParent;32123213		if(m_pCurNode != NULL)3214		{3215			pPlot = GC.getMap().plot(m_pCurNode->m_iX, m_pCurNode->m_iY);3216		}3217	}32183219	return pPlot;3220}

Calls