Undo revision 23130 which was a merge with 2.5, a messy one because I did something...
[blender.git] / source / gameengine / Ketsji / KX_VisibilityActuator.cpp
index ba59d0d..97c893c 100644 (file)
@@ -39,10 +39,9 @@ KX_VisibilityActuator::KX_VisibilityActuator(
        SCA_IObject* gameobj,
        bool visible,
        bool occlusion,
-       bool recursive,
-       PyTypeObject* T
+       bool recursive
        ) 
-       : SCA_IActuator(gameobj,T),
+       : SCA_IActuator(gameobj),
          m_visible(visible),
          m_occlusion(occlusion),
          m_recursive(recursive)
@@ -64,8 +63,6 @@ KX_VisibilityActuator::GetReplica(
 {
        KX_VisibilityActuator* replica = new KX_VisibilityActuator(*this);
        replica->ProcessReplica();
-       // this will copy properties and so on...
-       CValue::AddDataToReplica(replica);
        return replica;
 }
 
@@ -94,8 +91,7 @@ KX_VisibilityActuator::Update()
 
 /* Integration hooks ------------------------------------------------------- */
 PyTypeObject KX_VisibilityActuator::Type = {
-       PyObject_HEAD_INIT(NULL)
-       0,
+       PyVarObject_HEAD_INIT(NULL, 0)
        "KX_VisibilityActuator",
        sizeof(PyObjectPlus_Proxy),
        0,
@@ -105,50 +101,32 @@ PyTypeObject KX_VisibilityActuator::Type = {
        0,
        0,
        py_base_repr,
-       0,0,0,0,0,0,
-       py_base_getattro,
-       py_base_setattro,
        0,0,0,0,0,0,0,0,0,
-       Methods
-
-};
-
-PyParentObject 
-KX_VisibilityActuator::Parents[] = {
-       &KX_VisibilityActuator::Type,
+       Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+       0,0,0,0,0,0,0,
+       Methods,
+       0,
+       0,
        &SCA_IActuator::Type,
-       &SCA_ILogicBrick::Type,
-       &CValue::Type,
-       NULL
+       0,0,0,0,0,0,
+       py_base_new
 };
 
-PyMethodDef 
-KX_VisibilityActuator::Methods[] = {
+PyMethodDef KX_VisibilityActuator::Methods[] = {
        // Deprecated ----->
        {"set", (PyCFunction) KX_VisibilityActuator::sPySetVisible, METH_VARARGS,
-               (PY_METHODCHAR) SetVisible_doc},
+               (const char *) SetVisible_doc},
        // <-----
        {NULL,NULL} //Sentinel
 };
 
 PyAttributeDef KX_VisibilityActuator::Attributes[] = {
        KX_PYATTRIBUTE_BOOL_RW("visibility", KX_VisibilityActuator, m_visible),
-       KX_PYATTRIBUTE_BOOL_RW("occlusion", KX_VisibilityActuator, m_occlusion),
-       KX_PYATTRIBUTE_BOOL_RW("recursion", KX_VisibilityActuator, m_recursive),
+       KX_PYATTRIBUTE_BOOL_RW("useOcclusion", KX_VisibilityActuator, m_occlusion),
+       KX_PYATTRIBUTE_BOOL_RW("useRecursion", KX_VisibilityActuator, m_recursive),
        { NULL }        //Sentinel
 };
 
-PyObject* KX_VisibilityActuator::py_getattro(PyObject *attr)
-{
-       py_getattro_up(SCA_IActuator);
-}
-
-int KX_VisibilityActuator::py_setattro(PyObject *attr, PyObject *value)
-{
-       py_setattro_up(SCA_IActuator);
-}
-
-
 /* set visibility ---------------------------------------------------------- */
 const char 
 KX_VisibilityActuator::SetVisible_doc[] =