Bazaar developer reference

CvIgnoreUnitsPathFinder::GetLastPlot()

Defined in
CvAStar.cpp, line 3187
Class
CvIgnoreUnitsPathFinder
Hook name
CivHooks::CvIgnoreUnitsPathFinder_GetLastPlot

Hooks

static bool BeforeCvIgnoreUnitsPathFinder_GetLastPlot(CvIgnoreUnitsPathFinder* self, CvPlot*& result);static void AfterCvIgnoreUnitsPathFinder_GetLastPlot(CvIgnoreUnitsPathFinder* self, CvPlot*& result);static CvPlot* ReplaceCvIgnoreUnitsPathFinder_GetLastPlot(CvPlot* (*original)(CvIgnoreUnitsPathFinder*), CvIgnoreUnitsPathFinder* self);CivRegisterBefore<CivHooks::CvIgnoreUnitsPathFinder_GetLastPlot>(host, &BeforeCvIgnoreUnitsPathFinder_GetLastPlot);CivRegisterAfter<CivHooks::CvIgnoreUnitsPathFinder_GetLastPlot>(host, &AfterCvIgnoreUnitsPathFinder_GetLastPlot);CivRegisterReplace<CivHooks::CvIgnoreUnitsPathFinder_GetLastPlot>(host, &ReplaceCvIgnoreUnitsPathFinder_GetLastPlot);

Code

3186/// Get final plot on path [should be used after a call to DoesPathExist()]3187CvPlot* CvIgnoreUnitsPathFinder::GetLastPlot()3188{3189	CvPlot* pPlot = NULL;31903191	CvAStarNode* pNode = GC.getIgnoreUnitsPathFinder().GetLastNode();3192	if(pNode != NULL)3193	{3194		pPlot = GC.getMap().plot(pNode->m_iX, pNode->m_iY);31953196		// Save off node for future calls to GetPreviousPlot()3197		m_pCurNode = pNode;3198	}31993200	return pPlot;3201}

Calls