forked from bartvdbraak/blender
-fixes in player: draw physics debugging, only render frames when actually updated, fix with hierarchies not properly build (causing crashes)
This commit is contained in:
parent
7b14c36a18
commit
14d60ca000
@ -435,11 +435,13 @@ bool GPG_Application::processEvent(GHOST_IEvent* event)
|
||||
m_exitRequested = m_ketsjiengine->GetExitCode();
|
||||
|
||||
// kick the engine
|
||||
m_ketsjiengine->NextFrame();
|
||||
|
||||
bool renderFrame = m_ketsjiengine->NextFrame();
|
||||
if (renderFrame)
|
||||
{
|
||||
// render the frame
|
||||
m_ketsjiengine->Render();
|
||||
}
|
||||
}
|
||||
m_exitString = m_ketsjiengine->GetExitString();
|
||||
}
|
||||
break;
|
||||
@ -496,6 +498,9 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
|
||||
bool profile = (SYS_GetCommandLineInt(syshandle, "show_profile", 0) != 0);
|
||||
bool fixedFr = (G.fileflags & G_FILE_ENABLE_ALL_FRAMES);
|
||||
|
||||
bool showPhysics = (G.fileflags & G_FILE_SHOW_PHYSICS);
|
||||
SYS_WriteCommandLineInt(syshandle, "show_physics", showPhysics);
|
||||
|
||||
bool fixed_framerate= (SYS_GetCommandLineInt(syshandle, "fixed_framerate", fixedFr) != 0);
|
||||
bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0);
|
||||
bool useVertexArrays = SYS_GetCommandLineInt(syshandle,"vertexarrays",1) != 0;
|
||||
|
@ -39,7 +39,7 @@ class KX_ISceneConverter
|
||||
{
|
||||
|
||||
public:
|
||||
KX_ISceneConverter() {}
|
||||
KX_ISceneConverter() :addInitFromFrame(false) {}//this addInitFromFrame is a back hack, todo remove
|
||||
virtual ~KX_ISceneConverter () {};
|
||||
|
||||
/*
|
||||
|
@ -368,9 +368,15 @@ void CcdPhysicsController::setScaling(float scaleX,float scaleY,float scaleZ)
|
||||
if (m_body && m_body->getCollisionShape())
|
||||
{
|
||||
m_body->getCollisionShape()->setLocalScaling(m_cci.m_scaling);
|
||||
|
||||
//printf("no inertia recalc for fixed objects with mass=0\n");
|
||||
if (m_cci.m_mass)
|
||||
{
|
||||
m_body->getCollisionShape()->calculateLocalInertia(m_cci.m_mass, m_cci.m_localInertiaTensor);
|
||||
m_body->setMassProps(m_cci.m_mass, m_cci.m_localInertiaTensor * m_cci.m_inertiaFactor);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user