mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-14 11:19:07 +00:00
Avoid redundant per-frame calls to getDbProp("UI:VARIABLES:MK_MOVE")
This commit is contained in:
parent
f78b08b5ef
commit
28487e8937
2 changed files with 8 additions and 1 deletions
|
@ -294,7 +294,9 @@ void CUserControls::update()
|
||||||
// update camera collision once per frame
|
// update camera collision once per frame
|
||||||
View.updateCameraCollision();
|
View.updateCameraCollision();
|
||||||
|
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:MK_MOVE")->setValue32(autowalkState());
|
NLMISC::CCDBNodeLeaf *node = _UiVarMkMoveDB ? &*_UiVarMkMoveDB
|
||||||
|
: (_UiVarMkMoveDB = NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:MK_MOVE"));
|
||||||
|
node->setValue32(autowalkState());
|
||||||
}// update //
|
}// update //
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,9 @@
|
||||||
// Std.
|
// Std.
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
namespace NLMISC {
|
||||||
|
class CCDBNodeLeaf;
|
||||||
|
}
|
||||||
|
|
||||||
///////////
|
///////////
|
||||||
// CLASS //
|
// CLASS //
|
||||||
|
@ -305,6 +308,8 @@ private:
|
||||||
|
|
||||||
/// when true the next forward action will cancel any moveto
|
/// when true the next forward action will cancel any moveto
|
||||||
bool _NextForwardCancelMoveTo;
|
bool _NextForwardCancelMoveTo;
|
||||||
|
|
||||||
|
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _UiVarMkMoveDB;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// User Controls (mouse, keyboard, interfaces, ...)
|
/// User Controls (mouse, keyboard, interfaces, ...)
|
||||||
|
|
Loading…
Reference in a new issue