Revision: 16586
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16586
Author:   ben2610
Date:     2008-09-17 23:47:05 +0200 (Wed, 17 Sep 2008)

Log Message:
-----------
BGE bug #17578: repair linV actuator in Add+Local mode.

Modified Paths:
--------------
    trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp

Modified: trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp    2008-09-17 
21:21:27 UTC (rev 16585)
+++ trunk/blender/source/gameengine/Ketsji/KX_GameObject.cpp    2008-09-17 
21:47:05 UTC (rev 16586)
@@ -590,8 +590,11 @@
 
 void KX_GameObject::addLinearVelocity(const MT_Vector3& lin_vel,bool local)
 {
-       if (m_pPhysicsController1)
-               m_pPhysicsController1->SetLinearVelocity(lin_vel + 
m_pPhysicsController1->GetLinearVelocity(),local);
+       if (m_pPhysicsController1) 
+       {
+               MT_Vector3 lv = local ? NodeGetWorldOrientation() * lin_vel : 
lin_vel;
+               m_pPhysicsController1->SetLinearVelocity(lv + 
m_pPhysicsController1->GetLinearVelocity(), 0);
+       }
 }
 
 


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to