Try workaround for #700
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11629 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
8742355d40
commit
f687659929
@ -187,6 +187,16 @@ void CutsceneWorld::update(float dt)
|
||||
}
|
||||
**/
|
||||
|
||||
if (m_time < 0.0001f)
|
||||
{
|
||||
PtrVector<TrackObject>& objects = m_track->getTrackObjectManager()->getObjects();
|
||||
TrackObject* curr;
|
||||
for_in(curr, objects)
|
||||
{
|
||||
curr->reset();
|
||||
}
|
||||
}
|
||||
|
||||
m_time += dt;
|
||||
|
||||
if (m_time < 2.0f)
|
||||
@ -204,6 +214,8 @@ void CutsceneWorld::update(float dt)
|
||||
|
||||
float currFrame = m_time * 25.0f; // We assume 25 FPS
|
||||
|
||||
//printf("Estimated current frame : %f\n", currFrame);
|
||||
|
||||
const std::vector<Subtitle>& subtitles = m_track->getSubtitles();
|
||||
bool foundSubtitle = false;
|
||||
for (unsigned int n = 0; n < subtitles.size(); n++)
|
||||
|
@ -403,7 +403,12 @@ void TrackObject::reset()
|
||||
a_node->setRotation(m_init_hpr);
|
||||
a_node->setScale(m_init_scale);
|
||||
a_node->setLoopMode(m_is_looped);
|
||||
|
||||
a_node->setCurrentFrame(a_node->getStartFrame());
|
||||
|
||||
// trick to reset the animation AND also the timer inside it
|
||||
a_node->OnAnimate(0);
|
||||
a_node->OnAnimate(0);
|
||||
|
||||
if(m_is_looped)
|
||||
{
|
||||
a_node->setFrameLoop(m_frame_start, m_frame_end);
|
||||
|
Loading…
Reference in New Issue
Block a user