diff options
author | Sergej Reich <sergej.reich@googlemail.com> | 2013-11-23 20:17:12 +0400 |
---|---|---|
committer | Sergej Reich <sergej.reich@googlemail.com> | 2013-11-23 20:17:12 +0400 |
commit | 39dc956f593b3406bf1d81fb83c557b7b51f5327 (patch) | |
tree | 50b59815aad48902a6563aefc8b944daf34c401e /source/gameengine/Ketsji/KX_ConstraintActuator.cpp | |
parent | 5d5176095e82b34499e15d74f1fb76d56f4d9508 (diff) | |
parent | d846c9a3b75c3d6f20bc7ab7d2da6cdd18bbbef2 (diff) |
Merge branch 'master' into soc-2013-rigid_body_simsoc-2013-rigid_body_sim
Conflicts:
intern/rigidbody/CMakeLists.txt
release/datafiles/splash.png
source/blender/editors/space_view3d/drawobject.c
source/blender/makesdna/DNA_view3d_types.h
Diffstat (limited to 'source/gameengine/Ketsji/KX_ConstraintActuator.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_ConstraintActuator.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp index a3059317d36..0c5e21322df 100644 --- a/source/gameengine/Ketsji/KX_ConstraintActuator.cpp +++ b/source/gameengine/Ketsji/KX_ConstraintActuator.cpp @@ -331,7 +331,7 @@ bool KX_ConstraintActuator::Update(double curtime, bool frame) { MT_Point3 topoint = position + (m_maximumBound) * direction; PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment(); - KX_IPhysicsController *spc = obj->GetPhysicsController(); + PHY_IPhysicsController *spc = obj->GetPhysicsController(); if (!pe) { std::cout << "WARNING: Constraint actuator " << GetName() << ": There is no physics environment!" << std::endl; @@ -345,7 +345,7 @@ bool KX_ConstraintActuator::Update(double curtime, bool frame) parent->Release(); } } - KX_RayCast::Callback<KX_ConstraintActuator> callback(this,spc); + KX_RayCast::Callback<KX_ConstraintActuator> callback(this,dynamic_cast<PHY_IPhysicsController*>(spc)); result = KX_RayCast::RayTest(pe, position, topoint, callback); if (result) { MT_Vector3 newnormal = callback.m_hitNormal; @@ -379,7 +379,7 @@ bool KX_ConstraintActuator::Update(double curtime, bool frame) // logically we should cancel the speed along the ray direction as we set the // position along that axis spc = obj->GetPhysicsController(); - if (spc && spc->IsDyna()) { + if (spc && spc->IsDynamic()) { MT_Vector3 linV = spc->GetLinearVelocity(); // cancel the projection along the ray direction MT_Scalar fallspeed = linV.dot(direction); @@ -444,20 +444,20 @@ bool KX_ConstraintActuator::Update(double curtime, bool frame) normal.normalize(); { PHY_IPhysicsEnvironment* pe = KX_GetActiveScene()->GetPhysicsEnvironment(); - KX_IPhysicsController *spc = obj->GetPhysicsController(); + PHY_IPhysicsController *spc = obj->GetPhysicsController(); if (!pe) { std::cout << "WARNING: Constraint actuator " << GetName() << ": There is no physics environment!" << std::endl; goto CHECK_TIME; } - if (!spc || !spc->IsDyna()) { + if (!spc || !spc->IsDynamic()) { // the object is not dynamic, it won't support setting speed goto CHECK_TIME; } m_hitObject = NULL; // distance of Fh area is stored in m_minimum MT_Point3 topoint = position + (m_minimumBound+spc->GetRadius()) * direction; - KX_RayCast::Callback<KX_ConstraintActuator> callback(this,spc); + KX_RayCast::Callback<KX_ConstraintActuator> callback(this, spc); result = KX_RayCast::RayTest(pe, position, topoint, callback); // we expect a hit object if (!m_hitObject) |