diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-06-18 23:25:54 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-06-18 23:33:29 +0300 |
commit | 2465bd90d5a12fbb074f25898ca3f4a6c6def953 (patch) | |
tree | 6d8af123f7d4acbaf00e601c531973523e71c3ff /source/gameengine/Ketsji | |
parent | d67c07ea49ec06a547b8b4ec287642b83ea6d9c4 (diff) |
Cleanup: style, whitespace, doxy filepaths
Diffstat (limited to 'source/gameengine/Ketsji')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 6 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Light.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_SoundActuator.cpp | 15 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_TrackToActuator.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_VehicleWrapper.cpp | 8 |
6 files changed, 15 insertions, 20 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 69c1af35bd9..3244400e1bd 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -142,7 +142,7 @@ KX_GameObject::~KX_GameObject() } // Unregister collision callbacks // Do this before we start freeing physics information like m_pClient_info - if (m_collisionCallbacks){ + if (m_collisionCallbacks) { UnregisterCollisionCallbacks(); Py_CLEAR(m_collisionCallbacks); } @@ -1564,7 +1564,7 @@ void KX_GameObject::UnregisterCollisionCallbacks() PHY_IPhysicsEnvironment* pe = scene->GetPhysicsEnvironment(); PHY_IPhysicsController* spc = GetPhysicsController(); // If we are the last to unregister on this physics controller - if (pe->RemoveCollisionCallback(spc)){ + if (pe->RemoveCollisionCallback(spc)) { // If we are a sensor object if (m_pClient_info->isSensor()) // Remove sensor body from physics world @@ -1584,7 +1584,7 @@ void KX_GameObject::RegisterCollisionCallbacks() PHY_IPhysicsEnvironment* pe = scene->GetPhysicsEnvironment(); PHY_IPhysicsController* spc = GetPhysicsController(); // If we are the first to register on this physics controller - if (pe->RequestCollisionCallback(spc)){ + if (pe->RequestCollisionCallback(spc)) { // If we are a sensor object if (m_pClient_info->isSensor()) // Add sensor body to physics world diff --git a/source/gameengine/Ketsji/KX_Light.cpp b/source/gameengine/Ketsji/KX_Light.cpp index 9ccf60b15ce..5f490747c2b 100644 --- a/source/gameengine/Ketsji/KX_Light.cpp +++ b/source/gameengine/Ketsji/KX_Light.cpp @@ -195,7 +195,7 @@ int KX_LightObject::pyattr_set_layer(void *self_v, const KX_PYATTRIBUTE_DEF *att PyErr_Format(PyExc_TypeError, "expected an integer greater than 1 for attribute \"%s\"", attrdef->m_name); return PY_SET_ATTR_FAIL; } - else if(layer > MAX_LIGHT_LAYERS) { + else if (layer > MAX_LIGHT_LAYERS) { PyErr_Format(PyExc_TypeError, "expected an integer less than %i for attribute \"%s\"", MAX_LIGHT_LAYERS, attrdef->m_name); return PY_SET_ATTR_FAIL; } diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 47ba2c4343f..c0d99d16a4c 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -1785,7 +1785,7 @@ void KX_Scene::UpdateObjectLods(void) for (int i = 0; i < this->GetObjectList()->GetCount(); i++) { gameobj = (KX_GameObject*) GetObjectList()->GetValue(i); - if (!gameobj->GetCulled()){ + if (!gameobj->GetCulled()) { gameobj->UpdateLod(cam_pos); } } diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp index 1c42d65ae75..a27f37c0441 100644 --- a/source/gameengine/Ketsji/KX_SoundActuator.cpp +++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp @@ -79,21 +79,18 @@ KX_SoundActuator::KX_SoundActuator(SCA_IObject* gameobj, KX_SoundActuator::~KX_SoundActuator() { - if(m_handle) - { + if (m_handle) { AUD_Handle_stop(m_handle); } - if(m_sound) - { + if (m_sound) { AUD_Sound_free(m_sound); } } void KX_SoundActuator::play() { - if(m_handle) - { + if (m_handle) { AUD_Handle_stop(m_handle); m_handle = NULL; } @@ -130,10 +127,8 @@ void KX_SoundActuator::play() if(sound != m_sound) AUD_Sound_free(sound); - if (m_handle != NULL) - { - if (m_is3d) - { + if (m_handle != NULL) { + if (m_is3d) { AUD_Handle_setRelative(m_handle, true); AUD_Handle_setVolumeMaximum(m_handle, m_3d.max_gain); AUD_Handle_setVolumeMinimum(m_handle, m_3d.min_gain); diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp index beccdfaad93..a8fa9b0815d 100644 --- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp +++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp @@ -207,7 +207,7 @@ static MT_Matrix3x3 vectomat(MT_Vector3 vec, short axis, short upflag, short thr vec = vec.safe_normalized_vec(z); /* if 2D doesn't move the up vector */ - if (!threedimup){ + if (!threedimup) { vec.setValue(MT_Scalar(vec[0]), MT_Scalar(vec[1]), MT_Scalar(0.0f)); vec = (vec - z.dot(vec)*z).safe_normalized_vec(z); } diff --git a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp index c1af6de127e..ddae645802c 100644 --- a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp +++ b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp @@ -89,17 +89,17 @@ PyObject *KX_VehicleWrapper::PyAddWheel(PyObject *args) if (gameOb->GetSGNode()) { MT_Vector3 attachPos,attachDir,attachAxle; - if(!PyVecTo(pylistPos,attachPos)) { + if (!PyVecTo(pylistPos,attachPos)) { PyErr_SetString(PyExc_AttributeError, "addWheel(...) Unable to add wheel. attachPos must be a vector with 3 elements."); return NULL; } - if(!PyVecTo(pylistDir,attachDir)) { + if (!PyVecTo(pylistDir,attachDir)) { PyErr_SetString(PyExc_AttributeError, "addWheel(...) Unable to add wheel. downDir must be a vector with 3 elements."); return NULL; } - if(!PyVecTo(pylistAxleDir,attachAxle)) { + if (!PyVecTo(pylistAxleDir,attachAxle)) { PyErr_SetString(PyExc_AttributeError, "addWheel(...) Unable to add wheel. axleDir must be a vector with 3 elements."); return NULL; @@ -108,7 +108,7 @@ PyObject *KX_VehicleWrapper::PyAddWheel(PyObject *args) //someone reverse some conventions inside Bullet (axle winding) attachAxle = -attachAxle; - if(wheelRadius<=0) { + if (wheelRadius <= 0) { PyErr_SetString(PyExc_AttributeError, "addWheel(...) Unable to add wheel. wheelRadius must be positive."); return NULL; |