Ayuto / EventScripts-Emulator

A Source.Python plugin that is able to run EventScripts addons.
16 stars 9 forks source link

ES_Emulator crashes CS Source #62

Open demoix opened 3 years ago

demoix commented 3 years ago

I'm trying to run this with Warcraft mod and many races. I have checked every other plugin one by one but at end of the day if I disable ES_Emulator game runs fine. But of course, if I disable it then none of the race at warcraft mod works. The game shuts down without any error messages. I can run the game for only a few rounds maximum but sometimes even the game crashes on the first round. I play only with bots. Here is my investigation:

WCS simply doesn't work for me. I have installed python source, WCS, es emulator, WCS: Essentials, then I installed shopmenu and all available races and put them into races.ini one by one. then Configured autoexec.cfg by this order:

sp plugin load es_emulator sp plugin load wcs sp plugin load commandsx es_load wcs/tools/wcs_essentials es_load wcs/loaders/itempack_shopmenu es_load wcs/loaders/racepack_damakex .....es_load every other race.....

I also put some configuration commands to autoexec.cfg as I play with bots as it says from wcs_essentials readme:

sv_disable_immunity_alpha 1 //Fixes multiple issues with invisibility skills in CS:GO sv_quota_stringcmdspersecond 200 //Fixes issues where clients would be kicked for issueing too many commands when using extensive ultimates sv_infinite_ammo 0 sv_ignoregrenaderadio 1 sv_allow_wait_command 1 sv_pure 0 sv_forcepreload 0 rcon mp_respawn_immunitytime 0 //Removes CS:GO's built-in spawnprotection to make respawning more balanced and less exploitable mp_free_armor 0 //Makes players spawn with 0 armor to make races with armor skills stay relevant mp_round_restart_delay 5 mp_autokick 0

Everything is working, bots using every random race, using abilities, levelling up. But the major issue that this last only a few rounds and then the game crashes shut down without any error message. I thought the issue is some races so I started to disable races one by one and find out if the game won't crash. I end up disabling every race and the game still crashes after a few rounds. I end up removing everything from autoexec.cfg and left only:

sp plugin load es_emulator sp plugin load wcs

But the game still crashes after few rounds. So if I remove sp plugin load wcs or sp plugin load es_emulator the game won't crash again. If I put every plugin and race into autoexec.cfg except es_emulator then the game doesn't crash anymore but then none of the race is working because es_emulator is not loaded. But if I load it the game crashes after few rounds. Is this a known issue?

Ayuto commented 3 years ago

Hey, what's the output of sp info?

demoix commented 3 years ago

I no longer have it but as I remember sp info said plugins are installed correctly and loaded. By the way, regarding WCS the problem was elsewhere. I also installed https://github.com/ManifestManah/EventScripts-Emulator-For-WCS instead. But the root problem with WCS in their script but solution solved the problem by deleting some code from wcs.py file. It's line 995-1005 and this code needs to be deleted to CTD within few rounds:

# Is ESC supported?
if IS_ESC_SUPPORT_ENABLED:
    #  Used to clean up loading/unloading of wcs
    @OnServerOutput
    def on_server_output(severity, msg):
        if msg.startswith(('[EventScripts] Loaded wcs/modules/races/', 'Unloading wcs/modules/races/')) or (msg.startswith('wcs/modules/races/') and msg.endswith(' has been unloaded\n')):
            return OutputReturn.BLOCK
        if msg.startswith(('[EventScripts] Loaded wcs/modules/items/', 'Unloading wcs/modules/items/')) or (msg.startswith('wcs/modules/items/') and msg.endswith(' has been unloaded\n')):
            return OutputReturn.BLOCK

        return OutputReturn.CONTINUE