[Bug 3739] New: Quick cvar toggle method between 0/1 via Cvar_Command

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Fri Aug 8 21:15:11 EDT 2008


http://bugzilla.icculus.org/show_bug.cgi?id=3739

           Summary: Quick cvar toggle method between 0/1 via Cvar_Command
           Product: Quake 3
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: Misc
        AssignedTo: zakk at icculus.org
        ReportedBy: ensiform at gmail.com
         QAContact: quake3-bugzilla at icculus.org


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.


-- 
Configure bugmail: http://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.



More information about the quake3-bugzilla mailing list