diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2009-03-12 01:11:52 +0300 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2009-03-12 01:11:52 +0300 |
commit | a37cec2802d96306426f41c64f6ed69ab3680355 (patch) | |
tree | d0ad9ba1a8fb64072a6427e82b0fc4aa2a153d83 /source/gameengine/GameLogic/SCA_ExpressionController.h | |
parent | 0ac3e7016048a7e66285b3539c6e86cf83a4cb06 (diff) |
BGE patch 18368: Modulus (ie %) expression controller in BGE. Implement a cache for the expression for better performance.
Diffstat (limited to 'source/gameengine/GameLogic/SCA_ExpressionController.h')
-rw-r--r-- | source/gameengine/GameLogic/SCA_ExpressionController.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/gameengine/GameLogic/SCA_ExpressionController.h b/source/gameengine/GameLogic/SCA_ExpressionController.h index 20e1eb77771..79c26eea1e7 100644 --- a/source/gameengine/GameLogic/SCA_ExpressionController.h +++ b/source/gameengine/GameLogic/SCA_ExpressionController.h @@ -38,6 +38,7 @@ class SCA_ExpressionController : public SCA_IController { // Py_Header; STR_String m_exprText; + CExpression* m_exprCache; public: SCA_ExpressionController(SCA_IObject* gameobj, @@ -48,6 +49,11 @@ public: virtual CValue* GetReplica(); virtual void Trigger(SCA_LogicManager* logicmgr); virtual CValue* FindIdentifier(const STR_String& identifiername); + /** + * used to release the expression cache + * so that self references are removed before the controller itself is released + */ + virtual void Delete(); /* --------------------------------------------------------------------- */ /* Python interface ---------------------------------------------------- */ |