Bazaar developer reference

CvIgnoreUnitsPathFinder::DoesPathExist(CvUnit &, CvPlot *, CvPlot *)

Defined in
CvAStar.cpp, line 3064
Class
CvIgnoreUnitsPathFinder
Hook name
CivHooks::CvIgnoreUnitsPathFinder_DoesPathExist

Hooks

static bool BeforeCvIgnoreUnitsPathFinder_DoesPathExist(CvIgnoreUnitsPathFinder* self, CvUnit& unit, CvPlot* pStartPlot, CvPlot* pEndPlot, bool& result);static void AfterCvIgnoreUnitsPathFinder_DoesPathExist(CvIgnoreUnitsPathFinder* self, CvUnit& unit, CvPlot* pStartPlot, CvPlot* pEndPlot, bool& result);static bool ReplaceCvIgnoreUnitsPathFinder_DoesPathExist(bool (*original)(CvIgnoreUnitsPathFinder*, CvUnit&, CvPlot*, CvPlot*), CvIgnoreUnitsPathFinder* self, CvUnit& unit, CvPlot* pStartPlot, CvPlot* pEndPlot);CivRegisterBefore<CivHooks::CvIgnoreUnitsPathFinder_DoesPathExist>(host, &BeforeCvIgnoreUnitsPathFinder_DoesPathExist);CivRegisterAfter<CivHooks::CvIgnoreUnitsPathFinder_DoesPathExist>(host, &AfterCvIgnoreUnitsPathFinder_DoesPathExist);CivRegisterReplace<CivHooks::CvIgnoreUnitsPathFinder_DoesPathExist>(host, &ReplaceCvIgnoreUnitsPathFinder_DoesPathExist);

Code

3063/// Check for existence of step path between two points3064bool CvIgnoreUnitsPathFinder::DoesPathExist(CvUnit& unit, CvPlot* pStartPlot, CvPlot* pEndPlot)3065{3066	m_pCurNode = NULL;30673068	if(pStartPlot == NULL || pEndPlot == NULL)3069	{3070		return false;3071	}30723073	SetData(&unit);3074	return GeneratePath(pStartPlot->getX(), pStartPlot->getY(), pEndPlot->getX(), pEndPlot->getY(), 0, true /*bReuse*/);3075}

Calls

Called by