Bazaar developer reference

CvPlot::isAdjacentVisible(TeamTypes) const

Defined in
CvPlot.cpp, line 3608
Class
CvPlot
Hook name
CivHooks::CvPlot_isAdjacentVisible_with_TeamTypes_const

Hooks

static bool BeforeCvPlot_isAdjacentVisible_with_TeamTypes_const(const CvPlot* self, TeamTypes eTeam, bool& result);static void AfterCvPlot_isAdjacentVisible_with_TeamTypes_const(const CvPlot* self, TeamTypes eTeam, bool& result);static bool ReplaceCvPlot_isAdjacentVisible_with_TeamTypes_const(bool (*original)(const CvPlot*, TeamTypes), const CvPlot* self, TeamTypes eTeam);CivRegisterBefore<CivHooks::CvPlot_isAdjacentVisible_with_TeamTypes_const>(host, &BeforeCvPlot_isAdjacentVisible_with_TeamTypes_const);CivRegisterAfter<CivHooks::CvPlot_isAdjacentVisible_with_TeamTypes_const>(host, &AfterCvPlot_isAdjacentVisible_with_TeamTypes_const);CivRegisterReplace<CivHooks::CvPlot_isAdjacentVisible_with_TeamTypes_const>(host, &ReplaceCvPlot_isAdjacentVisible_with_TeamTypes_const);

Code

3608bool CvPlot::isAdjacentVisible(TeamTypes eTeam) const3609{3610	CvPlot* pAdjacentPlot;3611	int iI;36123613	for(iI = 0; iI < NUM_DIRECTION_TYPES; ++iI)3614	{3615		pAdjacentPlot = plotDirection(getX(), getY(), ((DirectionTypes)iI));36163617		if(pAdjacentPlot != NULL)3618		{3619			if(pAdjacentPlot->isVisible(eTeam))3620			{3621				return true;3622			}3623		}3624	}36253626	return false;3627}

Calls

Called by