mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-17 13:01:41 +00:00
Avoid redundant per-frame calls to getDbProp("UI:SAVE:SHOW_RETICLE")
This commit is contained in:
parent
38c4b66cce
commit
beff07c398
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