mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-25 00:26:17 +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
|
||||
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 //
|
||||
|
||||
|
||||
|
|
|
@ -31,6 +31,9 @@
|
|||
// Std.
|
||||
#include <string>
|
||||
|
||||
namespace NLMISC {
|
||||
class CCDBNodeLeaf;
|
||||
}
|
||||
|
||||
///////////
|
||||
// CLASS //
|
||||
|
@ -305,6 +308,8 @@ private:
|
|||
|
||||
/// when true the next forward action will cancel any moveto
|
||||
bool _NextForwardCancelMoveTo;
|
||||
|
||||
NLMISC::CRefPtr<NLMISC::CCDBNodeLeaf> _UiVarMkMoveDB;
|
||||
};
|
||||
|
||||
/// User Controls (mouse, keyboard, interfaces, ...)
|
||||
|
|
Loading…
Reference in a new issue