Bazaar developer reference

CvPromotionEntry::GetFeatureDoubleMove(int) const

Defined in
CvPromotionClasses.cpp, line 1954
Class
CvPromotionEntry
Hook name
CivHooks::CvPromotionEntry_GetFeatureDoubleMove

Hooks

static bool BeforeCvPromotionEntry_GetFeatureDoubleMove(const CvPromotionEntry* self, int i, bool& result);static void AfterCvPromotionEntry_GetFeatureDoubleMove(const CvPromotionEntry* self, int i, bool& result);static bool ReplaceCvPromotionEntry_GetFeatureDoubleMove(bool (*original)(const CvPromotionEntry*, int), const CvPromotionEntry* self, int i);CivRegisterBefore<CivHooks::CvPromotionEntry_GetFeatureDoubleMove>(host, &BeforeCvPromotionEntry_GetFeatureDoubleMove);CivRegisterAfter<CivHooks::CvPromotionEntry_GetFeatureDoubleMove>(host, &AfterCvPromotionEntry_GetFeatureDoubleMove);CivRegisterReplace<CivHooks::CvPromotionEntry_GetFeatureDoubleMove>(host, &ReplaceCvPromotionEntry_GetFeatureDoubleMove);

Code

1953/// Returns an array that indicates if a unit can move twice in a type of terrain feature1954bool CvPromotionEntry::GetFeatureDoubleMove(int i) const1955{1956	CvAssertMsg(i < GC.getNumFeatureInfos(), "Index out of bounds");1957	CvAssertMsg(i > -1, "Index out of bounds");19581959	if(i > -1 && i < GC.getNumFeatureInfos() && m_pbFeatureDoubleMove)1960	{1961		return m_pbFeatureDoubleMove[i];1962	}19631964	return false;1965}

Calls

Called by