Bazaar developer reference

CvMap::maxPlotDistance()

Defined in
CvMap.cpp, line 1090
Class
CvMap
Hook name
CivHooks::CvMap_maxPlotDistance

Hooks

static bool BeforeCvMap_maxPlotDistance(CvMap* self, int& result);static void AfterCvMap_maxPlotDistance(CvMap* self, int& result);static int ReplaceCvMap_maxPlotDistance(int (*original)(CvMap*), CvMap* self);CivRegisterBefore<CivHooks::CvMap_maxPlotDistance>(host, &BeforeCvMap_maxPlotDistance);CivRegisterAfter<CivHooks::CvMap_maxPlotDistance>(host, &AfterCvMap_maxPlotDistance);CivRegisterReplace<CivHooks::CvMap_maxPlotDistance>(host, &ReplaceCvMap_maxPlotDistance);

Code

1090int CvMap::maxPlotDistance()1091{1092	return std::max(1, plotDistance(0, 0, ((isWrapX()) ? (getGridWidth() / 2) : (getGridWidth() - 1)), ((isWrapY()) ? (getGridHeight() / 2) : (getGridHeight() - 1))));1093}

Calls

Called by