[quake3-bugzilla] [Bug 4369] New: Cvar modified flags are not updated in Cvar_Get

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Mon Dec 7 22:32:08 EST 2009


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

           Summary: Cvar modified flags are not updated in Cvar_Get
           Product: ioquake3
           Version: SVN HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Misc
        AssignedTo: zakk at icculus.org
        ReportedBy: lakitu7 at gmail.com
         QAContact: quake3-bugzilla at icculus.org


Created an attachment (id=2210)
 --> (http://bugzilla.icculus.org/attachment.cgi?id=2210)
patch against 1753

Since revision 1745, cvar_modifiedFlags is not correctly updated in Cvar_Get().
As a result, actions which rely on this fail. Most specifically, cvars being
marked USERINFO or SERVERINFO are not being (re)sent upon receiving such a
flag. In the latest Tremulous release, this has manifested as all vm-created
userinfo cvars not taking effect until a player changes one of them, causing
Cvar_InfoString to re-fire and send them all. As it is now, without
cvar_modifiedFlags being updated, Cvar_InfoString does not re-run after the VMs
load, so these cvars are not added to the appropriate infostrings.

At r1745, the relevant lines:
 // ZOID--needs to be set so that cvars the game sets as 
 // SERVERINFO get sent to clients
 cvar_modifiedFlags |= flags;

were moved inside the block: 
  if ( var->latchedString ) {

I am guessing that this was unintentional, and actually it should have been
moved slightly below that, after the if( var->latchedString ) block. The
attached patch does this. I can't really think of any reason why we would only
want to update modifiedflags for latched cvars, but it makes sense that the
block should have been moved from its current location to the bottom after the
new stuff for CVAR_VM_CREATED. I confirmed that the attached patch fixes the
issue as I described in Tremulous, but certainly everything here should apply
to ioq3 unmodified as well.

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


More information about the quake3-bugzilla mailing list