mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-24 01:48:44 +00:00
Avoid redundant per-frame calls to getDbProp("UI:SAVE:SHOW_RETICLE")
--HG-- branch : kaetemi-optimize
This commit is contained in:
parent
55a00fd518
commit
0897092fe3
2 changed files with 5 additions and 1 deletions
|
@ -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…
Reference in a new issue