Bazaar developer reference

CvPlot::getDebugCenterUnit() const

Defined in
CvPlot.cpp, line 10031
Class
CvPlot
Hook name
CivHooks::CvPlot_getDebugCenterUnit

Hooks

static bool BeforeCvPlot_getDebugCenterUnit(const CvPlot* self, const CvUnit*& result);static void AfterCvPlot_getDebugCenterUnit(const CvPlot* self, const CvUnit*& result);static const CvUnit* ReplaceCvPlot_getDebugCenterUnit(const CvUnit* (*original)(const CvPlot*), const CvPlot* self);CivRegisterBefore<CivHooks::CvPlot_getDebugCenterUnit>(host, &BeforeCvPlot_getDebugCenterUnit);CivRegisterAfter<CivHooks::CvPlot_getDebugCenterUnit>(host, &AfterCvPlot_getDebugCenterUnit);CivRegisterReplace<CivHooks::CvPlot_getDebugCenterUnit>(host, &ReplaceCvPlot_getDebugCenterUnit);

Code

10031const CvUnit* CvPlot::getDebugCenterUnit() const10032{10033	const CvUnit* pCenterUnit;1003410035	pCenterUnit = getCenterUnit().pointer();1003610037	if(pCenterUnit == NULL)10038	{10039		if(GC.getGame().isDebugMode())10040		{10041			const IDInfo* pUnitNode = headUnitNode();10042			if(pUnitNode == NULL)10043				pCenterUnit = NULL;10044			else10045				pCenterUnit = GetPlayerUnit(*pUnitNode);10046		}10047	}1004810049	return pCenterUnit;10050}

Calls