Index: cvar.c =================================================================== --- cvar.c (revision 164) +++ cvar.c (working copy) @@ -686,6 +686,14 @@ return qtrue; } + if ( Cmd_Argc() == 2 ) { + if ( strcmp(Cmd_Argv(1), "!") == 0 ) { + int curValue = v->value; + Cvar_Set2(v->name, va("%i", !curValue), qfalse); + return qtrue; + } + } + // set the value if forcing isn't required Cvar_Set2 (v->name, Cmd_Argv(1), qfalse); return qtrue; revision number is of my svn and not main ioq3 svn.
*** Bug 3739 has been marked as a duplicate of this bug. ***
Doesn't /toggle already do this?
Yep.
why another method?
Index: cvar.c =================================================================== --- cvar.c (revision 164) +++ cvar.c (working copy) @@ -686,6 +686,14 @@ return qtrue; } + if ( Cmd_Argc() == 2 ) { + if ( strcmp(Cmd_Argv(1), "!") == 0 ) { + int curValue = v->value; + Cvar_Set2(v->name, va("%i", !curValue), qfalse); + return qtrue; + } + } + // set the value if forcing isn't required Cvar_Set2 (v->name, Cmd_Argv(1), qfalse); return qtrue; revision number is of my svn and not main ioq3 svn.