CVTOLVehicleManager::~CVTOLVehicleManager() { Reset(); RegisterVTOLWithPathFollower(false); SAFE_RELEASE(m_pExplosionEffect); CGameRules *pGameRules = g_pGame->GetGameRules(); if (pGameRules) { pGameRules->UnRegisterModuleRMIListener(m_moduleRMIIndex); pGameRules->UnRegisterClientConnectionListener(this); } }
//------------------------------------------------------------------------ CGameRulesHoldObjectiveBase::~CGameRulesHoldObjectiveBase() { CGameRules *pGameRules = g_pGame->GetGameRules(); if (pGameRules) { pGameRules->UnRegisterClientConnectionListener(this); pGameRules->UnRegisterKillListener(this); pGameRules->UnRegisterTeamChangedListener(this); } g_pGame->GetIGameFramework()->UnregisterListener(this); if (gEnv->pMovieSystem && m_bAddedMovieListener) { CryLog("CGameRulesHoldObjectiveBase::CGameRulesHoldObjectiveBase() removing movie listener"); gEnv->pMovieSystem->RemoveMovieListener(NULL, this); } SAFE_RELEASE(m_effectData.pParticleGeomMaterial); SAFE_RELEASE(m_effectData.pParticleEffect); }