Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/GameLogic/SCA_IObject.h')
-rw-r--r--source/gameengine/GameLogic/SCA_IObject.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/gameengine/GameLogic/SCA_IObject.h b/source/gameengine/GameLogic/SCA_IObject.h
index 07b4310a91e..38a7ed29dca 100644
--- a/source/gameengine/GameLogic/SCA_IObject.h
+++ b/source/gameengine/GameLogic/SCA_IObject.h
@@ -69,6 +69,11 @@ protected:
bool m_suspended;
/**
+ * init state of object (used when object is created)
+ */
+ unsigned int m_initState;
+
+ /**
* current state = bit mask of state that are active
*/
unsigned int m_state;
@@ -118,6 +123,16 @@ public:
void Resume(void);
/**
+ * Set init state
+ */
+ void SetInitState(unsigned int initState) { m_initState = initState; }
+
+ /**
+ * initialize the state when object is created
+ */
+ void ResetState(void) { SetState(m_initState); }
+
+ /**
* Set the object state
*/
void SetState(unsigned int state);