Closed Yisus89 closed 1 year ago
Could you check if the cvars are set to the right values when that happens? Because I remember when I was testing and tried to enable sv_cheats in map created in menu, it would reset the cvars' value to their default ones.
It turns out the gamemode config loader was not actually loading anything as I tested other cvars that were supposed to be changed and were not. Manually typing sm_cvar l4d2_improvedbots_melee_chainsaw_limit "4"
correctly makes bots pick up all the chainsaws.
Now the issue is that because this https://forums.alliedmods.net/showthread.php?p=834731 doesn't seem to work, there needs to be another way to set up the cvar automatically on this gamemode.
So in the end I opted to just set the cvar to 4 by default rather than 2. This way they won't have problems with that on any occasion. So your plugin doesn't have anything wrong on this front, except you could add a check to see if mp_gamemode is mutation 7 to force the cvar change there. But at this point I just set 4 to default.
The chainsaw massacre mutation has this issue (unrelated to this plugin) where along with the 4 chainsaws, the game also spawns 4 pistols. The issue here is that despite having set these cvars for this mutation:
l4d2_improvedbots_melee_chainsaw_limit "4" l4d2_improvedbots_melee_max_team "4" l4d2_improvedbots_changeweaponiftoomanysubtype_primaries "0"
the bots still try to pick up the pistols over and over. 2 survivors can hold the chainsaw but the other 2 will endlessly switch between pistol and chainsaw. This happens despite having set the chainsaw limit to 4.
There's no crash happening here, or any major problem. Bots are just not able to decide between chainsaw and pistol and keep switching back and forth.