DescriptionChris "Lakitu7" Schwarz
2009-12-07 22:31:58 EST
Created attachment 2210[details]
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.
Created attachment 2210 [details] 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.