Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hosting a workshop map breaks wingman functionality #209

Open
milkywayfarer opened this issue Aug 18, 2024 · 2 comments
Open

Hosting a workshop map breaks wingman functionality #209

milkywayfarer opened this issue Aug 18, 2024 · 2 comments

Comments

@milkywayfarer
Copy link
Contributor

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:

  1. In MapVeto.cs:351, move SetCorrectGameMode() to the ChangeMap(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?)
  2. In Utility.cs:1350, execute live config checking not the gameMode convar, but matchConfig.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!

@shobhit-pathak
Copy link
Owner

Hey!

CFG is executed based on the current game mode, which we get from the GetGameMode function which checks the value of game_mode cvar. So ideally if the game_mode was set correctly, wingman cfg should have executed.

Can you try loading awp_lego again and check what game_mode gets returned in the server console?

  1. Warmup does care about current gamemode, for example, on inferno, you'll only have A site in warmup for wingman. Hence gamemode needs to be set before the map change.
  2. We can do this, but then if someone wants to run MatchZy on wingman mode, they will have to set matchConfig.Wingman to true every time by loading the match config. Hence GetGameMode function is there to automatically check for the game_mode and execute the appropriate CFG.

@milkywayfarer
Copy link
Contributor Author

We will test that again next time. For the time being, our starting map is Inferno.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants