Fix configuration for Snowballs

--HG--
branch : develop
hg/compatibility-develop
Jan Boon 7 years ago
parent 13e2da698a
commit 1f897f6106

@ -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 /////////////////////////////////////////////////////////////

@ -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)

Loading…
Cancel
Save