Fixed cvar values from yapb.cfg being ignored after initialization
This commit is contained in:
parent
5d32a4577c
commit
fcb0f7c1ad
1 changed files with 7 additions and 9 deletions
|
|
@ -504,16 +504,14 @@ void execBotConfigs (bool onlyMain) {
|
||||||
if (cvar != nullptr) {
|
if (cvar != nullptr) {
|
||||||
auto value = const_cast <char *> (keyval[1].trim ().trim ("\"").trim ().chars ());
|
auto value = const_cast <char *> (keyval[1].trim ().trim ("\"").trim ().chars ());
|
||||||
|
|
||||||
if (needsToIgnoreVar (ignore, key)) {
|
if (needsToIgnoreVar (ignore, key) && !!stricmp (value, cvar->string)) {
|
||||||
if (!!stricmp (value, cvar->string)) {
|
engine.print ("Bot CVAR '%s' differs from the stored in the config (%s/%s). Ignoring.", cvar->name, cvar->string, value);
|
||||||
engine.print ("Bot CVAR '%s' is differs from stored in config (%s/%s). Ignoring.", cvar->name, cvar->string, value);
|
|
||||||
|
|
||||||
// ensure cvar will have old value
|
// ensure cvar will have old value
|
||||||
g_engfuncs.pfnCvar_DirectSet (cvar, cvar->string);
|
g_engfuncs.pfnCvar_DirectSet (cvar, cvar->string);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
g_engfuncs.pfnCvar_DirectSet (cvar, value);
|
g_engfuncs.pfnCvar_DirectSet (cvar, value);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue