svn merge -r 15392:15551 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / gameengine / GameLogic / SCA_IObject.h
index 07b4310a91edbce24c10cee0fcb48b763a3d59cd..38a7ed29dca91be24e8bee06ac0b5799c0a436f0 100644 (file)
@@ -68,6 +68,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
         */
@@ -117,6 +122,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
         */