From e3ff0acc9510bca1715201c303b075fabe04bb38 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Mon, 8 Nov 2010 11:10:50 +0000 Subject: [PATCH] Added call to reset in constructor, which will actually start the animation loop. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6437 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/tracks/track_object.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tracks/track_object.cpp b/src/tracks/track_object.cpp index 5d2fabd34..1791e8fca 100644 --- a/src/tracks/track_object.cpp +++ b/src/tracks/track_object.cpp @@ -89,6 +89,7 @@ TrackObject::TrackObject(const XMLNode &xml_node) m_animated_node->setRotation(m_init_hpr); m_animated_node->setScale(m_init_scale); m_animated_node->setMaterialFlag(video::EMF_LIGHTING, false); + reset(); } // TrackObject // ---------------------------------------------------------------------------- @@ -106,12 +107,11 @@ void TrackObject::reset() m_animated_node->setPosition(m_init_xyz); m_animated_node->setRotation(m_init_hpr); m_animated_node->setScale(m_init_scale); - m_animated_node->setLoopMode(false); + m_animated_node->setLoopMode(m_is_looped); if(m_is_looped) { m_animated_node->setFrameLoop(m_frame_start, m_frame_end); - m_animated_node->setLoopMode(true); } } // reset // ----------------------------------------------------------------------------