Example #1
1
    def onLogoff(self, arg):
        import BigWorld
        from gui.WindowsManager import g_windowsManager

        BigWorld.disconnect()
        BigWorld.clearEntitiesAndSpaces()
        g_windowsManager.showLobby()
Example #2
0
 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
Example #3
0
 def logOff():
     from gui.Scaleform.Disconnect import Disconnect
     Disconnect.hide()
     BigWorld.disconnect()
     BigWorld.clearEntitiesAndSpaces()
     from gui.WindowsManager import g_windowsManager
     g_windowsManager.showLobby()
Example #4
0
 def logOff():
     from gui.Scaleform.Disconnect import Disconnect
     Disconnect.hide()
     BigWorld.disconnect()
     BigWorld.clearEntitiesAndSpaces()
     from gui.WindowsManager import g_windowsManager
     g_windowsManager.showLobby()
Example #5
0
    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
Example #6
0
 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
Example #7
0
 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), {}))
Example #9
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()
Example #11
0
 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()
Example #12
0
 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()
Example #13
0
 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
Example #14
0
 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
Example #15
0
 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()
Example #16
0
 def iCallback():
     BigWorld.disconnect()
     BigWorld.clearEntitiesAndSpaces()
     Waiting.close()
Example #17
0
 def iCallback():
     BigWorld.disconnect()
     BigWorld.clearEntitiesAndSpaces()
     Waiting.close()
Example #18
0
 def logOff():
     LOG_TRACE('logoff')
     Disconnect.hide()
     BigWorld.clearEntitiesAndSpaces()
     from gui.WindowsManager import g_windowsManager
     g_windowsManager.showLogin()
Example #19
0
 def onLogoff(self, arg):
     import BigWorld
     from gui.WindowsManager import g_windowsManager
     BigWorld.disconnect()
     BigWorld.clearEntitiesAndSpaces()
     g_windowsManager.showLobby()
Example #20
0
 def _clearEntitiesAndSpaces(cls):
     keepClientOnlySpaces = False
     if cls.hangarSpace is not None and cls.hangarSpace.inited:
         keepClientOnlySpaces = cls.hangarSpace.spaceLoading()
     BigWorld.clearEntitiesAndSpaces(keepClientOnlySpaces)
     return
Example #21
0
 def logOff():
     BigWorld.disconnect()
     BigWorld.clearEntitiesAndSpaces()
Example #22
0
 def logOff():
     BigWorld.disconnect()
     BigWorld.clearEntitiesAndSpaces()