Bazaar developer reference

CvPlot::updateCityRoute()

Defined in
CvPlot.cpp, line 7362
Class
CvPlot
Hook name
CivHooks::CvPlot_updateCityRoute

Hooks

static bool BeforeCvPlot_updateCityRoute(CvPlot* self);static void AfterCvPlot_updateCityRoute(CvPlot* self);static void ReplaceCvPlot_updateCityRoute(void (*original)(CvPlot*), CvPlot* self);CivRegisterBefore<CivHooks::CvPlot_updateCityRoute>(host, &BeforeCvPlot_updateCityRoute);CivRegisterAfter<CivHooks::CvPlot_updateCityRoute>(host, &AfterCvPlot_updateCityRoute);CivRegisterReplace<CivHooks::CvPlot_updateCityRoute>(host, &ReplaceCvPlot_updateCityRoute);

Code

7362void CvPlot::updateCityRoute()7363{7364	RouteTypes eCityRoute;73657366	if(isCity())7367	{7368		CvAssertMsg(isOwned(), "isOwned is expected to be true");73697370		eCityRoute = GET_PLAYER(getOwner()).getBestRoute();73717372		if(eCityRoute == NO_ROUTE)7373		{7374			eCityRoute = ((RouteTypes)(GC.getINITIAL_CITY_ROUTE_TYPE()));7375		}73767377		setRouteType(eCityRoute);7378	}7379}

Calls

Called by