Пример #1
0
def fini():
    global g_scenario
    LOG_DEBUG('fini')
    if OfflineMode.enabled():
        return
    else:
        BigWorld.wg_setScreenshotNotifyCallback(None)
        if g_postProcessing is None:
            return
        g_critMemHandler.restore()
        g_critMemHandler.destroy()
        if constants.IS_CAT_LOADED:
            import Cat
            Cat.fini()
        MusicControllerWWISE.destroy()
        if RSSDownloader.g_downloader is not None:
            RSSDownloader.g_downloader.destroy()
        connectionManager.onConnected -= onConnected
        connectionManager.onDisconnected -= onDisconnected
        MessengerEntry.g_instance.fini()
        g_postProcessing.fini()
        from helpers import EdgeDetectColorController
        if EdgeDetectColorController.g_instance is not None:
            EdgeDetectColorController.g_instance.destroy()
            EdgeDetectColorController.g_instance = None
        BigWorld.resetEntityManager(False, False)
        BigWorld.clearAllSpaces()
        if TriggersManager.g_manager is not None:
            TriggersManager.g_manager.destroy()
            TriggersManager.g_manager = None
        gui_personality.fini()
        tutorialLoaderFini()
        import LcdKeyboard
        LcdKeyboard.finalize()
        import Vibroeffects
        if Vibroeffects.VibroManager.g_instance is not None:
            Vibroeffects.VibroManager.g_instance.destroy()
            Vibroeffects.VibroManager.g_instance = None
        if g_replayCtrl is not None:
            g_replayCtrl.destroy()
        from LightFx import LightManager
        if LightManager.g_instance is not None:
            LightManager.g_instance.destroy()
            LightManager.g_instance = None
        import AuxiliaryFx
        if AuxiliaryFx.g_instance is not None:
            AuxiliaryFx.g_instance.destroy()
            AuxiliaryFx.g_instance = None
        from predefined_hosts import g_preDefinedHosts
        if g_preDefinedHosts is not None:
            g_preDefinedHosts.fini()
        voipRespHandler = VOIP.getVOIPManager()
        if voipRespHandler is not None:
            VOIP.getVOIPManager().destroy()
        import SoundGroups
        SoundGroups.g_instance.destroy()
        Settings.g_instance.save()
        if g_scenario is not None:
            g_scenario.fini()
        return
Пример #2
0
def fini():
    global g_scenario
    LOG_DEBUG('fini')
    if OfflineMode.enabled():
        return
    else:
        BigWorld.wg_setScreenshotNotifyCallback(None)
        if g_postProcessing is None:
            return
        g_critMemHandler.restore()
        g_critMemHandler.destroy()
        if constants.IS_CAT_LOADED:
            import Cat
            Cat.fini()
        MusicControllerWWISE.destroy()
        if RSSDownloader.g_downloader is not None:
            RSSDownloader.g_downloader.destroy()
        connectionManager.onConnected -= onConnected
        connectionManager.onDisconnected -= onDisconnected
        MessengerEntry.g_instance.fini()
        g_postProcessing.fini()
        from helpers import EdgeDetectColorController
        if EdgeDetectColorController.g_instance is not None:
            EdgeDetectColorController.g_instance.destroy()
            EdgeDetectColorController.g_instance = None
        BigWorld.resetEntityManager(False, False)
        BigWorld.clearAllSpaces()
        if TriggersManager.g_manager is not None:
            TriggersManager.g_manager.destroy()
            TriggersManager.g_manager = None
        gui_personality.fini()
        tutorialLoaderFini()
        import LcdKeyboard
        LcdKeyboard.finalize()
        import Vibroeffects
        if Vibroeffects.VibroManager.g_instance is not None:
            Vibroeffects.VibroManager.g_instance.destroy()
            Vibroeffects.VibroManager.g_instance = None
        if g_replayCtrl is not None:
            g_replayCtrl.destroy()
        from LightFx import LightManager
        if LightManager.g_instance is not None:
            LightManager.g_instance.destroy()
            LightManager.g_instance = None
        import AuxiliaryFx
        if AuxiliaryFx.g_instance is not None:
            AuxiliaryFx.g_instance.destroy()
            AuxiliaryFx.g_instance = None
        from predefined_hosts import g_preDefinedHosts
        if g_preDefinedHosts is not None:
            g_preDefinedHosts.fini()
        voipRespHandler = VOIP.getVOIPManager()
        if voipRespHandler is not None:
            VOIP.getVOIPManager().destroy()
        import SoundGroups
        SoundGroups.g_instance.destroy()
        Settings.g_instance.save()
        if g_scenario is not None:
            g_scenario.fini()
        return
Пример #3
0
def fini():
    global g_replayCtrl
    global g_onBeforeSendEvent
    global g_scenario
    LOG_DEBUG('fini')
    if OfflineMode.enabled():
        dependency.clear()
        return
    elif LightingGenerationMode.enabled():
        return
    else:
        BigWorld.wg_setScreenshotNotifyCallback(None)
        g_critMemHandler.restore()
        g_critMemHandler.destroy()
        if constants.IS_CAT_LOADED:
            import Cat
            Cat.fini()
        MusicControllerWWISE.destroy()
        if RSSDownloader.g_downloader is not None:
            RSSDownloader.g_downloader.destroy()
        ServiceLocator.connectionMgr.onConnected -= onConnected
        ServiceLocator.connectionMgr.onDisconnected -= onDisconnected
        MessengerEntry.g_instance.fini()
        from helpers import EdgeDetectColorController
        if EdgeDetectColorController.g_instance is not None:
            EdgeDetectColorController.g_instance.destroy()
            EdgeDetectColorController.g_instance = None
        BigWorld.resetEntityManager(False, False)
        BigWorld.clearAllSpaces()
        if TriggersManager.g_manager is not None:
            TriggersManager.g_manager.destroy()
            TriggersManager.g_manager = None
        if g_replayCtrl is not None:
            g_replayCtrl.unsubscribe()
        gui_personality.fini()
        tutorialLoaderFini()
        import Vibroeffects
        if Vibroeffects.VibroManager.g_instance is not None:
            Vibroeffects.VibroManager.g_instance.destroy()
            Vibroeffects.VibroManager.g_instance = None
        from LightFx import LightManager
        if LightManager.g_instance is not None:
            LightManager.g_instance.destroy()
            LightManager.g_instance = None
        import AuxiliaryFx
        if AuxiliaryFx.g_instance is not None:
            AuxiliaryFx.g_instance.destroy()
            AuxiliaryFx.g_instance = None
        from predefined_hosts import g_preDefinedHosts
        if g_preDefinedHosts is not None:
            g_preDefinedHosts.fini()
        from bootcamp.BootcampTransition import BootcampTransition
        BootcampTransition.stop()
        SoundGroups.g_instance.stopListeningGUISpaceChanges()
        dependency.clear()
        if g_replayCtrl is not None:
            g_replayCtrl.destroy()
            g_replayCtrl = None
        voipRespHandler = VOIP.getVOIPManager()
        if voipRespHandler is not None:
            voipRespHandler.destroy()
        SoundGroups.g_instance.destroy()
        Settings.g_instance.save()
        if g_scenario is not None:
            g_scenario.destroy()
        g_onBeforeSendEvent = None
        WebBrowser.destroyExternalCache()
        if constants.HAS_DEV_RESOURCES:
            import development
            development.fini()
        return