BGE: removing remaining reference to sce->world->gravity/physics/... (it's all in...
[blender.git] / source / gameengine / Converter / KX_BlenderSceneConverter.cpp
index 4df9df75d3d80fc761d466f046d8ae69cfeb5249..85d178385b8f4a48244995a86f1eb26aa2b39441 100644 (file)
@@ -260,38 +260,34 @@ void KX_BlenderSceneConverter::ConvertScene(class KX_Scene* destinationscene,
        if (blenderscene)
        {
        
-               if (blenderscene->world)
+               switch (blenderscene->gm.physicsEngine)
                {
-                       switch (blenderscene->world->physicsEngine)
+               case WOPHY_BULLET:
                        {
-                       case WOPHY_BULLET:
-                               {
-                                       physics_engine = UseBullet;
-                                       useDbvtCulling = (blenderscene->world->mode & WO_DBVT_CULLING) != 0;
-                                       break;
-                               }
-                                
-                               case WOPHY_ODE:
-                               {
-                                       physics_engine = UseODE;
-                                       break;
-                               }
-                               case WOPHY_DYNAMO:
-                               {
-                                       physics_engine = UseDynamo;
-                                       break;
-                               }
-                               case WOPHY_SUMO:
-                               {
-                                       physics_engine = UseSumo; 
-                                       break;
-                               }
-                               case WOPHY_NONE:
-                               {
-                                       physics_engine = UseNone;
-                               }
+                               physics_engine = UseBullet;
+                               useDbvtCulling = (blenderscene->gm.mode & WO_DBVT_CULLING) != 0;
+                               break;
+                       }
+                                                       
+                       case WOPHY_ODE:
+                       {
+                               physics_engine = UseODE;
+                               break;
+                       }
+                       case WOPHY_DYNAMO:
+                       {
+                               physics_engine = UseDynamo;
+                               break;
+                       }
+                       case WOPHY_SUMO:
+                       {
+                               physics_engine = UseSumo; 
+                               break;
+                       }
+                       case WOPHY_NONE:
+                       {
+                               physics_engine = UseNone;
                        }
-                 
                }
        }