CvPlot::seeThroughLevel(bool) const
- Defined in
- CvPlot.cpp, line 1464
- Class
- CvPlot
- Hook name
CivHooks::CvPlot_seeThroughLevel
Hooks
static bool BeforeCvPlot_seeThroughLevel(const CvPlot* self, bool bIncludeShubbery, int& result);static void AfterCvPlot_seeThroughLevel(const CvPlot* self, bool bIncludeShubbery, int& result);static int ReplaceCvPlot_seeThroughLevel(int (*original)(const CvPlot*, bool), const CvPlot* self, bool bIncludeShubbery);CivRegisterBefore<CivHooks::CvPlot_seeThroughLevel>(host, &BeforeCvPlot_seeThroughLevel);CivRegisterAfter<CivHooks::CvPlot_seeThroughLevel>(host, &AfterCvPlot_seeThroughLevel);CivRegisterReplace<CivHooks::CvPlot_seeThroughLevel>(host, &ReplaceCvPlot_seeThroughLevel);
Code
1464int CvPlot::seeThroughLevel(bool bIncludeShubbery) const1465{1466 int iLevel;14671468 CvAssertMsg(getTerrainType() != NO_TERRAIN, "TerrainType is not assigned a valid value");14691470 iLevel = GC.getTerrainInfo(getTerrainType())->getSeeThroughLevel();14711472 if(bIncludeShubbery && getFeatureType() != NO_FEATURE)1473 {1474 iLevel += GC.getFeatureInfo(getFeatureType())->getSeeThroughChange();1475 }14761477 if(isMountain())1478 {1479 iLevel += GC.getMOUNTAIN_SEE_THROUGH_CHANGE();1480 }14811482 if(isHills())1483 {1484 iLevel += GC.getHILLS_SEE_THROUGH_CHANGE();1485 }14861487 if(isWater())1488 {1489 iLevel += GC.getSEAWATER_SEE_THROUGH_CHANGE();1490 }14911492 return iLevel;1493}
Calls
- CvFeatureInfo::getSeeThroughChange() const
- CvGlobals::getFeatureInfo(FeatureTypes)
- CvGlobals::getHILLS_SEE_THROUGH_CHANGE()
- CvGlobals::getMOUNTAIN_SEE_THROUGH_CHANGE()
- CvGlobals::getSEAWATER_SEE_THROUGH_CHANGE()
- CvGlobals::getTerrainInfo(TerrainTypes)
- CvPlot::getFeatureType() const
- CvPlot::getTerrainType() const
- CvPlot::isHills() const
- CvPlot::isMountain() const
- CvPlot::isWater() const
- CvTerrainInfo::getSeeThroughLevel() const
Called by
- CvPlot::changeAdjacentSight(TeamTypes, int, bool, InvisibleTypes, DirectionTypes, CvUnit *)
- CvPlot::changeSeeFromSight(TeamTypes, DirectionTypes, int, bool, InvisibleTypes, CvUnit *)
- CanSeeDisplacementPlot_Loose(int, int, int, int, int)
- CanSeeDisplacementPlot_Strict(int, int, int, int, int)
- CvLuaPlot::lSeeThroughLevel(lua_State *)