mirror of https://github.com/AxioDL/metaforce.git
Allow CVars to be set from the command line regardless of flags
This commit is contained in:
parent
94e7bacd71
commit
185c79703e
|
@ -81,9 +81,11 @@ std::vector<CVar*> CVarManager::cvars(CVar::EFlags filter) const {
|
|||
}
|
||||
|
||||
void CVarManager::deserialize(CVar* cvar) {
|
||||
/* Make sure we're not trying to deserialize a CVar that is invalid or not exposed */
|
||||
if (!cvar || (!cvar->isArchive() && !cvar->isInternalArchivable()))
|
||||
/* Make sure we're not trying to deserialize a CVar that is invalid or not exposed, unless it's been specified on the
|
||||
* command line (i.e deferred) */
|
||||
if (!cvar) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* First let's check for a deferred value */
|
||||
std::string lowName = cvar->name().data();
|
||||
|
@ -95,6 +97,11 @@ void CVarManager::deserialize(CVar* cvar) {
|
|||
return;
|
||||
}
|
||||
|
||||
/* Enforce isArchive and isInternalArchivable now that we've checked if it's been deferred */
|
||||
if (!cvar->isArchive() && !cvar->isInternalArchivable()) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* We were either unable to find a deferred value or got an invalid value */
|
||||
#if _WIN32
|
||||
hecl::SystemString filename =
|
||||
|
|
Loading…
Reference in New Issue