Fix configuration for Snowballs

--HG--
branch : develop
This commit is contained in:
Jan Boon 2018-07-03 16:10:04 +08:00
parent 13e2da698a
commit 1f897f6106
2 changed files with 12 additions and 1 deletions

View file

@ -57,6 +57,9 @@ ScreenFull = 1;
// Start position of the player (the z is always 0) // Start position of the player (the z is always 0)
StartPoint = { 1840.0, -970.0, 0.0 }; StartPoint = { 1840.0, -970.0, 0.0 };
// Anti-Aliasing
EnableFXAA = 0;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// HMD Variables ///////////////////////////////////////////////////////////// // HMD Variables /////////////////////////////////////////////////////////////

View file

@ -37,7 +37,15 @@ namespace SBCLIENT {
void CConfiguration::setAndCallback(const std::string &varName, void (*cb)(CConfigFile::CVar &var)) void CConfiguration::setAndCallback(const std::string &varName, void (*cb)(CConfigFile::CVar &var))
{ {
ConfigFile->setCallback(varName, cb); ConfigFile->setCallback(varName, cb);
cb(*ConfigFile->getVarPtr(varName)); CConfigFile::CVar *varPtr = ConfigFile->getVarPtr(varName);
if (!varPtr)
{
nlwarning("Missing config variable '%s'", varName.c_str());
}
else
{
cb(*varPtr);
}
} }
void CConfiguration::dropCallback(const std::string &varName) void CConfiguration::dropCallback(const std::string &varName)