Exemplo n.º 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
Exemplo n.º 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