From 5dacd86506ba1b57da7c3b521955d0f4a64cd1fb Mon Sep 17 00:00:00 2001 From: DeaDDooMER Date: Mon, 2 Sep 2019 22:50:29 +0300 Subject: [PATCH] save string cvars to dfconfig.cfg --- src/game/g_console.pas | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/game/g_console.pas b/src/game/g_console.pas index 4723978..5cfce98 100644 --- a/src/game/g_console.pas +++ b/src/game/g_console.pas @@ -289,7 +289,7 @@ var begin if (Length(p) <> 2) then begin - conwritefln('%s %s', [me.cmd, PAnsiString(me.ptr)^]); + conwritefln('%s %s', [me.cmd, QuoteStr(PAnsiString(me.ptr)^)]); end else begin @@ -1935,6 +1935,13 @@ begin begin WriteLn(f, commands[i].cmd, ' ', PVarSingle(commands[i].ptr).val^:0:6) end + else if @commands[i].procEx = @strVarHandler then + begin + if Length(PAnsiString(commands[i].ptr)^) = 0 then + WriteLn(f, commands[i].cmd, ' ""') + else + WriteLn(f, commands[i].cmd, ' ', QuoteStr(PAnsiString(commands[i].ptr)^)) + end end end; CloseFile(f) -- 2.29.2