diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2012-10-09 23:53:51 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2012-10-09 23:53:51 +0400 |
commit | 864b886af18150285566ba1b5cb7cbf95f919c4d (patch) | |
tree | 705473758552337c1707ded0670a505dbe9f0c0c /source/gameengine/Ketsji | |
parent | 4c9ea030a575cd376abe5892433aa39f1898d1eb (diff) |
Merging revisions 51077-51234 from trunk
Diffstat (limited to 'source/gameengine/Ketsji')
70 files changed, 243 insertions, 155 deletions
diff --git a/source/gameengine/Ketsji/BL_Action.h b/source/gameengine/Ketsji/BL_Action.h index ab2adf7fe34..370bbf51d72 100644 --- a/source/gameengine/Ketsji/BL_Action.h +++ b/source/gameengine/Ketsji/BL_Action.h @@ -136,5 +136,4 @@ public: #endif }; -#endif //BL_ACTION - +#endif /* BL_ACTION */ diff --git a/source/gameengine/Ketsji/BL_ActionManager.h b/source/gameengine/Ketsji/BL_ActionManager.h index dbdaa6652ad..600e7b6621e 100644 --- a/source/gameengine/Ketsji/BL_ActionManager.h +++ b/source/gameengine/Ketsji/BL_ActionManager.h @@ -98,5 +98,4 @@ public: #endif }; -#endif //BL_ACTIONMANAGER - +#endif /* BL_ACTIONMANAGER */ diff --git a/source/gameengine/Ketsji/BL_BlenderShader.h b/source/gameengine/Ketsji/BL_BlenderShader.h index f23dbfdf3a5..626c65baadd 100644 --- a/source/gameengine/Ketsji/BL_BlenderShader.h +++ b/source/gameengine/Ketsji/BL_BlenderShader.h @@ -101,4 +101,4 @@ public: #endif }; -#endif//__BL_BLENDERSHADER_H__ +#endif /* __BL_BLENDERSHADER_H__ */ diff --git a/source/gameengine/Ketsji/BL_Shader.h b/source/gameengine/Ketsji/BL_Shader.h index b577a1849a0..82476873b85 100644 --- a/source/gameengine/Ketsji/BL_Shader.h +++ b/source/gameengine/Ketsji/BL_Shader.h @@ -252,4 +252,4 @@ public: #endif }; -#endif//__BL_SHADER_H__ +#endif /* __BL_SHADER_H__ */ diff --git a/source/gameengine/Ketsji/BL_Texture.h b/source/gameengine/Ketsji/BL_Texture.h index a6bd354d260..cd18ef93822 100644 --- a/source/gameengine/Ketsji/BL_Texture.h +++ b/source/gameengine/Ketsji/BL_Texture.h @@ -79,4 +79,4 @@ public: #endif }; -#endif//__BL_TEXTURE_H__ +#endif /* __BL_TEXTURE_H__ */ diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.h b/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.h index 3202785ee81..9a13b6d53e2 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.h +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.h @@ -52,5 +52,4 @@ public: return m_ndi; } }; -#endif //__KX_NETWORKEVENTMANAGER_H__ - +#endif /* __KX_NETWORKEVENTMANAGER_H__ */ diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h index 980e1cda6dc..325a7be9bd7 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.h @@ -69,5 +69,4 @@ public: }; -#endif //__KX_NETWORKMESSAGEACTUATOR_H__ - +#endif /* __KX_NETWORKMESSAGEACTUATOR_H__ */ diff --git a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h index 6b9779de6e3..a1f0692b7b3 100644 --- a/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h +++ b/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h @@ -83,9 +83,8 @@ public: static PyObject* pyattr_get_bodies(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); static PyObject* pyattr_get_subjects(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ }; -#endif //__KX_NETWORKMESSAGESENSOR_H__ - +#endif /* __KX_NETWORKMESSAGESENSOR_H__ */ diff --git a/source/gameengine/Ketsji/KX_ArmatureSensor.h b/source/gameengine/Ketsji/KX_ArmatureSensor.h index 74603b3ff01..b3ea905d198 100644 --- a/source/gameengine/Ketsji/KX_ArmatureSensor.h +++ b/source/gameengine/Ketsji/KX_ArmatureSensor.h @@ -74,7 +74,7 @@ public: /* --------------------------------------------------------------------- */ static PyObject *pyattr_get_constraint(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ private: struct bConstraint* m_constraint; diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.h b/source/gameengine/Ketsji/KX_BlenderMaterial.h index a69f5c92d19..1653669ebcc 100644 --- a/source/gameengine/Ketsji/KX_BlenderMaterial.h +++ b/source/gameengine/Ketsji/KX_BlenderMaterial.h @@ -119,7 +119,7 @@ public: KX_PYMETHOD_DOC(KX_BlenderMaterial, setTexture); KX_PYMETHOD_DOC(KX_BlenderMaterial, setBlending); -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ // -------------------------------- // pre calculate to avoid pops/lag at startup diff --git a/source/gameengine/Ketsji/KX_BulletPhysicsController.h b/source/gameengine/Ketsji/KX_BulletPhysicsController.h index 71e806686ca..4813b39a34e 100644 --- a/source/gameengine/Ketsji/KX_BulletPhysicsController.h +++ b/source/gameengine/Ketsji/KX_BulletPhysicsController.h @@ -96,5 +96,4 @@ public: #endif }; -#endif //__KX_BULLETPHYSICSCONTROLLER_H__ - +#endif /* __KX_BULLETPHYSICSCONTROLLER_H__ */ diff --git a/source/gameengine/Ketsji/KX_Camera.cpp b/source/gameengine/Ketsji/KX_Camera.cpp index c0071ab22f6..90912409af1 100644 --- a/source/gameengine/Ketsji/KX_Camera.cpp +++ b/source/gameengine/Ketsji/KX_Camera.cpp @@ -956,7 +956,7 @@ KX_PYMETHODDEF_DOC_O(KX_Camera, getScreenPosition, } } - GLint viewport[4]; + const GLint *viewport; GLdouble win[3]; GLdouble modelmatrix[16]; GLdouble projmatrix[16]; @@ -967,7 +967,7 @@ KX_PYMETHODDEF_DOC_O(KX_Camera, getScreenPosition, m_modelmatrix.getValue(modelmatrix); m_projmatrix.getValue(projmatrix); - glGetIntegerv(GL_VIEWPORT, viewport); + viewport = KX_GetActiveEngine()->GetCanvas()->GetViewPort(); gluProject(vect[0], vect[1], vect[2], modelmatrix, projmatrix, viewport, &win[0], &win[1], &win[2]); @@ -999,7 +999,7 @@ KX_PYMETHODDEF_DOC_VARARGS(KX_Camera, getScreenVect, MT_Vector3 vect; MT_Point3 campos, screenpos; - GLint viewport[4]; + const GLint *viewport; GLdouble win[3]; GLdouble modelmatrix[16]; GLdouble projmatrix[16]; @@ -1010,7 +1010,7 @@ KX_PYMETHODDEF_DOC_VARARGS(KX_Camera, getScreenVect, m_modelmatrix.getValue(modelmatrix); m_projmatrix.getValue(projmatrix); - glGetIntegerv(GL_VIEWPORT, viewport); + viewport = KX_GetActiveEngine()->GetCanvas()->GetViewPort(); vect[0] = x * viewport[2]; vect[1] = y * viewport[3]; diff --git a/source/gameengine/Ketsji/KX_Camera.h b/source/gameengine/Ketsji/KX_Camera.h index d95d10e8384..6c1dc1edb51 100644 --- a/source/gameengine/Ketsji/KX_Camera.h +++ b/source/gameengine/Ketsji/KX_Camera.h @@ -321,5 +321,4 @@ public: #endif }; -#endif //__KX_CAMERA_H__ - +#endif /* __KX_CAMERA_H__ */ diff --git a/source/gameengine/Ketsji/KX_CameraActuator.h b/source/gameengine/Ketsji/KX_CameraActuator.h index c67174d2830..fb0a7d88dd9 100644 --- a/source/gameengine/Ketsji/KX_CameraActuator.h +++ b/source/gameengine/Ketsji/KX_CameraActuator.h @@ -131,9 +131,8 @@ private : static PyObject* pyattr_get_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_set_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ }; -#endif //__KX_CAMERAACTUATOR_H__ - +#endif /* __KX_CAMERAACTUATOR_H__ */ diff --git a/source/gameengine/Ketsji/KX_CameraIpoSGController.h b/source/gameengine/Ketsji/KX_CameraIpoSGController.h index 9b7c1eddf00..1f6f211622c 100644 --- a/source/gameengine/Ketsji/KX_CameraIpoSGController.h +++ b/source/gameengine/Ketsji/KX_CameraIpoSGController.h @@ -94,5 +94,4 @@ public: #endif }; -#endif // __KX_CAMERAIPOSGCONTROLLER_H__ - +#endif /* __KX_CAMERAIPOSGCONTROLLER_H__ */ diff --git a/source/gameengine/Ketsji/KX_ClientObjectInfo.h b/source/gameengine/Ketsji/KX_ClientObjectInfo.h index 6fd1271160a..e947eb4be6d 100644 --- a/source/gameengine/Ketsji/KX_ClientObjectInfo.h +++ b/source/gameengine/Ketsji/KX_ClientObjectInfo.h @@ -84,5 +84,4 @@ public: #endif }; -#endif //__KX_CLIENTOBJECTINFO_H__ - +#endif /* __KX_CLIENTOBJECTINFO_H__ */ diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.h b/source/gameengine/Ketsji/KX_ConstraintActuator.h index 786e4ff53d2..edb2e5e0180 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.h +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.h @@ -145,5 +145,4 @@ protected: }; -#endif //__KX_CONSTRAINTACTUATOR_H__ - +#endif /* __KX_CONSTRAINTACTUATOR_H__ */ diff --git a/source/gameengine/Ketsji/KX_ConstraintWrapper.h b/source/gameengine/Ketsji/KX_ConstraintWrapper.h index dbc3571cad6..eafc45b5a70 100644 --- a/source/gameengine/Ketsji/KX_ConstraintWrapper.h +++ b/source/gameengine/Ketsji/KX_ConstraintWrapper.h @@ -57,5 +57,4 @@ private: PHY_IPhysicsEnvironment* m_physenv; }; -#endif //__KX_CONSTRAINTWRAPPER_H__ - +#endif /* __KX_CONSTRAINTWRAPPER_H__ */ diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h index 0f1ce403881..e71037d08a0 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObject.h @@ -159,4 +159,4 @@ void KX_ClearBulletSharedShapes(); bool KX_ReInstanceBulletShapeFromMesh(KX_GameObject *gameobj, KX_GameObject *from_gameobj, RAS_MeshObject* from_meshobj); #endif -#endif //__KX_CONVERTPHYSICSOBJECT_H__ +#endif /* __KX_CONVERTPHYSICSOBJECT_H__ */ diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp index fd3a18a9d2a..87b0cfc1269 100644 --- a/source/gameengine/Ketsji/KX_Dome.cpp +++ b/source/gameengine/Ketsji/KX_Dome.cpp @@ -90,8 +90,7 @@ KX_Dome::KX_Dome ( } //setting the viewport size - GLuint viewport[4]={0}; - glGetIntegerv(GL_VIEWPORT,(GLint *)viewport); + const int *viewport = m_canvas->GetViewPort(); SetViewPort(viewport); @@ -178,7 +177,7 @@ KX_Dome::~KX_Dome (void) glDeleteLists(dlistId, (GLsizei) m_numimages); } -void KX_Dome::SetViewPort(GLuint viewport[4]) +void KX_Dome::SetViewPort(const int viewport[4]) { if (canvaswidth != m_viewport.GetWidth() || canvasheight != m_viewport.GetHeight()) { diff --git a/source/gameengine/Ketsji/KX_Dome.h b/source/gameengine/Ketsji/KX_Dome.h index 24177af5d60..17eec3a5fcb 100644 --- a/source/gameengine/Ketsji/KX_Dome.h +++ b/source/gameengine/Ketsji/KX_Dome.h @@ -119,7 +119,7 @@ public: void RenderDomeFrame(KX_Scene* scene, KX_Camera* cam, int i); void BindImages(int i); - void SetViewPort(GLuint viewport[4]); + void SetViewPort(const int viewport[4]); void CalculateFrustum(KX_Camera* cam); void RotateCamera(KX_Camera* cam, int i); diff --git a/source/gameengine/Ketsji/KX_EmptyObject.h b/source/gameengine/Ketsji/KX_EmptyObject.h index b99f44c38c5..63a0782a544 100644 --- a/source/gameengine/Ketsji/KX_EmptyObject.h +++ b/source/gameengine/Ketsji/KX_EmptyObject.h @@ -47,5 +47,4 @@ public: #endif }; -#endif //__KX_EMPTYOBJECT_H__ - +#endif /* __KX_EMPTYOBJECT_H__ */ diff --git a/source/gameengine/Ketsji/KX_FontObject.h b/source/gameengine/Ketsji/KX_FontObject.h index ae8b4166238..ac22de6fb6f 100644 --- a/source/gameengine/Ketsji/KX_FontObject.h +++ b/source/gameengine/Ketsji/KX_FontObject.h @@ -76,4 +76,4 @@ protected: }; -#endif //__KX_FONTOBJECT_H__ +#endif /* __KX_FONTOBJECT_H__ */ diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index fe8419d5343..3cfb670d227 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -109,6 +109,8 @@ KX_GameObject::KX_GameObject( m_xray(false), m_pHitObject(NULL), m_pObstacleSimulation(NULL), + m_pInstanceObjects(NULL), + m_pDupliGroupObject(NULL), m_actionManager(NULL), m_isDeformable(false) #ifdef WITH_PYTHON @@ -168,6 +170,16 @@ KX_GameObject::~KX_GameObject() KX_GetActiveScene()->RemoveAnimatedObject(this); delete m_actionManager; } + + if (m_pDupliGroupObject) + { + m_pDupliGroupObject->Release(); + } + + if (m_pInstanceObjects) + { + m_pInstanceObjects->Release(); + } #ifdef WITH_PYTHON if (m_attr_dict) { PyDict_Clear(m_attr_dict); /* in case of circular refs or other weird cases */ @@ -229,6 +241,46 @@ KX_IPhysicsController* KX_GameObject::GetPhysicsController() return m_pPhysicsController1; } +KX_GameObject* KX_GameObject::GetDupliGroupObject() +{ + return m_pDupliGroupObject; +} + +CListValue* KX_GameObject::GetInstanceObjects() +{ + return m_pInstanceObjects; +} + +void KX_GameObject::AddInstanceObjects(KX_GameObject* obj) +{ + if(!m_pInstanceObjects) + m_pInstanceObjects = new CListValue(); + + obj->AddRef(); + m_pInstanceObjects->Add(obj); +} + +void KX_GameObject::RemoveInstanceObject(KX_GameObject* obj) +{ + assert(m_pInstanceObjects); + m_pInstanceObjects->RemoveValue(obj); + obj->Release(); +} + +void KX_GameObject::RemoveDupliGroupObject() +{ + if(m_pDupliGroupObject) { + m_pDupliGroupObject->Release(); + m_pDupliGroupObject = NULL; + } +} + +void KX_GameObject::SetDupliGroupObject(KX_GameObject* obj) +{ + obj->AddRef(); + m_pDupliGroupObject = obj; +} + KX_GameObject* KX_GameObject::GetParent() { KX_GameObject* result = NULL; @@ -1629,6 +1681,9 @@ PyMethodDef KX_GameObject::Methods[] = { PyAttributeDef KX_GameObject::Attributes[] = { KX_PYATTRIBUTE_RO_FUNCTION("name", KX_GameObject, pyattr_get_name), KX_PYATTRIBUTE_RO_FUNCTION("parent", KX_GameObject, pyattr_get_parent), + KX_PYATTRIBUTE_RO_FUNCTION("group_children", KX_GameObject, pyattr_get_group_children), + KX_PYATTRIBUTE_RO_FUNCTION("group_parent", KX_GameObject, pyattr_get_group_parent), + KX_PYATTRIBUTE_RO_FUNCTION("scene", KX_GameObject, pyattr_get_scene), KX_PYATTRIBUTE_RO_FUNCTION("life", KX_GameObject, pyattr_get_life), KX_PYATTRIBUTE_RW_FUNCTION("mass", KX_GameObject, pyattr_get_mass, pyattr_set_mass), KX_PYATTRIBUTE_RW_FUNCTION("linVelocityMin", KX_GameObject, pyattr_get_lin_vel_min, pyattr_set_lin_vel_min), @@ -1924,6 +1979,37 @@ PyObject *KX_GameObject::pyattr_get_parent(void *self_v, const KX_PYATTRIBUTE_DE Py_RETURN_NONE; } +PyObject *KX_GameObject::pyattr_get_group_children(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +{ + KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + CListValue* instances = self->GetInstanceObjects(); + if (instances) { + return instances->GetProxy(); + } + Py_RETURN_NONE; +} + +PyObject* KX_GameObject::pyattr_get_scene(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +{ + KX_GameObject *self = static_cast<KX_GameObject*>(self_v); + SG_Node *node = self->GetSGNode(); + KX_Scene *scene = static_cast<KX_Scene *>(node->GetSGClientInfo()); + if (scene) { + return scene->GetProxy(); + } + Py_RETURN_NONE; +} + +PyObject *KX_GameObject::pyattr_get_group_parent(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) +{ + KX_GameObject* self= static_cast<KX_GameObject*>(self_v); + KX_GameObject* pivot = self->GetDupliGroupObject(); + if (pivot) { + return pivot->GetProxy(); + } + Py_RETURN_NONE; +} + PyObject *KX_GameObject::pyattr_get_life(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { KX_GameObject* self= static_cast<KX_GameObject*>(self_v); diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h index ea75ca4a917..52fc3da5465 100644 --- a/source/gameengine/Ketsji/KX_GameObject.h +++ b/source/gameengine/Ketsji/KX_GameObject.h @@ -116,6 +116,8 @@ protected: KX_ObstacleSimulation* m_pObstacleSimulation; + CListValue* m_pInstanceObjects; + KX_GameObject* m_pDupliGroupObject; // The action manager is used to play/stop/update actions BL_ActionManager* m_actionManager; @@ -208,6 +210,33 @@ public: void RemoveParent(KX_Scene *scene); /********************************* + * group reference API + *********************************/ + + KX_GameObject* + GetDupliGroupObject( + ); + + CListValue* + GetInstanceObjects( + ); + + void + SetDupliGroupObject(KX_GameObject* + ); + + void + AddInstanceObjects(KX_GameObject* + ); + + void + RemoveDupliGroupObject( + ); + + void + RemoveInstanceObject(KX_GameObject* + ); + /********************************* * Animation API *********************************/ @@ -949,6 +978,10 @@ public: static PyObject* pyattr_get_name(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); static PyObject* pyattr_get_parent(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); + static PyObject* pyattr_get_group_parent(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); + static PyObject* pyattr_get_group_children(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); + static PyObject* pyattr_get_scene(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); + static PyObject* pyattr_get_life(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); static PyObject* pyattr_get_mass(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_set_mass(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); @@ -1008,5 +1041,4 @@ public: -#endif //__KX_GAMEOBJECT_H__ - +#endif /* __KX_GAMEOBJECT_H__ */ diff --git a/source/gameengine/Ketsji/KX_IPO_SGController.h b/source/gameengine/Ketsji/KX_IPO_SGController.h index 266b89ff969..cecfa9804db 100644 --- a/source/gameengine/Ketsji/KX_IPO_SGController.h +++ b/source/gameengine/Ketsji/KX_IPO_SGController.h @@ -126,6 +126,4 @@ public: #endif }; -#endif //__KX_IPO_SGCONTROLLER_H__ - - +#endif /* __KX_IPO_SGCONTROLLER_H__ */ diff --git a/source/gameengine/Ketsji/KX_IPhysicsController.h b/source/gameengine/Ketsji/KX_IPhysicsController.h index dd34549c1fb..280b1816a1e 100644 --- a/source/gameengine/Ketsji/KX_IPhysicsController.h +++ b/source/gameengine/Ketsji/KX_IPhysicsController.h @@ -145,5 +145,4 @@ public: #endif }; -#endif //__KX_IPHYSICSCONTROLLER_H__ - +#endif /* __KX_IPHYSICSCONTROLLER_H__ */ diff --git a/source/gameengine/Ketsji/KX_ISceneConverter.h b/source/gameengine/Ketsji/KX_ISceneConverter.h index 919ae1d6de5..18fb336dbe0 100644 --- a/source/gameengine/Ketsji/KX_ISceneConverter.h +++ b/source/gameengine/Ketsji/KX_ISceneConverter.h @@ -93,5 +93,4 @@ public: #endif }; -#endif //__KX_ISCENECONVERTER_H__ - +#endif /* __KX_ISCENECONVERTER_H__ */ diff --git a/source/gameengine/Ketsji/KX_IpoActuator.h b/source/gameengine/Ketsji/KX_IpoActuator.h index 58cdfc28742..1c2f4e49b72 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.h +++ b/source/gameengine/Ketsji/KX_IpoActuator.h @@ -150,5 +150,4 @@ public: }; -#endif //__KX_IPOACTUATOR_H__ - +#endif /* __KX_IPOACTUATOR_H__ */ diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index c2857141058..e446e5338bc 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -275,8 +275,7 @@ void KX_KetsjiEngine::InitDome(short res, short mode, short angle, float resbuf, void KX_KetsjiEngine::RenderDome() { - GLuint viewport[4]={0}; - glGetIntegerv(GL_VIEWPORT,(GLint *)viewport); + const GLint *viewport = m_canvas->GetViewPort(); m_dome->SetViewPort(viewport); diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.h b/source/gameengine/Ketsji/KX_KetsjiEngine.h index e05ba652bbe..972594bd90f 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.h +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.h @@ -447,6 +447,4 @@ protected: #endif }; -#endif //__KX_KETSJIENGINE_H__ - - +#endif /* __KX_KETSJIENGINE_H__ */ diff --git a/source/gameengine/Ketsji/KX_Light.h b/source/gameengine/Ketsji/KX_Light.h index 7426896a92a..52f076c772a 100644 --- a/source/gameengine/Ketsji/KX_Light.h +++ b/source/gameengine/Ketsji/KX_Light.h @@ -83,5 +83,4 @@ public: #endif }; -#endif //__KX_LIGHT_H__ - +#endif /* __KX_LIGHT_H__ */ diff --git a/source/gameengine/Ketsji/KX_LightIpoSGController.h b/source/gameengine/Ketsji/KX_LightIpoSGController.h index 4a1ceba0963..c82fe7bcad5 100644 --- a/source/gameengine/Ketsji/KX_LightIpoSGController.h +++ b/source/gameengine/Ketsji/KX_LightIpoSGController.h @@ -102,5 +102,4 @@ public: #endif }; -#endif // __KX_LIGHTIPOSGCONTROLLER_H__ - +#endif /* __KX_LIGHTIPOSGCONTROLLER_H__ */ diff --git a/source/gameengine/Ketsji/KX_MaterialIpoController.h b/source/gameengine/Ketsji/KX_MaterialIpoController.h index ee5546641c2..a7e9c2cc1c5 100644 --- a/source/gameengine/Ketsji/KX_MaterialIpoController.h +++ b/source/gameengine/Ketsji/KX_MaterialIpoController.h @@ -62,7 +62,4 @@ public: #endif }; - - - -#endif//__KX_MATERIALIPOCONTROLLER_H__ +#endif /* __KX_MATERIALIPOCONTROLLER_H__ */ diff --git a/source/gameengine/Ketsji/KX_MeshProxy.h b/source/gameengine/Ketsji/KX_MeshProxy.h index a05ef6ab2e7..98e73aa626f 100644 --- a/source/gameengine/Ketsji/KX_MeshProxy.h +++ b/source/gameengine/Ketsji/KX_MeshProxy.h @@ -77,7 +77,6 @@ public: static PyObject *pyattr_get_numPolygons(void * self, const KX_PYATTRIBUTE_DEF * attrdef); }; -#endif // WITH_PYTHON - -#endif //__KX_MESHPROXY_H__ +#endif /* WITH_PYTHON */ +#endif /* __KX_MESHPROXY_H__ */ diff --git a/source/gameengine/Ketsji/KX_MotionState.h b/source/gameengine/Ketsji/KX_MotionState.h index 3bead93cbda..116e62f408f 100644 --- a/source/gameengine/Ketsji/KX_MotionState.h +++ b/source/gameengine/Ketsji/KX_MotionState.h @@ -62,5 +62,4 @@ public: #endif }; -#endif //__KX_MOTIONSTATE_H__ - +#endif /* __KX_MOTIONSTATE_H__ */ diff --git a/source/gameengine/Ketsji/KX_MouseFocusSensor.h b/source/gameengine/Ketsji/KX_MouseFocusSensor.h index db9e3697492..a8376dcb4fb 100644 --- a/source/gameengine/Ketsji/KX_MouseFocusSensor.h +++ b/source/gameengine/Ketsji/KX_MouseFocusSensor.h @@ -111,7 +111,7 @@ class KX_MouseFocusSensor : public SCA_MouseSensor static PyObject* pyattr_get_hit_normal(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); static PyObject* pyattr_get_hit_uv(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef); -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ /* --------------------------------------------------------------------- */ SCA_IObject* m_hitObject; @@ -183,5 +183,4 @@ class KX_MouseFocusSensor : public SCA_MouseSensor KX_KetsjiEngine* m_kxengine; }; -#endif //__KX_MOUSESENSOR - +#endif /* __KX_MOUSESENSOR */ diff --git a/source/gameengine/Ketsji/KX_NavMeshObject.h b/source/gameengine/Ketsji/KX_NavMeshObject.h index db35a011c16..1599361b334 100644 --- a/source/gameengine/Ketsji/KX_NavMeshObject.h +++ b/source/gameengine/Ketsji/KX_NavMeshObject.h @@ -74,8 +74,7 @@ public: KX_PYMETHOD_DOC(KX_NavMeshObject, raycast); KX_PYMETHOD_DOC(KX_NavMeshObject, draw); KX_PYMETHOD_DOC_NOARGS(KX_NavMeshObject, rebuild); -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ }; -#endif //__KX_NAVMESHOBJECT_H__ - +#endif /* __KX_NAVMESHOBJECT_H__ */ diff --git a/source/gameengine/Ketsji/KX_NearSensor.h b/source/gameengine/Ketsji/KX_NearSensor.h index 82f523283ed..ef6e15f602f 100644 --- a/source/gameengine/Ketsji/KX_NearSensor.h +++ b/source/gameengine/Ketsji/KX_NearSensor.h @@ -100,9 +100,8 @@ public: return 0; } -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ }; -#endif //__KX_NEARSENSOR_H__ - +#endif /* __KX_NEARSENSOR_H__ */ diff --git a/source/gameengine/Ketsji/KX_ObColorIpoSGController.h b/source/gameengine/Ketsji/KX_ObColorIpoSGController.h index 9a9b3dac098..a7b0b2c4ffc 100644 --- a/source/gameengine/Ketsji/KX_ObColorIpoSGController.h +++ b/source/gameengine/Ketsji/KX_ObColorIpoSGController.h @@ -77,5 +77,4 @@ public: #endif }; -#endif // __KX_OBCOLORIPOSGCONTROLLER_H__ - +#endif /* __KX_OBCOLORIPOSGCONTROLLER_H__ */ diff --git a/source/gameengine/Ketsji/KX_ObjectActuator.h b/source/gameengine/Ketsji/KX_ObjectActuator.h index 397234488b7..b0efee550af 100644 --- a/source/gameengine/Ketsji/KX_ObjectActuator.h +++ b/source/gameengine/Ketsji/KX_ObjectActuator.h @@ -218,9 +218,8 @@ public: return 0; } -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ }; -#endif //__KX_OBJECTACTUATOR_H__ - +#endif /* __KX_OBJECTACTUATOR_H__ */ diff --git a/source/gameengine/Ketsji/KX_ParentActuator.h b/source/gameengine/Ketsji/KX_ParentActuator.h index f2f5acd3dfb..40baac6b2b2 100644 --- a/source/gameengine/Ketsji/KX_ParentActuator.h +++ b/source/gameengine/Ketsji/KX_ParentActuator.h @@ -84,9 +84,8 @@ public: static PyObject *pyattr_get_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_set_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ }; /* end of class KX_ParentActuator : public SCA_PropertyActuator */ -#endif - +#endif /* __KX_PARENTACTUATOR_H__ */ diff --git a/source/gameengine/Ketsji/KX_PhysicsEngineEnums.h b/source/gameengine/Ketsji/KX_PhysicsEngineEnums.h index 5cebedf8c30..ca99c2e7526 100644 --- a/source/gameengine/Ketsji/KX_PhysicsEngineEnums.h +++ b/source/gameengine/Ketsji/KX_PhysicsEngineEnums.h @@ -39,5 +39,4 @@ enum e_PhysicsEngine UseBullet = 5, }; -#endif //__KX_PHYSICSENGINEENUMS_H__ - +#endif /* __KX_PHYSICSENGINEENUMS_H__ */ diff --git a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h index a074ff9a3bd..171416c5e8f 100644 --- a/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h +++ b/source/gameengine/Ketsji/KX_PhysicsObjectWrapper.h @@ -49,12 +49,11 @@ public: KX_PYMETHOD_VARARGS(KX_PhysicsObjectWrapper,SetAngularVelocity); KX_PYMETHOD_VARARGS(KX_PhysicsObjectWrapper,SetActive); -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ private: class PHY_IPhysicsController* m_ctrl; PHY_IPhysicsEnvironment* m_physenv; }; -#endif //__KX_PHYSICSOBJECTWRAPPER_H__ - +#endif /* __KX_PHYSICSOBJECTWRAPPER_H__ */ diff --git a/source/gameengine/Ketsji/KX_PhysicsPropertiesobsolete.h b/source/gameengine/Ketsji/KX_PhysicsPropertiesobsolete.h index 86ba2500763..ee685edb9c1 100644 --- a/source/gameengine/Ketsji/KX_PhysicsPropertiesobsolete.h +++ b/source/gameengine/Ketsji/KX_PhysicsPropertiesobsolete.h @@ -58,5 +58,4 @@ struct KX_MaterialProps { bool m_fh_normal; // Should the object slide off slopes? }; -#endif //__KX_PHYSICSPROPERTIESOBSOLETE_H__ - +#endif /* __KX_PHYSICSPROPERTIESOBSOLETE_H__ */ diff --git a/source/gameengine/Ketsji/KX_PolyProxy.h b/source/gameengine/Ketsji/KX_PolyProxy.h index 9e3556a03f8..f02aa90998e 100644 --- a/source/gameengine/Ketsji/KX_PolyProxy.h +++ b/source/gameengine/Ketsji/KX_PolyProxy.h @@ -80,7 +80,6 @@ public: }; -#endif // WITH_PYTHON - -#endif //__KX_POLYPROXY +#endif /* WITH_PYTHON */ +#endif /* __KX_POLYPROXY */ diff --git a/source/gameengine/Ketsji/KX_PolygonMaterial.h b/source/gameengine/Ketsji/KX_PolygonMaterial.h index 6384008fb7d..89bfb4ff9fb 100644 --- a/source/gameengine/Ketsji/KX_PolygonMaterial.h +++ b/source/gameengine/Ketsji/KX_PolygonMaterial.h @@ -153,5 +153,4 @@ public: }; -#endif // __KX_POLYGONMATERIAL_H__ - +#endif /* __KX_POLYGONMATERIAL_H__ */ diff --git a/source/gameengine/Ketsji/KX_PyConstraintBinding.h b/source/gameengine/Ketsji/KX_PyConstraintBinding.h index 69a6e333cee..b4a520ce71b 100644 --- a/source/gameengine/Ketsji/KX_PyConstraintBinding.h +++ b/source/gameengine/Ketsji/KX_PyConstraintBinding.h @@ -39,7 +39,6 @@ PyObject* initPythonConstraintBinding(); void PHY_SetActiveEnvironment(class PHY_IPhysicsEnvironment* env); PHY_IPhysicsEnvironment* PHY_GetActiveEnvironment(); -#endif // WITH_PYTHON - -#endif //__KX_PYCONSTRAINTBINDING_H__ +#endif /* WITH_PYTHON */ +#endif /* __KX_PYCONSTRAINTBINDING_H__ */ diff --git a/source/gameengine/Ketsji/KX_PyMath.h b/source/gameengine/Ketsji/KX_PyMath.h index d79397ed807..159506946e8 100644 --- a/source/gameengine/Ketsji/KX_PyMath.h +++ b/source/gameengine/Ketsji/KX_PyMath.h @@ -273,4 +273,4 @@ PyObject *PyObjectFrom(const MT_Tuple4 &pos); #endif -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ diff --git a/source/gameengine/Ketsji/KX_PythonInit.h b/source/gameengine/Ketsji/KX_PythonInit.h index 69517b2b1e9..859c31adcd3 100644 --- a/source/gameengine/Ketsji/KX_PythonInit.h +++ b/source/gameengine/Ketsji/KX_PythonInit.h @@ -89,5 +89,4 @@ void KX_RasterizerDrawDebugCircle(const MT_Vector3& center, const MT_Scalar rad const MT_Vector3& normal, int nsector); -#endif //__KX_PYTHONINIT_H__ - +#endif /* __KX_PYTHONINIT_H__ */ diff --git a/source/gameengine/Ketsji/KX_PythonSeq.h b/source/gameengine/Ketsji/KX_PythonSeq.h index 47a01737cdb..568d59119c0 100644 --- a/source/gameengine/Ketsji/KX_PythonSeq.h +++ b/source/gameengine/Ketsji/KX_PythonSeq.h @@ -30,8 +30,8 @@ * \brief Readonly sequence wrapper for lookups on logic bricks */ -#ifndef _adr_py_seq_h_ // only process once, -#define _adr_py_seq_h_ // even if multiply included +#ifndef __KX_PYTHONSEQ_H__ +#define __KX_PYTHONSEQ_H__ #ifdef WITH_PYTHON @@ -63,6 +63,6 @@ typedef struct { PyObject *KX_PythonSeq_CreatePyObject(PyObject *base, short type); -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ -#endif // _adr_py_seq_h_ +#endif /* __KX_PYTHONSEQ_H__ */ diff --git a/source/gameengine/Ketsji/KX_RadarSensor.h b/source/gameengine/Ketsji/KX_RadarSensor.h index 2de58f8b3a0..6a2d50ffa3a 100644 --- a/source/gameengine/Ketsji/KX_RadarSensor.h +++ b/source/gameengine/Ketsji/KX_RadarSensor.h @@ -97,5 +97,4 @@ public: #endif }; -#endif //__KX_RADARSENSOR_H__ - +#endif /* __KX_RADARSENSOR_H__ */ diff --git a/source/gameengine/Ketsji/KX_RayEventManager.h b/source/gameengine/Ketsji/KX_RayEventManager.h index f795495d1c9..07506b9e32b 100644 --- a/source/gameengine/Ketsji/KX_RayEventManager.h +++ b/source/gameengine/Ketsji/KX_RayEventManager.h @@ -50,5 +50,4 @@ public: #endif }; -#endif //__KX_RAYEVENTMANAGER_H__ - +#endif /* __KX_RAYEVENTMANAGER_H__ */ diff --git a/source/gameengine/Ketsji/KX_RaySensor.h b/source/gameengine/Ketsji/KX_RaySensor.h index 27aaa442dcd..9d40fb55747 100644 --- a/source/gameengine/Ketsji/KX_RaySensor.h +++ b/source/gameengine/Ketsji/KX_RaySensor.h @@ -96,9 +96,8 @@ public: /* Attributes */ static PyObject *pyattr_get_hitobject(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef); -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ }; -#endif //__KX_RAYSENSOR_H__ - +#endif /* __KX_RAYSENSOR_H__ */ diff --git a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h index 9c8cbfa3d09..7dac93acd21 100644 --- a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h +++ b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.h @@ -126,9 +126,8 @@ public: static int pyattr_set_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); static PyObject *pyattr_get_objectLastCreated(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ }; /* end of class KX_SCA_AddObjectActuator : public KX_EditObjectActuator */ -#endif - +#endif /* __KX_SCA_ADDOBJECTACTUATOR_H__ */ diff --git a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h index 52a20142442..4370b5d4a4f 100644 --- a/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h +++ b/source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.h @@ -89,9 +89,8 @@ class KX_SCA_ReplaceMeshActuator : public SCA_IActuator KX_PYMETHOD_DOC(KX_SCA_ReplaceMeshActuator,instantReplaceMesh); -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ }; -#endif - +#endif /* __KX_SCA_REPLACEMESHACTUATOR_H__ */ diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 652ed2ab2dd..f6ab9af261e 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -769,6 +769,13 @@ void KX_Scene::DupliGroupRecurse(CValue* obj, int level) // we can now add the graphic controller to the physic engine replica->ActivateGraphicController(true); + // set references for dupli-group + // groupobj holds a list of all objects, that belongs to this group + groupobj->AddInstanceObjects(replica); + + // every object gets the reference to its dupli-group object + replica->SetDupliGroupObject(groupobj); + // done with replica replica->Release(); } @@ -1017,6 +1024,20 @@ int KX_Scene::NewRemoveObject(class CValue* gameobj) m_timemgr->RemoveTimeProperty(propval); } } + + // if the object is the dupligroup proxy, you have to cleanup all m_pDupliGroupObject's in all + // instances refering to this group + if(newobj->GetInstanceObjects()) { + for (int i = 0; i < newobj->GetInstanceObjects()->GetCount(); i++) { + KX_GameObject* instance = (KX_GameObject*)newobj->GetInstanceObjects()->GetValue(i); + instance->RemoveDupliGroupObject(); + } + } + + // if this object was part of a group, make sure to remove it from that group's instance list + KX_GameObject* group = newobj->GetDupliGroupObject(); + if (group) + group->RemoveInstanceObject(newobj); newobj->RemoveMeshes(); ret = 1; @@ -1481,7 +1502,15 @@ void KX_Scene::CalculateVisibleMeshes(RAS_IRasterizer* rasty,KX_Camera* cam, int planes[4].setValue(cplanes[2].getValue()); // top planes[5].setValue(cplanes[3].getValue()); // bottom CullingInfo info(layer); - dbvt_culling = m_physicsEnvironment->cullingTest(PhysicsCullingCallback,&info,planes,5,m_dbvt_occlusion_res); + + double mvmat[16] = {0}; + cam->GetModelviewMatrix().getValue(mvmat); + double pmat[16] = {0}; + cam->GetProjectionMatrix().getValue(pmat); + + dbvt_culling = m_physicsEnvironment->cullingTest(PhysicsCullingCallback,&info,planes,5,m_dbvt_occlusion_res, + KX_GetActiveEngine()->GetCanvas()->GetViewPort(), + mvmat, pmat); } if (!dbvt_culling) { // the physics engine couldn't help us, do it the hard way diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h index bb329da99de..c2e468e6da6 100644 --- a/source/gameengine/Ketsji/KX_Scene.h +++ b/source/gameengine/Ketsji/KX_Scene.h @@ -665,5 +665,4 @@ public: typedef std::vector<KX_Scene*> KX_SceneList; -#endif //__KX_SCENE_H__ - +#endif /* __KX_SCENE_H__ */ diff --git a/source/gameengine/Ketsji/KX_SceneActuator.h b/source/gameengine/Ketsji/KX_SceneActuator.h index 0b633334cce..389e9208ef3 100644 --- a/source/gameengine/Ketsji/KX_SceneActuator.h +++ b/source/gameengine/Ketsji/KX_SceneActuator.h @@ -102,9 +102,8 @@ class KX_SceneActuator : public SCA_IActuator static PyObject *pyattr_get_camera(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_set_camera(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ }; /* end of class KXSceneActuator */ #endif - diff --git a/source/gameengine/Ketsji/KX_SoundActuator.h b/source/gameengine/Ketsji/KX_SoundActuator.h index fcaf214dd90..1ce44e942e8 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.h +++ b/source/gameengine/Ketsji/KX_SoundActuator.h @@ -122,9 +122,8 @@ public: static PyObject *pyattr_get_type(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); static PyObject *pyattr_get_sound(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ }; -#endif //__KX_SOUNDACTUATOR_H__ - +#endif /* __KX_SOUNDACTUATOR_H__ */ diff --git a/source/gameengine/Ketsji/KX_SteeringActuator.h b/source/gameengine/Ketsji/KX_SteeringActuator.h index 341421d8948..1e8ac9a54f0 100644 --- a/source/gameengine/Ketsji/KX_SteeringActuator.h +++ b/source/gameengine/Ketsji/KX_SteeringActuator.h @@ -114,9 +114,8 @@ public: static PyObject *pyattr_get_steeringVec(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ }; /* end of class KX_SteeringActuator : public SCA_PropertyActuator */ -#endif - +#endif /* __KX_STEERINGACTUATOR_H__ */ diff --git a/source/gameengine/Ketsji/KX_TimeCategoryLogger.h b/source/gameengine/Ketsji/KX_TimeCategoryLogger.h index ea780739695..d167d0addfe 100644 --- a/source/gameengine/Ketsji/KX_TimeCategoryLogger.h +++ b/source/gameengine/Ketsji/KX_TimeCategoryLogger.h @@ -133,5 +133,4 @@ protected: #endif }; -#endif // __KX_TIMECATEGORYLOGGER_H__ - +#endif /* __KX_TIMECATEGORYLOGGER_H__ */ diff --git a/source/gameengine/Ketsji/KX_TimeLogger.h b/source/gameengine/Ketsji/KX_TimeLogger.h index 83c934ea81b..bafc27b504c 100644 --- a/source/gameengine/Ketsji/KX_TimeLogger.h +++ b/source/gameengine/Ketsji/KX_TimeLogger.h @@ -111,5 +111,4 @@ protected: #endif }; -#endif // __KX_TIMELOGGER_H__ - +#endif /* __KX_TIMELOGGER_H__ */ diff --git a/source/gameengine/Ketsji/KX_TouchEventManager.h b/source/gameengine/Ketsji/KX_TouchEventManager.h index d9a0164fd05..63e9d15959e 100644 --- a/source/gameengine/Ketsji/KX_TouchEventManager.h +++ b/source/gameengine/Ketsji/KX_TouchEventManager.h @@ -85,5 +85,4 @@ public: #endif }; -#endif //__KX_TOUCHEVENTMANAGER_H__ - +#endif /* __KX_TOUCHEVENTMANAGER_H__ */ diff --git a/source/gameengine/Ketsji/KX_TouchSensor.h b/source/gameengine/Ketsji/KX_TouchSensor.h index c80b8598e43..6bd606db8eb 100644 --- a/source/gameengine/Ketsji/KX_TouchSensor.h +++ b/source/gameengine/Ketsji/KX_TouchSensor.h @@ -134,5 +134,4 @@ public: }; -#endif //__KX_TOUCHSENSOR_H__ - +#endif /* __KX_TOUCHSENSOR_H__ */ diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.h b/source/gameengine/Ketsji/KX_TrackToActuator.h index 6329c7b34d9..f5f5c4c2836 100644 --- a/source/gameengine/Ketsji/KX_TrackToActuator.h +++ b/source/gameengine/Ketsji/KX_TrackToActuator.h @@ -77,9 +77,8 @@ class KX_TrackToActuator : public SCA_IActuator static PyObject *pyattr_get_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef); static int pyattr_set_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value); -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ }; /* end of class KX_TrackToActuator : public KX_EditObjectActuator */ -#endif - +#endif /* __KX_TRACKTOACTUATOR_H__ */ diff --git a/source/gameengine/Ketsji/KX_VehicleWrapper.h b/source/gameengine/Ketsji/KX_VehicleWrapper.h index 3684019277c..ccd666e84f3 100644 --- a/source/gameengine/Ketsji/KX_VehicleWrapper.h +++ b/source/gameengine/Ketsji/KX_VehicleWrapper.h @@ -52,11 +52,11 @@ public: KX_PYMETHOD_VARARGS(KX_VehicleWrapper,SetSuspensionCompression); KX_PYMETHOD_VARARGS(KX_VehicleWrapper,SetRollInfluence); -#endif // WITH_PYTHON +#endif /* WITH_PYTHON */ private: PHY_IVehicle* m_vehicle; PHY_IPhysicsEnvironment* m_physenv; }; -#endif //__KX_VEHICLEWRAPPER_H__ +#endif /* __KX_VEHICLEWRAPPER_H__ */ diff --git a/source/gameengine/Ketsji/KX_VertexProxy.h b/source/gameengine/Ketsji/KX_VertexProxy.h index f56e2be26a3..6e193d35b4c 100644 --- a/source/gameengine/Ketsji/KX_VertexProxy.h +++ b/source/gameengine/Ketsji/KX_VertexProxy.h @@ -105,7 +105,6 @@ public: }; -#endif // WITH_PYTHON - -#endif //__KX_VERTEXPROXY_H__ +#endif /* WITH_PYTHON */ +#endif /* __KX_VERTEXPROXY_H__ */ diff --git a/source/gameengine/Ketsji/KX_WorldInfo.h b/source/gameengine/Ketsji/KX_WorldInfo.h index 5b35ca2ec54..a64ca5c191e 100644 --- a/source/gameengine/Ketsji/KX_WorldInfo.h +++ b/source/gameengine/Ketsji/KX_WorldInfo.h @@ -74,5 +74,4 @@ public: #endif }; -#endif //__KX_WORLDINFO_H__ - +#endif /* __KX_WORLDINFO_H__ */ diff --git a/source/gameengine/Ketsji/KX_WorldIpoController.h b/source/gameengine/Ketsji/KX_WorldIpoController.h index 575d4e72f14..63983b3129b 100644 --- a/source/gameengine/Ketsji/KX_WorldIpoController.h +++ b/source/gameengine/Ketsji/KX_WorldIpoController.h @@ -100,5 +100,4 @@ public: #endif }; -#endif // __KX_WORLDIPOCONTROLLER_H__ - +#endif /* __KX_WORLDIPOCONTROLLER_H__ */ |