[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35881] trunk/blender/source/gameengine/ Physics/Bullet/CcdPhysicsEnvironment.cpp: apply patch for body suspend/ resume

Erwin Coumans blender at erwincoumans.com
Tue Mar 29 17:46:02 CEST 2011


Revision: 35881
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35881
Author:   erwin
Date:     2011-03-29 15:46:02 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
apply patch for body suspend/resume
See also issue #26614
http://projects.blender.org/tracker/index.php?func=detail&aid=26614&group_id=9&atid=306

Modified Paths:
--------------
    trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp

Modified: trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
===================================================================
--- trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp	2011-03-29 14:39:39 UTC (rev 35880)
+++ trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp	2011-03-29 15:46:02 UTC (rev 35881)
@@ -470,8 +470,12 @@
 			if (newMass)
 				body->getCollisionShape()->calculateLocalInertia(newMass, inertia);
 			body->setMassProps(newMass, inertia);
+			m_dynamicsWorld->addRigidBody(body, newCollisionGroup, newCollisionMask);
+		}	
+		else
+		{
+			m_dynamicsWorld->addCollisionObject(obj, newCollisionGroup, newCollisionMask);
 		}
-		m_dynamicsWorld->addCollisionObject(obj, newCollisionGroup, newCollisionMask);
 	}
 	// to avoid nasty interaction, we must update the property of the controller as well
 	ctrl->m_cci.m_mass = newMass;




More information about the Bf-blender-cvs mailing list