From 0858c2f6edcaec37093eb51720229e924a0297cb Mon Sep 17 00:00:00 2001
From: Louis-Antoine <lamr@free.fr>
Date: Tue, 7 Jul 2020 16:19:25 +0200
Subject: [PATCH] Fix autoexec file trying to set netvars when joining from
 command-line

---
 src/command.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/command.c b/src/command.c
index f5c02d877..091dbd8f1 100644
--- a/src/command.c
+++ b/src/command.c
@@ -1574,7 +1574,7 @@ static void CV_SetCVar(consvar_t *var, const char *value, boolean stealth)
 		// send the value of the variable
 		UINT8 buf[128];
 		UINT8 *p = buf;
-		if (!(server || (IsPlayerAdmin(consoleplayer))))
+		if (!(server || (addedtogame && IsPlayerAdmin(consoleplayer))))
 		{
 			CONS_Printf(M_GetText("Only the server or admin can change: %s %s\n"), var->name, var->string);
 			return;
-- 
GitLab