From 1f897f6106373cb306bb01d240ee3385f6407034 Mon Sep 17 00:00:00 2001 From: Jan Boon Date: Tue, 3 Jul 2018 16:10:04 +0800 Subject: [PATCH] Fix configuration for Snowballs --HG-- branch : develop --- code/snowballs2/bin/snowballs_client_default.cfg | 3 +++ code/snowballs2/client/src/configuration.cpp | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/code/snowballs2/bin/snowballs_client_default.cfg b/code/snowballs2/bin/snowballs_client_default.cfg index 49ec9e4d5..f8af00386 100755 --- a/code/snowballs2/bin/snowballs_client_default.cfg +++ b/code/snowballs2/bin/snowballs_client_default.cfg @@ -57,6 +57,9 @@ ScreenFull = 1; // Start position of the player (the z is always 0) StartPoint = { 1840.0, -970.0, 0.0 }; +// Anti-Aliasing +EnableFXAA = 0; + ////////////////////////////////////////////////////////////////////////////// // HMD Variables ///////////////////////////////////////////////////////////// diff --git a/code/snowballs2/client/src/configuration.cpp b/code/snowballs2/client/src/configuration.cpp index 303db63ce..bc37448b2 100644 --- a/code/snowballs2/client/src/configuration.cpp +++ b/code/snowballs2/client/src/configuration.cpp @@ -37,7 +37,15 @@ namespace SBCLIENT { void CConfiguration::setAndCallback(const std::string &varName, void (*cb)(CConfigFile::CVar &var)) { 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)