CvPlot::updateFog(bool)
- Defined in
- CvPlot.cpp, line 572
- Class
- CvPlot
- Hook name
CivHooks::CvPlot_updateFog
Hooks
static bool BeforeCvPlot_updateFog(CvPlot* self, bool bDefer);static void AfterCvPlot_updateFog(CvPlot* self, bool bDefer);static void ReplaceCvPlot_updateFog(void (*original)(CvPlot*, bool), CvPlot* self, bool bDefer);CivRegisterBefore<CivHooks::CvPlot_updateFog>(host, &BeforeCvPlot_updateFog);CivRegisterAfter<CivHooks::CvPlot_updateFog>(host, &AfterCvPlot_updateFog);CivRegisterReplace<CivHooks::CvPlot_updateFog>(host, &ReplaceCvPlot_updateFog);
Code
571/// The fog state for the plot has changed, send an update message.572void CvPlot::updateFog(bool bDefer)573{574 if(!GC.IsGraphicsInitialized())575 {576 return;577 }578579 FogOfWarModeTypes eFOWMode = GetActiveFogOfWarMode();580581 if(!bDefer)582 {583 gDLL->GameplayFOWChanged(getX(), getY(), eFOWMode, false);584 }585 else586 {587 CvMap::DeferredPlotArray& plotList = GC.getMap().m_vDeferredFogPlots;588 for (CvMap::DeferredPlotArray::const_iterator itr = plotList.begin(); itr != plotList.end(); ++itr)589 {590 if((*itr) == this)591 return; // Already in592 }593 plotList.push_back(this);594 }595}
Calls
BaseVector::beginBaseVector::end- CvGlobals::getDLLIFace()
- CvGlobals::getMap()
- CvGlobals::IsGraphicsInitialized() const
- CvPlot::GetActiveFogOfWarMode() const
- CvPlot::getX() const
- CvPlot::getY() const
FStaticVector::push_backICvEngineUtility1::GameplayFOWChanged