diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2006-01-15 14:34:55 +0300 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2006-01-15 14:34:55 +0300 |
commit | 6f3e5931052727358201e6648bd6011d99085414 (patch) | |
tree | b3893dc8bacb90a02dc9c9ed251b590a429496fe /source/gameengine/Physics/Sumo | |
parent | e35f73cd00f878706cd953fc3514e0b68b1b6f65 (diff) |
more graphics patches from Snailrose,
remove constraint fixed,
Bullet timestep now subdivides Blender game engine timestep, so it runs 60 hertz,
SphereShape reverted to old style, so no support for non-uniform scaled spheres for now,
Diffstat (limited to 'source/gameengine/Physics/Sumo')
3 files changed, 8 insertions, 4 deletions
diff --git a/source/gameengine/Physics/Sumo/Fuzzics/src/SM_Scene.cpp b/source/gameengine/Physics/Sumo/Fuzzics/src/SM_Scene.cpp index 081a2fb9794..656051be4f5 100644 --- a/source/gameengine/Physics/Sumo/Fuzzics/src/SM_Scene.cpp +++ b/source/gameengine/Physics/Sumo/Fuzzics/src/SM_Scene.cpp @@ -183,7 +183,7 @@ bool SM_Scene::proceed(MT_Scalar curtime, MT_Scalar ticrate) if (!m_frames) { if (ticrate > 0.) - m_frames = (unsigned int)(curtime*ticrate + 1.0); + m_frames = (unsigned int)(curtime*ticrate) + 1.0; else m_frames = (unsigned int)(curtime*65536.0); } @@ -275,7 +275,11 @@ bool SM_Scene::proceed(MT_Scalar curtime, MT_Scalar ticrate) for (i = m_objectList.begin(); i != m_objectList.end(); ++i) (*i)->interpolate(curtime); - m_frames = (unsigned int)(curtime*ticrate + 1.0); + //only update the m_frames after an actual physics timestep + if (num_samples) + { + m_frames = (unsigned int)(curtime*ticrate) + 1.0; + } } else { diff --git a/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.cpp b/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.cpp index 8d03fd4b0f4..ead6dcc0106 100644 --- a/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.cpp +++ b/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.cpp @@ -117,7 +117,7 @@ int SumoPhysicsEnvironment::createConstraint( return constraintid; } -void SumoPhysicsEnvironment::removeConstraint(void * constraintid) +void SumoPhysicsEnvironment::removeConstraint(int constraintid) { if (constraintid) { diff --git a/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.h b/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.h index c93e34825b9..e1641407166 100644 --- a/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.h +++ b/source/gameengine/Physics/Sumo/SumoPhysicsEnvironment.h @@ -66,7 +66,7 @@ public: float pivotX,float pivotY,float pivotZ, float axisX,float axisY,float axisZ); - virtual void removeConstraint(void * constraintid); + virtual void removeConstraint(int constraintid); virtual PHY_IPhysicsController* rayTest(PHY_IPhysicsController* ignoreClient,float fromX,float fromY,float fromZ, float toX,float toY,float toZ, float& hitX,float& hitY,float& hitZ,float& normalX,float& normalY,float& normalZ); |