mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-01-31 13:00:52 +00:00
Fix VMs forcing engine latch cvar to update to latched value
A few commits ago I stopped VM's Cvar_Set() from instantly updating latched values. Now VM can't call Cvar_Register() afterword to force latched value to be used. Reported by Noah Metzger (Chomenor).
This commit is contained in:
parent
3638f69dff
commit
ed8d48cac3
1 changed files with 7 additions and 1 deletions
|
@ -1376,7 +1376,13 @@ void Cvar_Register(vmCvar_t *vmCvar, const char *varName, const char *defaultVal
|
|||
if ( cv && ( cv->flags & CVAR_PROTECTED ) ) {
|
||||
Com_DPrintf( S_COLOR_YELLOW "WARNING: VM tried to register protected cvar '%s' with value '%s'%s\n",
|
||||
varName, defaultValue, ( flags & ~cv->flags ) != 0 ? " and new flags" : "" );
|
||||
} else {
|
||||
}
|
||||
// Don't set engine latch cvar to latched value.
|
||||
else if ( cv && ( cv->flags & CVAR_LATCH ) && !( cv->flags & CVAR_VM_CREATED ) ) {
|
||||
cv->flags |= flags;
|
||||
cvar_modifiedFlags |= flags;
|
||||
}
|
||||
else {
|
||||
cv = Cvar_Get(varName, defaultValue, flags | CVAR_VM_CREATED);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue