From 77ec3a1239b33e2cf5eaebd611b68d8de5a56f19 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 23 Aug 2009 17:33:34 +0000 Subject: deprecated world settings were being used making new world's have zero gravity in the game engine. Double checked these aren't used anymore by renaming the vars in DNA_world_types.h --- source/gameengine/Converter/BL_BlenderDataConversion.cpp | 4 ++-- source/gameengine/Ketsji/KX_KetsjiEngine.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 6cb4e980a3d..ed03bb0bdd5 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -2485,10 +2485,10 @@ void BL_ConvertBlenderObjects(struct Main* maggie, } } if (occlusion) - kxscene->SetDbvtOcclusionRes(blenderscene->world->occlusionRes); + kxscene->SetDbvtOcclusionRes(blenderscene->gm.occlusionRes); } if (blenderscene->world) - kxscene->GetPhysicsEnvironment()->setNumTimeSubSteps(blenderscene->world->physubstep); + kxscene->GetPhysicsEnvironment()->setNumTimeSubSteps(blenderscene->gm.physubstep); // now that the scenegraph is complete, let's instantiate the deformers. // We need that to create reusable derived mesh and physic shapes diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index 13643e3a1ac..4117e493322 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -382,12 +382,12 @@ void KX_KetsjiEngine::StartEngine(bool clearIpo) m_firstframe = true; m_bInitialized = true; // there is always one scene enabled at startup - World* world = m_scenes[0]->GetBlenderScene()->world; - if (world) + Scene* scene = m_scenes[0]->GetBlenderScene(); + if (scene) { - m_ticrate = world->ticrate ? world->ticrate : DEFAULT_LOGIC_TIC_RATE; - m_maxLogicFrame = world->maxlogicstep ? world->maxlogicstep : 5; - m_maxPhysicsFrame = world->maxphystep ? world->maxlogicstep : 5; + m_ticrate = scene->gm.ticrate ? scene->gm.ticrate : DEFAULT_LOGIC_TIC_RATE; + m_maxLogicFrame = scene->gm.maxlogicstep ? scene->gm.maxlogicstep : 5; + m_maxPhysicsFrame = scene->gm.maxphystep ? scene->gm.maxlogicstep : 5; } else { -- cgit v1.2.3