Bazaar developer reference

CvPromotionEntry::GetFeatureHalfMove(int) const

Defined in
CvPromotionClasses.cpp, line 1983
Class
CvPromotionEntry
Hook name
CivHooks::CvPromotionEntry_GetFeatureHalfMove

Hooks

static bool BeforeCvPromotionEntry_GetFeatureHalfMove(const CvPromotionEntry* self, int i, bool& result);static void AfterCvPromotionEntry_GetFeatureHalfMove(const CvPromotionEntry* self, int i, bool& result);static bool ReplaceCvPromotionEntry_GetFeatureHalfMove(bool (*original)(const CvPromotionEntry*, int), const CvPromotionEntry* self, int i);CivRegisterBefore<CivHooks::CvPromotionEntry_GetFeatureHalfMove>(host, &BeforeCvPromotionEntry_GetFeatureHalfMove);CivRegisterAfter<CivHooks::CvPromotionEntry_GetFeatureHalfMove>(host, &AfterCvPromotionEntry_GetFeatureHalfMove);CivRegisterReplace<CivHooks::CvPromotionEntry_GetFeatureHalfMove>(host, &ReplaceCvPromotionEntry_GetFeatureHalfMove);

Code

1982/// Returns an array that indicates if a unit can move half as fast in a type of terrain feature1983bool CvPromotionEntry::GetFeatureHalfMove(int i) const1984{1985	CvAssertMsg(i < GC.getNumFeatureInfos(), "Index out of bounds");1986	CvAssertMsg(i > -1, "Index out of bounds");19871988	if(i > -1 && i < GC.getNumFeatureInfos() && m_pbFeatureHalfMove)1989	{1990		return m_pbFeatureHalfMove[i];1991	}19921993	return false;1994}

Calls

Called by