A fix for the missing pad1 bug: henceforth, world->pad1 shall be known as
[blender.git] / source / gameengine / Converter / KX_BlenderSceneConverter.cpp
index fdba851b7a3a2b7579da69c2bb7605621aefe2a2..15100cc3a009e8cded1dcf46668c28116816b394 100644 (file)
  * ***** END GPL/BL DUAL LICENSE BLOCK *****
  */
 
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #ifdef WIN32
 
        #pragma warning (disable:4786) // suppress stl-MSVC debug info warning
 
 #include "DummyPhysicsEnvironment.h"
 
+//to decide to use sumo/ode or dummy physics - defines USE_ODE
+#include "KX_ConvertPhysicsObject.h"
+
 #ifdef USE_ODE
 #include "OdePhysicsEnvironment.h"
 #endif //USE_ODE
 
-//to decide to use sumo/ode or dummy physics
-#include "KX_ConvertPhysicsObject.h"
 #ifdef USE_SUMO_SOLID
 #include "SumoPhysicsEnvironment.h"
 #endif
@@ -178,27 +183,32 @@ void KX_BlenderSceneConverter::ConvertScene(const STR_String& scenename,
                if (blenderscene->world)
                {
                        
-                       switch (blenderscene->world->pad1)
+                       switch (blenderscene->world->physicsEngine)
                        {
                                
-                       case 4:
+                       case 1:
                                {
-                                       physics_engine = UseODE;
+                                       physics_engine = UseNone;
+                                       break;
+                               };
+                       case 2:
+                               {
+                                       physics_engine = UseSumo;
                                        break;
                                }
-                       case 5:
+                       case 3:
                                {
-                                       physics_engine = UseDynamo;
+                                       physics_engine = UseODE;
                                        break;
                                }
-                       case 7:
+                       case 4:
                                {
-                                       physics_engine = UseNone;
+                                       physics_engine = UseDynamo;
                                        break;
-                               };
+                               }
                        default:
                                {
-                                       physics_engine = UseSumo;
+                                       physics_engine = UseODE;
                                }
                        }
                }