diff options
author | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-08-10 15:35:38 +0400 |
---|---|---|
committer | Kester Maddock <Christopher.Maddock.1@uni.massey.ac.nz> | 2004-08-10 15:35:38 +0400 |
commit | 9bbc1e9c0aa5107f9782ab9949ebf285fb1dbea8 (patch) | |
tree | a775222027241903e8bab26118e55462fb0f69da | |
parent | 47c5b8ff269c3c365e8bc5adf5c0494bb29abf1f (diff) |
Clear the Python error flag between 'overloaded' Python methods.
-rw-r--r-- | source/gameengine/Ketsji/KX_KetsjiEngine.cpp | 4 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_RaySensor.cpp | 6 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp | 1 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_SceneActuator.cpp | 1 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_TrackToActuator.cpp | 1 |
5 files changed, 12 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index 73a826c3d0d..f257b8dfb73 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -784,7 +784,9 @@ void KX_KetsjiEngine::RenderFrame(KX_Scene* scene) MT_Matrix4x4 projmat = m_rasterizer->GetFrustumMatrix( left, right, bottom, top, nearfrust, farfrust); - cam->SetProjectionMatrix(projmat); + cam->SetProjectionMatrix(projmat); + if (m_rasterizer->Stereo()) + cam->InvalidateProjectionMatrix(); } MT_Transform camtrans(cam->GetWorldToCamera()); diff --git a/source/gameengine/Ketsji/KX_RaySensor.cpp b/source/gameengine/Ketsji/KX_RaySensor.cpp index 3832d95f059..04f57bb754b 100644 --- a/source/gameengine/Ketsji/KX_RaySensor.cpp +++ b/source/gameengine/Ketsji/KX_RaySensor.cpp @@ -170,6 +170,12 @@ bool KX_RaySensor::Evaluate(CValue* event) MT_Vector3 resultnormal; bool ready = false; SumoPhysicsEnvironment *spe = dynamic_cast<SumoPhysicsEnvironment *>(m_scene->GetPhysicsEnvironment()); + if (!spe) + { + std::cout << "WARNING: Ray sensor " << GetName() << ": There is no physics environment!" << std::endl; + std::cout << " Check universe for malfunction." << std::endl; + return false; + } SM_Scene *scene = spe->GetSumoScene(); KX_SumoPhysicsController *spc = dynamic_cast<KX_SumoPhysicsController *>(obj->GetPhysicsController()); KX_GameObject *parent = obj->GetParent(); diff --git a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp index cfa0ad4a986..feaf24f5e5b 100644 --- a/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp +++ b/source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp @@ -198,6 +198,7 @@ PyObject* KX_SCA_AddObjectActuator::PySetObject(PyObject* self, m_OriginalObject = (CValue*)gameobj; Py_Return; } + PyErr_Clear(); char* objectname; if (PyArg_ParseTuple(args, "s", &objectname)) diff --git a/source/gameengine/Ketsji/KX_SceneActuator.cpp b/source/gameengine/Ketsji/KX_SceneActuator.cpp index 9ccb4068cc0..3ef49680f1f 100644 --- a/source/gameengine/Ketsji/KX_SceneActuator.cpp +++ b/source/gameengine/Ketsji/KX_SceneActuator.cpp @@ -320,6 +320,7 @@ PyObject* KX_SceneActuator::PySetCamera(PyObject* self, m_camera = (KX_Camera*) cam; Py_Return; } + PyErr_Clear(); /* one argument: a scene, ignore the rest */ char *camName; diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp index becc4c58758..7a0d0ad630f 100644 --- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp +++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp @@ -406,6 +406,7 @@ PyObject* KX_TrackToActuator::PySetObject(PyObject* self, PyObject* args, PyObje Py_Return; } + PyErr_Clear(); char* objectname; if (PyArg_ParseTuple(args, "s", &objectname)) |