I forgot I'm not a Java programmer

This commit is contained in:
Diavolo 2022-02-03 13:08:25 +01:00
parent 39f2f4ff62
commit 39812a9370
No known key found for this signature in database
GPG Key ID: FA77F074E98D98A5

View File

@ -15,17 +15,17 @@ namespace Components
{
assert(!this->dvarName.empty() && this->dvar == nullptr);
auto* dvar = Game::Dvar_FindVar(this->dvarName.data());
auto* var = Game::Dvar_FindVar(this->dvarName.data());
// If the dvar can't be found it will be registered as an empty string dvar
if (dvar == nullptr)
if (var == nullptr)
{
this->dvar = const_cast<Game::dvar_t*>(Game::Dvar_SetFromStringByNameFromSource(this->dvarName.data(), "",
Game::DvarSetSource::DVAR_SOURCE_INTERNAL));
}
else
{
this->dvar = dvar;
this->dvar = var;
}
}