Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2006-05-10 04:05:49 +0400
committerErwin Coumans <blender@erwincoumans.com>2006-05-10 04:05:49 +0400
commitbcc6704299ece695ff7312cdda10eebfdac000d7 (patch)
tree9679b8564a0dd1e972c8086a14c4522187949f0e /source/gameengine/Ketsji/KX_KetsjiEngine.cpp
parent55ab57519d42607a8798ec51a531b162e9399bb9 (diff)
fixed [ #3863 ] Baking game physics to IPOs misses the first few frames of motion
Also, the recording starts from the actual 'curframe' onwards, rather then from frame 1
Diffstat (limited to 'source/gameengine/Ketsji/KX_KetsjiEngine.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index e9d10f785b0..20e017cbf1b 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -263,11 +263,11 @@ void KX_KetsjiEngine::StartEngine()
m_firstframe = true;
m_bInitialized = true;
m_ticrate = DEFAULT_LOGIC_TIC_RATE;
- m_currentFrame = 0;
-
+
if (m_game2ipo)
{
m_sceneconverter->ResetPhysicsObjectsAnimationIpo();
+ m_sceneconverter->WritePhysicsObjectToAnimationIpo(m_currentFrame);
}
}
@@ -438,7 +438,7 @@ void KX_KetsjiEngine::NextFrame()
if (m_game2ipo)
{
- m_sceneconverter->WritePhysicsObjectToAnimationIpo(m_currentFrame++);
+ m_sceneconverter->WritePhysicsObjectToAnimationIpo(++m_currentFrame);
}
scene->setSuspendedTime(0.0);