Avoid redundant per-frame calls to getDbProp("UI:SAVE:SHOW_RETICLE")

--HG--
branch : kaetemi-optimize
hg/feature/sound
kaetemi 11 years ago
parent 55a00fd518
commit 0897092fe3

@ -3041,7 +3041,9 @@ void CEntityCL::updateVisiblePostPos(const NLMISC::TTime &/* currentTimeInMs */,
bool bShowReticle = true;
CCDBNodeLeaf* node = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:SHOW_RETICLE");
CCDBNodeLeaf *node = (CCDBNodeLeaf *)_ShowReticleLeaf ? &*_ShowReticleLeaf
: (_ShowReticleLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:SHOW_RETICLE", false));
if (node)
{
bShowReticle = node->getValueBool();

@ -1113,6 +1113,8 @@ protected:
static NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _OpacityMinNodeLeaf;
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _ShowReticleLeaf;
protected:
/**
* Change the box position.

Loading…
Cancel
Save