def onLogoff(self, arg): import BigWorld from gui.WindowsManager import g_windowsManager BigWorld.disconnect() BigWorld.clearEntitiesAndSpaces() g_windowsManager.showLobby()
def _clearEntitiesAndSpaces(): from gui.shared.utils.HangarSpace import g_hangarSpace keepClientOnlySpaces = False if g_hangarSpace is not None and g_hangarSpace.inited: keepClientOnlySpaces = g_hangarSpace.spaceLoading() BigWorld.clearEntitiesAndSpaces(keepClientOnlySpaces) return
def logOff(): from gui.Scaleform.Disconnect import Disconnect Disconnect.hide() BigWorld.disconnect() BigWorld.clearEntitiesAndSpaces() from gui.WindowsManager import g_windowsManager g_windowsManager.showLobby()
def destroy(self): try: LOG_DEBUG('OfflineMapCreator.destroy()') self.__isActive = False BigWorld.worldDrawEnabled(False) BigWorld.setWatcher('Visibility/GUI', True) self.__spaceMappingId = 0 BigWorld.cameraSpaceID(0) BigWorld.camera(None) self.__cam = None BigWorld.clearEntitiesAndSpaces() MapActivities.g_mapActivities.stop() if self.__spaceId and BigWorld.isClientSpace(self.__spaceId): if self.__spaceMappingId: BigWorld.delSpaceGeometryMapping(self.__spaceId, self.__spaceMappingId) BigWorld.clearSpace(self.__spaceId) BigWorld.releaseSpace(self.__spaceId) self.__spaceId = 0 self.__spaceMappingId = 0 self.__arenaTypeID = 0 self.__vEntityId = 0 BigWorld.worldDrawEnabled(True) except: LOG_DEBUG('OfflineMapCreator.destroy(): FAILED with: ') LOG_CURRENT_EXCEPTION() self.cancel() return
def _clearEntitiesAndSpaces(self): from gui.shared.utils.HangarSpace import g_hangarSpace keepClientOnlySpaces = False if g_hangarSpace is not None and g_hangarSpace.inited: keepClientOnlySpaces = g_hangarSpace.spaceLoading() BigWorld.clearEntitiesAndSpaces(keepClientOnlySpaces) return
def disconnect(self): keepClientOnlySpaces = False from gui.shared.utils.HangarSpace import g_hangarSpace if g_hangarSpace is not None and g_hangarSpace.inited: keepClientOnlySpaces = g_hangarSpace.spaceLoading() BigWorld.disconnect() BigWorld.clearEntitiesAndSpaces(keepClientOnlySpaces) if self.isConnected(): self._ConnectionManager__setConnectionStatus(CONNECTION_STATUS.disconnectingInProgress)
def observerStart(self, connectionManager=None, lobbyContext=None): LOG_DEBUG('Observer Start') self.isStarted = True # constants.IS_DEVELOPMENT = True self.lobbyContext.setServerSettings( {'roamingSettings': [0, 0, [], []]}) BigWorld.clearEntitiesAndSpaces() self.connectionManager.onConnected() LOG_DEBUG('createEntity') BigWorld.worldDrawEnabled(False) LOG_DEBUG( BigWorld.createEntity('Avatar', BigWorld.createSpace(), 0, (0, 0, 0), (0, 0, 0), {}))
def fini(): if consts.IS_DEBUG_IMPORTED: debug.fini() BigWorld.clearEntitiesAndSpaces() clearAccount() RSSDownloader.fini() Settings.g_instance.fini() g_windowsManager.destroy() BigWorld.setScreenshotNotifyCallback(None) from account_helpers import ClanEmblemsCache ClanEmblemsCache.g_clanEmblemsCache.close() import BattleReplay BattleReplay.g_replay.destroy() BattleReplay.g_replay = None g_xmppChatHandler.fini() dump_mem_leaks_all() return
def stop(self, rewindToTime = None): if not self.isPlaying and not self.isRecording: return False wasPlaying = self.isPlaying isOffline = self.__replayCtrl.isOfflinePlaybackMode self.__replayCtrl.stop() self.__fileName = None if self.__disableSidePanelContextMenuCb is not None: BigWorld.cancelCallback(self.__disableSidePanelContextMenuCb) self.__disableSidePanelContextMenuCb = None if wasPlaying: if not isOffline: connectionManager.onDisconnected += self.__showLoginPage BigWorld.clearEntitiesAndSpaces() BigWorld.disconnect() if self.__quitAfterStop: BigWorld.quit() elif isOffline: self.__showLoginPage()
def stop(self, rewindToTime=None, delete=False): if not self.isPlaying and not self.isRecording: return False self.onStopped() wasPlaying = self.isPlaying isOffline = self.__replayCtrl.isOfflinePlaybackMode self.__replayCtrl.stop(delete) self.__fileName = None if self.__disableSidePanelContextMenuCb is not None: BigWorld.cancelCallback(self.__disableSidePanelContextMenuCb) self.__disableSidePanelContextMenuCb = None if wasPlaying: if not isOffline: connectionManager.onDisconnected += self.__showLoginPage BigWorld.clearEntitiesAndSpaces() BigWorld.disconnect() if self.__quitAfterStop: BigWorld.quit() elif isOffline: self.__showLoginPage()
def destroy(self): try: LOG_DEBUG('OfflineMapCreator.destroy()') self.__isActive = False BigWorld.worldDrawEnabled(False) BigWorld.setWatcher('Visibility/GUI', True) self.__spaceMappingId = 0 BigWorld.cameraSpaceID(0) BigWorld.camera(None) self.__cam = None BigWorld.clearEntitiesAndSpaces() BigWorld.releaseSpace(self.__spaceId) self.__spaceId = 0 self.__arenaTypeID = 0 accountId = 0 self.__vEntityId = 0 BigWorld.worldDrawEnabled(True) except: LOG_DEBUG('OfflineMapCreator.destroy(): FAILED with: ') LOG_CURRENT_EXCEPTION() self.cancel()
def stop(self, rewindToTime = None, delete = False): if not self.isPlaying and not self.isRecording: return False else: self.onStopped() wasPlaying = self.isPlaying isOffline = self.__replayCtrl.isOfflinePlaybackMode self.__replayCtrl.stop(delete) self.__fileName = None if wasPlaying: if isPlayerAvatar(): BigWorld.player().onVehicleEnterWorld -= self.__onVehicleEnterWorld if not isOffline: connectionManager.onDisconnected += self.__showLoginPage BigWorld.clearEntitiesAndSpaces() BigWorld.disconnect() if self.__quitAfterStop: BigWorld.quit() elif isOffline: self.__showLoginPage() return
def iCallback(): BigWorld.disconnect() BigWorld.clearEntitiesAndSpaces() Waiting.close()
def logOff(): LOG_TRACE('logoff') Disconnect.hide() BigWorld.clearEntitiesAndSpaces() from gui.WindowsManager import g_windowsManager g_windowsManager.showLogin()
def _clearEntitiesAndSpaces(cls): keepClientOnlySpaces = False if cls.hangarSpace is not None and cls.hangarSpace.inited: keepClientOnlySpaces = cls.hangarSpace.spaceLoading() BigWorld.clearEntitiesAndSpaces(keepClientOnlySpaces) return
def logOff(): BigWorld.disconnect() BigWorld.clearEntitiesAndSpaces()