MatchZy
MatchZy copied to clipboard
Hosting a workshop map breaks wingman functionality
This is just food for thought.
We host awp_lego
from workshop on our servers for warmup sessions before the match. This map, afaik, does not have wingman capabilities.
We create a wingman match using G5 API. Everything runs smoothly, until we got our mappicks and are switching to a map to play first. After the knife round, server states:
[MatchZy] [StartLive] Starting Live! Executing Live CFG from MatchZy/live.cfg
,
while having the matchConfig.Wingman
set to true all the time. Thus we have the regular config with mp_maxrounds
set to 24 and all that.
We then, instead of playing awp_lego
, go straight to a map that has wingman capability. We used de_inferno
. Again, create a match using G5, pick maps, switch maps - and everything is good.
I believe this happens because we tried to change the game mode while being on the map that is not capable of that mode (MapVeto.cs:349
). We can go about this two ways:
- In
MapVeto.cs:351
, moveSetCorrectGameMode()
to theChangeMap(string, Int32)
method after the map change command (Utility.cs:948
), so that server actually recognizes available gamemodes on the map that we are supposed to play on. Maybe time it out a bit or change it right after the warmup (I believe warmup does not care about the current gamemode?) - In
Utility.cs:1350
, execute live config checking not thegameMode
convar, butmatchConfig.Wingman
variable (since MatchZy supports only 2 gamemodes anyway)
Solution 2 might break the current gamemode (it might stay as it was on the previous map), so I'm rooting for solution 1.
Please review this @shobhit-pathak as we have a wingman tournament coming up and I want to issue a PR with your selected solution. Thanks!