Setting custom CVARs from cmd-line in netgames not working

Tue Jan 29, 2019 8:32 am

NB: the correct title of this thread should be: "Setting custom CVARs from command line in multiplayer games sometimes doesn't work"

It seems that there is something fishy going on when I try to set a custom CVAR by using a command-line parameter when starting a multiplayer game. Sometimes it works, sometimes it doesn't. I've managed to come up with a sequence of actions that reproduces the bug every time. Use the following CVARINFO for that (also attached to this report):

Code:
server bool test_boolvar = false;

The first step is to launch two GZDoom instances and connect them to each other while setting test_boolvar to true when configuring the host:

Code:
gzdoom.exe -file cvarinfo.txt +test_boolvar 1 -host 2
gzdoom.exe -file cvarinfo.txt -join localhost

For this run, test_boolvar is true for both clients. Now we close both instances and run them again, but this time we try setting test_boolvar to false:

Code:
gzdoom.exe -file cvarinfo.txt +test_boolvar 0 -host 2
gzdoom.exe -file cvarinfo.txt -join localhost

However, it is still true for both clients. This is not expected behavior. For every subsequent run with the same command-line parameters, the CVAR will not change its value like it's supposed to.

Tested in GZDoom 3.7.2 and g3.8pre-179-g95679c36b.
You do not have the required permissions to view the files attached to this post.