VOID CObject_Bus::Release(VOID) { RemoveAllPassengers(); ReleaseRenderInterface(); m_nDataID = INVALID_ID; m_pBusData = NULL; m_fvMoveTargetPos = fVector3(-1.f, -1.f, -1.f); m_bMoving = FALSE; m_nCurrentAnimationIndex = -1; CObject_Dynamic::Release(); }
VOID CObject_Bus::UpdateData(VOID) { if(m_pBusData != NULL && m_pBusData->m_nDataID == m_nDataID) return; ReleaseRenderInterface(); m_pBusData = NULL; if(m_nDataID != INVALID_ID) { DBC_DEFINEHANDLE(s_pBusDataDBC, DBC_BUS_DATA); m_pBusData = (const _BUS_INFO*)s_pBusDataDBC->Search_Index_EQU(m_nDataID); } CreateRenderInterface(); }
VOID CObject_Character::Release(VOID) { DeleteObjectCommand(m_pCurrentLogicCommand); m_pCurrentLogicCommand = NULL; CleanupLogicCommandList(); if ( !m_mapImpactEffect.empty() ) { SImpactEffect *pImpactEffect; CImpactEffectMap::iterator itCur, itEnd; itEnd = m_mapImpactEffect.end(); for ( itCur = m_mapImpactEffect.begin(); itCur != itEnd; itCur++ ) { pImpactEffect = (itCur->second); if ( pImpactEffect != NULL ) { delete pImpactEffect; } } m_mapImpactEffect.erase( m_mapImpactEffect.begin(), itEnd ); } //删除逻辑信息 CDataPool::GetMe()->CharacterData_Destroy(this); m_pCharacterData = NULL; //从加载队列中清除 CObjectManager::GetMe()->GetLoadQueue()->ClearTask(GetID()); ReleaseRenderInterface(); ReleaseMountRenderInterface(); if(m_pInfoBoard && CGameProcedure::s_pUISystem) { m_pInfoBoard->Destroy(); m_pInfoBoard = NULL; } m_uTime_LogicEventListTick = 0; //释放声音资源 CGameProcedure::s_pSoundSystem->Source_Destroy(m_pWlakSound); m_pWlakSound = 0; CGameProcedure::s_pSoundSystem->Source_Destroy(m_pLifeAbilitySound); m_pLifeAbilitySound = 0; Disalbe(OSF_RAY_QUERY); m_pCharActionSetFile = NULL; m_pMountActionSetFile = NULL; m_nCharModelID = INVALID_ID; m_nMountModelID = INVALID_ID; m_fMountAddHeight = 0.0F; m_uFightStateTime = 0; m_bDropBox_HaveData = FALSE; m_nDropBox_ItemBoxID = INVALID_ID; m_DropBox_OwnerGUID = INVALID_ID; m_posDropBox_CreatePos = WORLD_POS(-1.f, -1.f); CObject_Dynamic::Release(); }