CvUnit::~CvUnit()
- Defined in
- CvUnit.cpp, line 398
- Class
- CvUnit
- Not a hook point
- constructor or destructor
Code
398CvUnit::~CvUnit()399{400 m_thisHandle.ignoreDestruction(true);401 FSerialization::unitsToCheck.erase(this);402 if(!gDLL->GetDone() && GC.IsGraphicsInitialized()) // don't need to remove entity when the app is shutting down, or crash can occur403 {404 auto_ptr<ICvUnit1> pDllUnit(new CvDllUnit(this));405 gDLL->GameplayUnitDestroyed(pDllUnit.get());406 }407408 if (m_iMapLayer != DEFAULT_UNIT_MAP_LAYER)409 GC.getMap().plotManager().RemoveUnit(GetIDInfo(), m_iX, m_iY, m_iMapLayer);410411 uninit();412413 OBJECT_DESTROYED414}
Calls
- CvDllUnit::CvDllUnit(CvUnit *)
- CvGlobals::getDLLIFace()
- CvGlobals::getMap()
- CvGlobals::IsGraphicsInitialized() const
- CvMap::plotManager()
- CvPlotManager::RemoveUnit(const IDInfo &, int, int, uint)
- CvUnit::GetIDInfo() const
- CvUnit::uninit()
FAutoVariable::operator const int &FObjectHandle::ignoreDestructionICvEngineUtility1::GameplayUnitDestroyedICvEngineUtility1::GetDonestd::_Tree::erasestd::auto_ptr::auto_ptrstd::auto_ptr::get