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 /source/gameengine/Ketsji/KX_RaySensor.cpp | |
parent | 47c5b8ff269c3c365e8bc5adf5c0494bb29abf1f (diff) |
Clear the Python error flag between 'overloaded' Python methods.
Diffstat (limited to 'source/gameengine/Ketsji/KX_RaySensor.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_RaySensor.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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(); |