From fdfcff7a6db045ec98c18f02a7bd6805e0e2758e Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Fri, 7 Jan 2005 23:56:18 +0000 Subject: [PATCH] fix LengthSeconds calculated too early --- stepmania/src/BGAnimation.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/stepmania/src/BGAnimation.cpp b/stepmania/src/BGAnimation.cpp index 7faece7076..f858cd6575 100644 --- a/stepmania/src/BGAnimation.cpp +++ b/stepmania/src/BGAnimation.cpp @@ -216,13 +216,6 @@ void BGAnimation::LoadFromNode( const CString &sDir, const XNode& node ) DEBUG_ASSERT( node.m_sName == "BGAnimation" ); - if( !node.GetAttrValue( "LengthSeconds", m_fLengthSeconds ) ) - { - /* XXX: if m_bGeneric, simply constructing the BG layer won't run "On", - * so at this point GetMaxTweenTimeLeft is probably 0 */ - m_fLengthSeconds = this->GetTweenTimeLeft(); - } - CString sInitCommand; if( node.GetAttrValue( "InitCommand", sInitCommand ) ) { @@ -249,6 +242,14 @@ void BGAnimation::LoadFromNode( const CString &sDir, const XNode& node ) if( !m_bGeneric ) PlayCommand( "On" ); + + + if( !node.GetAttrValue( "LengthSeconds", m_fLengthSeconds ) ) + { + /* XXX: if m_bGeneric, simply constructing the BG layer won't run "On", + * so at this point GetMaxTweenTimeLeft is probably 0 */ + m_fLengthSeconds = this->GetTweenTimeLeft(); + } } /*