def __destroy(self):
     LOG_DEBUG('Hangar successfully destroyed.')
     MusicControllerWWISE.unloadCustomSounds()
     if self.__cam == BigWorld.camera():
         self.__cam.spaceID = 0
         BigWorld.camera(None)
         BigWorld.worldDrawEnabled(False)
     self.__cam = None
     self.__loadingStatus = 0.0
     if self.__vAppearance is not None:
         self.__vAppearance.destroy()
         self.__vAppearance = None
     self.__onLoadedCallback = None
     self.__boundingRadius = None
     if self.__waitCallback is not None:
         BigWorld.cancelCallback(self.__waitCallback)
         self.__waitCallback = None
     g_keyEventHandlers.remove(self.handleKeyEvent)
     g_mouseEventHandlers.remove(self.handleMouseEventGlobal)
     BigWorld.SetDrawInflux(False)
     MapActivities.g_mapActivities.stop()
     if self.__spaceId is not None and BigWorld.isClientSpace(self.__spaceId):
         if self.__spaceMappingId is not None:
             BigWorld.delSpaceGeometryMapping(self.__spaceId, self.__spaceMappingId)
         BigWorld.clearSpace(self.__spaceId)
         BigWorld.releaseSpace(self.__spaceId)
     self.__spaceMappingId = None
     self.__spaceId = None
     self.__vEntityId = None
     BigWorld.wg_disableSpecialFPSMode()
     g_postProcessing.disable()
     FovExtended.instance().resetFov()
     return
 def __onSpaceDestroy(self, inited):
     if inited:
         g_mouseEventHandlers.remove(self.__handleMouseEvent)
         g_keyEventHandlers.remove(self.__handleKeyEvent)
         g_eventBus.removeListener(
             CameraRelatedEvents.LOBBY_VIEW_MOUSE_MOVE,
             self.__handleLobbyViewMouseEvent)
 def __destroy(self):
     LOG_DEBUG('Hangar successfully destroyed.')
     if self.__cam == BigWorld.camera():
         self.__cam.spaceID = 0
         BigWorld.camera(None)
         BigWorld.worldDrawEnabled(False)
     self.__cam = None
     self.__loadingStatus = 0.0
     if self.__vAppearance is not None:
         self.__vAppearance.destroy()
         self.__vAppearance = None
     self.__onLoadedCallback = None
     self.__boundingRadius = None
     g_keyEventHandlers.remove(self.handleKeyEvent)
     g_mouseEventHandlers.remove(self.handleMouseEventGlobal)
     entity = None if self.__vEntityId is None else BigWorld.entity(self.__vEntityId)
     BigWorld.SetDrawInflux(False)
     MapActivities.g_mapActivities.stop()
     if self.__spaceId is not None and BigWorld.isClientSpace(self.__spaceId):
         if self.__spaceMappingId is not None:
             BigWorld.delSpaceGeometryMapping(self.__spaceId, self.__spaceMappingId)
         BigWorld.clearSpace(self.__spaceId)
         BigWorld.releaseSpace(self.__spaceId)
     self.__spaceMappingId = None
     self.__spaceId = None
     if entity is None or not entity.inWorld:
         return
     BigWorld.destroyEntity(self.__vEntityId)
     self.__vEntityId = None
     BigWorld.wg_disableSpecialFPSMode()
     g_postProcessing.disable()