Пример #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 init(scriptConfig, engineConfig, userPreferences, loadingScreenGUI = None):
    global g_replayCtrl
    try:
        if constants.IS_DEVELOPMENT:
            autoFlushPythonLog()
        LOG_DEBUG('init')
        BigWorld.wg_initCustomSettings()
        Settings.g_instance = Settings.Settings(scriptConfig, engineConfig, userPreferences)
        CommandMapping.g_instance = CommandMapping.CommandMapping()
        from helpers import DecalMap
        DecalMap.g_instance = DecalMap.DecalMap(scriptConfig['decal'])
        from helpers import EdgeDetectColorController
        EdgeDetectColorController.g_instance = EdgeDetectColorController.EdgeDetectColorController(scriptConfig['silhouetteColors'])
        import SoundGroups
        SoundGroups.g_instance = SoundGroups.SoundGroups()
        import BattleReplay
        g_replayCtrl = BattleReplay.g_replayCtrl = BattleReplay.BattleReplay()
        g_replayCtrl.registerWotReplayFileExtension()
        try:
            import Vibroeffects
            Vibroeffects.VibroManager.g_instance = Vibroeffects.VibroManager.VibroManager()
            Vibroeffects.VibroManager.g_instance.connect()
        except:
            LOG_CURRENT_EXCEPTION()

        tutorialLoaderInit()
        BigWorld.callback(0.1, asyncore_call)
        MessengerEntry.g_instance.init()
        import items
        items.init(True, None if not constants.IS_DEVELOPMENT else {})
        import ArenaType
        ArenaType.init()
        import dossiers1
        dossiers1.init()
        import dossiers2
        dossiers2.init()
        BigWorld.worldDrawEnabled(False)
        import LcdKeyboard
        LcdKeyboard.enableLcdKeyboardSpecificKeys(True)
        gui_personality.init(loadingScreenGUI=loadingScreenGUI)
        AreaDestructibles.init()
        MusicController.init()
        TriggersManager.init()
        RSSDownloader.init()
        g_postProcessing.init()
        try:
            from LightFx import LightManager
            LightManager.g_instance = LightManager.LightManager()
            import AuxiliaryFx
            AuxiliaryFx.g_instance = AuxiliaryFx.AuxiliaryFxManager()
        except:
            LOG_CURRENT_EXCEPTION()

    except Exception:
        LOG_CURRENT_EXCEPTION()
        BigWorld.quit()

    return
Пример #4
0
def init(scriptConfig, engineConfig, userPreferences, loadingScreenGUI=None):
    global g_replayCtrl
    try:
        if constants.IS_DEVELOPMENT:
            autoFlushPythonLog()
        BigWorld.wg_initCustomSettings()
        g_postProcessing.init()
        Settings.g_instance = Settings.Settings(scriptConfig, engineConfig,
                                                userPreferences)
        CommandMapping.g_instance = CommandMapping.CommandMapping()
        from helpers import DecalMap
        DecalMap.g_instance = DecalMap.DecalMap(scriptConfig['decal'])
        from helpers import EdgeDetectColorController
        EdgeDetectColorController.g_instance = EdgeDetectColorController.EdgeDetectColorController(
            scriptConfig['silhouetteColors'])
        import SoundGroups
        SoundGroups.g_instance = SoundGroups.SoundGroups()
        import BattleReplay
        g_replayCtrl = BattleReplay.g_replayCtrl = BattleReplay.BattleReplay()
        g_replayCtrl.registerWotReplayFileExtension()
        try:
            from Vibroeffects import VibroManager
            VibroManager.g_instance = VibroManager.VibroManager()
            VibroManager.g_instance.connect()
        except:
            LOG_CURRENT_EXCEPTION()

        tutorialLoaderInit()
        BigWorld.callback(0.1, asyncore_call)
        import items
        items.init(True, None if not constants.IS_DEVELOPMENT else {})
        import win_points
        win_points.init()
        import rage
        rage.init()
        import ArenaType
        ArenaType.init()
        import dossiers2
        dossiers2.init()
        import fortified_regions
        fortified_regions.init()
        import clubs_settings
        clubs_settings.init()
        import potapov_quests
        potapov_quests.init()
        import clubs_quests
        clubs_quests.init()
        import motivation_quests
        motivation_quests.init()
        BigWorld.worldDrawEnabled(False)
        import LcdKeyboard
        LcdKeyboard.enableLcdKeyboardSpecificKeys(True)
        dependency.configure(services_config.getClientServicesConfig)
        gui_personality.init(loadingScreenGUI=loadingScreenGUI)
        EdgeDetectColorController.g_instance.create()
        g_replayCtrl.subscribe()
        MessengerEntry.g_instance.init()
        AreaDestructibles.init()
        MusicControllerWWISE.create()
        TriggersManager.init()
        RSSDownloader.init()
        SoundGroups.loadLightSoundsDB()
        try:
            from LightFx import LightManager
            LightManager.g_instance = LightManager.LightManager()
            import AuxiliaryFx
            AuxiliaryFx.g_instance = AuxiliaryFx.AuxiliaryFxManager()
        except:
            LOG_CURRENT_EXCEPTION()

        from AvatarInputHandler.cameras import FovExtended
        FovExtended.instance().resetFov()
        BigWorld.pauseDRRAutoscaling(True)
    except Exception:
        LOG_CURRENT_EXCEPTION()
        BigWorld.quit()

    return
Пример #5
0
def init(scriptConfig, engineConfig, userPreferences, loadingScreenGUI=None):
    global g_replayCtrl
    try:
        if constants.IS_DEVELOPMENT:
            autoFlushPythonLog()
        LOG_DEBUG('init')
        BigWorld.wg_initCustomSettings()
        Settings.g_instance = Settings.Settings(scriptConfig, engineConfig,
                                                userPreferences)
        CommandMapping.g_instance = CommandMapping.CommandMapping()
        from helpers import DecalMap
        DecalMap.g_instance = DecalMap.DecalMap(scriptConfig['decal'])
        from helpers import EdgeDetectColorController
        EdgeDetectColorController.g_instance = EdgeDetectColorController.EdgeDetectColorController(
            scriptConfig['silhouetteColors'])
        import SoundGroups
        SoundGroups.g_instance = SoundGroups.SoundGroups()
        import BattleReplay
        g_replayCtrl = BattleReplay.g_replayCtrl = BattleReplay.BattleReplay()
        g_replayCtrl.registerWotReplayFileExtension()
        try:
            import Vibroeffects
            Vibroeffects.VibroManager.g_instance = Vibroeffects.VibroManager.VibroManager(
            )
            Vibroeffects.VibroManager.g_instance.connect()
        except:
            LOG_CURRENT_EXCEPTION()

        tutorialLoaderInit()
        BigWorld.callback(0.1, asyncore_call)
        MessengerEntry.g_instance.init()
        import items
        items.init(True, None if not constants.IS_DEVELOPMENT else {})
        import ArenaType
        ArenaType.init()
        import dossiers1
        dossiers1.init()
        import dossiers2
        dossiers2.init()
        BigWorld.worldDrawEnabled(False)
        import LcdKeyboard
        LcdKeyboard.enableLcdKeyboardSpecificKeys(True)
        gui_personality.init(loadingScreenGUI=loadingScreenGUI)
        AreaDestructibles.init()
        MusicController.init()
        TriggersManager.init()
        RSSDownloader.init()
        g_postProcessing.init()
        try:
            from LightFx import LightManager
            LightManager.g_instance = LightManager.LightManager()
            import AuxiliaryFx
            AuxiliaryFx.g_instance = AuxiliaryFx.AuxiliaryFxManager()
        except:
            LOG_CURRENT_EXCEPTION()

    except Exception:
        LOG_CURRENT_EXCEPTION()
        BigWorld.quit()

    return