[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20473] trunk/blender/source/gameengine/ Physics/Bullet/CcdPhysicsController.cpp: BGE: no sleeping and lock axis physics options were not propagated to replicas.

Benoit Bolsee benoit.bolsee at online.be
Thu May 28 13:04:45 CEST 2009


Revision: 20473
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20473
Author:   ben2610
Date:     2009-05-28 13:04:45 +0200 (Thu, 28 May 2009)

Log Message:
-----------
BGE: no sleeping and lock axis physics options were not propagated to replicas.

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

Modified: trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
===================================================================
--- trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp	2009-05-28 10:31:56 UTC (rev 20472)
+++ trunk/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp	2009-05-28 11:04:45 UTC (rev 20473)
@@ -700,17 +700,25 @@
 		}
 	}
 
+	// load some characterists that are not 
+	btRigidBody* oldbody = GetRigidBody();
 	m_object = 0;
 	CreateRigidbody();
-
 	btRigidBody* body = GetRigidBody();
-
 	if (body)
 	{
 		if (m_cci.m_mass)
 		{
 			body->setMassProps(m_cci.m_mass, m_cci.m_localInertiaTensor * m_cci.m_inertiaFactor);
 		}
+
+		if (oldbody)
+		{
+			body->setLinearFactor(oldbody->getLinearFactor());
+			body->setAngularFactor(oldbody->getAngularFactor());
+			if (oldbody->getActivationState() == DISABLE_DEACTIVATION)
+				body->setActivationState(DISABLE_DEACTIVATION);
+		}
 	}	
 	// sensor object are added when needed
 	if (!m_cci.m_bSensor)





More information about the Bf-blender-cvs mailing list