Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-08-10 15:35:38 +0400
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-08-10 15:35:38 +0400
commit9bbc1e9c0aa5107f9782ab9949ebf285fb1dbea8 (patch)
treea775222027241903e8bab26118e55462fb0f69da /source/gameengine/Ketsji/KX_RaySensor.cpp
parent47c5b8ff269c3c365e8bc5adf5c0494bb29abf1f (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.cpp6
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();