Commit: 183b417cce6de2ea00ca1f0d89b0170827aa75b3
Author: Mitchell Stokes
Date:   Wed May 14 22:36:28 2014 -0700
https://developer.blender.org/rB183b417cce6de2ea00ca1f0d89b0170827aa75b3

BGE Physics: Better follow the old (pre-cleanup) logic  for determining bounds 
types.

This prevents older files from breaking.

===================================================================

M       source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp

===================================================================

diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp 
b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
index bbc3968..ce6eb22 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
@@ -3056,27 +3056,26 @@ void CcdPhysicsEnvironment::ConvertObject(KX_GameObject 
*gameobj, RAS_MeshObject
 
        btCollisionShape* bm = 0;
 
-       char bounds;
-       if (blenderobject->gameflag & OB_BOUNDS)
-       {
-               bounds = blenderobject->collision_boundtype;
-       }
-       else
+       char bounds = isbulletdyna ? OB_BOUND_SPHERE : OB_BOUND_TRIANGLE_MESH;
+       if (!(blenderobject->gameflag & OB_BOUNDS))
        {
                if (blenderobject->gameflag & OB_SOFT_BODY)
                        bounds = OB_BOUND_TRIANGLE_MESH;
                else if (blenderobject->gameflag & OB_CHARACTER)
                        bounds = OB_BOUND_SPHERE;
-               else if (isbulletdyna)
+       }
+       else
+       {
+               if (ELEM(blenderobject->collision_boundtype, 
OB_BOUND_CONVEX_HULL, OB_BOUND_TRIANGLE_MESH)
+                   && blenderobject->type != OB_MESH)
+               {
+                       // Can't use triangle mesh or convex hull on a non-mesh 
object, fall-back to sphere
                        bounds = OB_BOUND_SPHERE;
+               }
                else
-                       bounds = OB_BOUND_TRIANGLE_MESH;
+                       bounds = blenderobject->collision_boundtype;
        }
 
-       // Can't use triangle mesh or convex hull on a non-mesh object, 
fall-back to sphere
-       if (ELEM(bounds, OB_BOUND_TRIANGLE_MESH, OB_BOUND_CONVEX_HULL) && 
blenderobject->type != OB_MESH)
-               bounds = OB_BOUND_SPHERE;
-
        // Get bounds information
        float bounds_center[3], bounds_extends[3];
        BoundBox *bb= BKE_object_boundbox_get(blenderobject);

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

Reply via email to