Don't touch protected KX_GameObject members.
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>
Sun, 16 May 2004 12:52:54 +0000 (12:52 +0000)
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>
Sun, 16 May 2004 12:52:54 +0000 (12:52 +0000)
Protect KX_GameObject - Py_Header unprotects!

source/gameengine/Ketsji/KX_GameObject.h
source/gameengine/Ketsji/KX_OdePhysicsController.cpp

index e503f57ae9ff78b49d3d6b323e52b3c4aa2e9f3d..41528bd9dd86cfebdfd3bcd74b5e1004130234aa 100644 (file)
@@ -65,6 +65,7 @@ class SM_Object;
 class KX_GameObject : public SCA_IObject
 {
        Py_Header;
+protected:
 
        bool                                                            m_bDyna;
        KX_ClientObjectInfo*                            m_pClient_info;
@@ -83,7 +84,6 @@ class KX_GameObject : public SCA_IObject
        KX_IPhysicsController*                          m_pPhysicsController1;
        SG_Node*                                                        m_pSGNode;
 
-protected:
        MT_CmMatrix4x4                                          m_OpenGL_4x4Matrix;
        
 public:
@@ -570,7 +570,7 @@ public:
        virtual 
                PyObject*                       
        _getattr(
-               char *attr
+               const STR_String& attr
        );
 
                PyObject*                                       
index e6c135b6aea202826c4ea9a342af8519ec85e38c..14461145cb7658f9109eb000e33160c01060a993 100644 (file)
@@ -62,7 +62,7 @@ void                  KX_OdePhysicsController::SetObject (SG_IObject* object)
 
        // cheating here...
        KX_GameObject* gameobj = (KX_GameObject*)       object->GetSGClientObject();
-       gameobj->m_pPhysicsController1 = this;
+       gameobj->SetPhysicsController(this);
        
 }