Merge pull request #7621 from Robyt3/Config-Game-Reset-Without-Console

Avoid using console to reset game settings
This commit is contained in:
Dennis Felsing 2023-12-10 12:10:18 +00:00 committed by GitHub
commit d15b1f4ab3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -156,7 +156,7 @@ struct SIntConfigVariable : public SConfigVariable
void ResetToOld() override
{
SetValue(m_OldValue);
*m_pVariable = m_OldValue;
}
};
@ -257,7 +257,7 @@ struct SColorConfigVariable : public SConfigVariable
void ResetToOld() override
{
SetValue(m_OldValue);
*m_pVariable = m_OldValue;
}
};
@ -362,7 +362,7 @@ struct SStringConfigVariable : public SConfigVariable
void ResetToOld() override
{
SetValue(m_pOldValue);
str_copy(m_pStr, m_pOldValue, m_MaxSize);
}
};