Bazaar developer reference

CvPromotionEntry::GetFeatureImpassable(int) const

Defined in
CvPromotionClasses.cpp, line 2026
Class
CvPromotionEntry
Hook name
CivHooks::CvPromotionEntry_GetFeatureImpassable

Hooks

static bool BeforeCvPromotionEntry_GetFeatureImpassable(const CvPromotionEntry* self, int i, bool& result);static void AfterCvPromotionEntry_GetFeatureImpassable(const CvPromotionEntry* self, int i, bool& result);static bool ReplaceCvPromotionEntry_GetFeatureImpassable(bool (*original)(const CvPromotionEntry*, int), const CvPromotionEntry* self, int i);CivRegisterBefore<CivHooks::CvPromotionEntry_GetFeatureImpassable>(host, &BeforeCvPromotionEntry_GetFeatureImpassable);CivRegisterAfter<CivHooks::CvPromotionEntry_GetFeatureImpassable>(host, &AfterCvPromotionEntry_GetFeatureImpassable);CivRegisterReplace<CivHooks::CvPromotionEntry_GetFeatureImpassable>(host, &ReplaceCvPromotionEntry_GetFeatureImpassable);

Code

2025/// Returns an array that indicates what tech is needed to pass through a terrain feature type2026bool CvPromotionEntry::GetFeatureImpassable(int i) const2027{2028	CvAssertMsg(i < GC.getNumFeatureInfos(), "Index out of bounds");2029	CvAssertMsg(i > -1, "Index out of bounds");20302031	if(i > -1 && i < GC.getNumFeatureInfos() && m_pbFeatureImpassable)2032	{2033		return m_pbFeatureImpassable[i];2034	}20352036	return false;2037}

Calls

Called by