Revision: 49593
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49593
Author:   moguri
Date:     2012-08-06 00:53:26 +0000 (Mon, 06 Aug 2012)
Log Message:
-----------
Fix for [#32054] "Animation break after resuming scene" reported by Andreas 
Esau (ndee). The action's timing was getting messed up which resulted in 
negative local frames, which were being counted as "done."

Modified Paths:
--------------
    trunk/blender/source/gameengine/Ketsji/BL_Action.cpp

Modified: trunk/blender/source/gameengine/Ketsji/BL_Action.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/BL_Action.cpp        2012-08-05 
23:29:50 UTC (rev 49592)
+++ trunk/blender/source/gameengine/Ketsji/BL_Action.cpp        2012-08-06 
00:53:26 UTC (rev 49593)
@@ -206,7 +206,7 @@
        }
 
        // Now that we have an action, we have something we can play
-       m_starttime = KX_GetActiveEngine()->GetFrameTime();
+       m_starttime = -1.f; // We get the start time on our first update
        m_startframe = m_localtime = start;
        m_endframe = end;
        m_blendin = blendin;
@@ -338,6 +338,11 @@
 
        curtime -= KX_KetsjiEngine::GetSuspendedDelta();
 
+       // Grab the start time here so we don't end up with a negative 
m_localtime when
+       // suspending and resuming scenes.
+       if (m_starttime < 0)
+               m_starttime = curtime;
+
        if (m_calc_localtime)
                SetLocalTime(curtime);
        else

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to