Bazaar developer reference

CvPlot::hasCoastAtSECorner() const

Defined in
CvPlot.cpp, line 5209
Class
CvPlot
Hook name
CivHooks::CvPlot_hasCoastAtSECorner

Hooks

static bool BeforeCvPlot_hasCoastAtSECorner(const CvPlot* self, bool& result);static void AfterCvPlot_hasCoastAtSECorner(const CvPlot* self, bool& result);static bool ReplaceCvPlot_hasCoastAtSECorner(bool (*original)(const CvPlot*), const CvPlot* self);CivRegisterBefore<CivHooks::CvPlot_hasCoastAtSECorner>(host, &BeforeCvPlot_hasCoastAtSECorner);CivRegisterAfter<CivHooks::CvPlot_hasCoastAtSECorner>(host, &AfterCvPlot_hasCoastAtSECorner);CivRegisterReplace<CivHooks::CvPlot_hasCoastAtSECorner>(host, &ReplaceCvPlot_hasCoastAtSECorner);

Code

5209bool CvPlot::hasCoastAtSECorner() const5210{5211	CvPlot* pAdjacentPlot;52125213	if(isWater())5214	{5215		return true;5216	}52175218	pAdjacentPlot = plotDirection(getX(), getY(), DIRECTION_EAST);5219	if(pAdjacentPlot != NULL && pAdjacentPlot->isWater())5220	{5221		return true;5222	}52235224	pAdjacentPlot = plotDirection(getX(), getY(), DIRECTION_SOUTHEAST);5225	if(pAdjacentPlot != NULL && pAdjacentPlot->isWater())5226	{5227		return true;5228	}52295230	return false;5231}

Calls

Called by