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.
This allows for doing /cvarname ! as another method for toggling between 0 and 1 on boolean vars.
Comment 1Zachary J. Slater
2008-08-08 23:39:31 EDT
*** This bug has been marked as a duplicate of bug 3738 ***
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. This allows for doing /cvarname ! as another method for toggling between 0 and 1 on boolean vars.