From a0e9c5a8c6f8b5512bd3fea317317ecde9357d3b Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 15 Jan 2005 22:31:43 +0000 Subject: [PATCH] Remove CommandRepeatSeconds. Instead, do: OnCommand=x;y;z;queuecommand,playcommand,On --- stepmania/src/BGAnimationLayer.cpp | 28 ---------------------------- stepmania/src/BGAnimationLayer.h | 2 -- 2 files changed, 30 deletions(-) diff --git a/stepmania/src/BGAnimationLayer.cpp b/stepmania/src/BGAnimationLayer.cpp index f5637dbe77..45846748f1 100644 --- a/stepmania/src/BGAnimationLayer.cpp +++ b/stepmania/src/BGAnimationLayer.cpp @@ -53,8 +53,6 @@ void BGAnimationLayer::Init() { Unload(); - m_fRepeatCommandEverySeconds = -1; - m_fSecondsUntilNextCommand = 0; m_fUpdateRate = 1; m_fFOV = -1; // no change m_bLighting = false; @@ -418,8 +416,6 @@ void BGAnimationLayer::LoadFromNode( const CString& sAniDir_, const XNode& layer } } - layer.GetAttrValue( "CommandRepeatSeconds", m_fRepeatCommandEverySeconds ); - m_fSecondsUntilNextCommand = m_fRepeatCommandEverySeconds; layer.GetAttrValue( "FOV", m_fFOV ); layer.GetAttrValue( "Lighting", m_bLighting ); layer.GetAttrValue( "TexCoordVelocityX", m_fTexCoordVelocityX ); @@ -659,19 +655,6 @@ void BGAnimationLayer::Update( float fDeltaTime ) default: ASSERT(0); } - - if( m_fRepeatCommandEverySeconds != -1 ) // if repeating - { - m_fSecondsUntilNextCommand -= fDeltaTime; - if( m_fSecondsUntilNextCommand <= 0 ) - { - PlayCommand( "On" ); - m_fSecondsUntilNextCommand += m_fRepeatCommandEverySeconds; - - /* In case we delayed a long time, don't queue two repeats at once. */ - wrap( m_fSecondsUntilNextCommand, m_fRepeatCommandEverySeconds ); - } - } } bool BGAnimationLayer::EarlyAbortDraw() @@ -722,17 +705,6 @@ void BGAnimationLayer::GainFocus( float fRate, bool bRewindMovie, bool bLoop ) { m_fUpdateRate = fRate; - if( m_fRepeatCommandEverySeconds == -1 ) // if not repeating - { - /* Yuck. We send OnCommand on load, since that's what's wanted for - * most backgrounds. However, gameplay backgrounds (loaded from Background) - * should run OnCommand when they're actually displayed, when GainFocus - * gets called. We've already run OnCommand; abort it so we don't run tweens - * twice. */ - RunCommandOnChildren( ParseCommands("stoptweening") ); - PlayCommand( "On" ); - } - ActorFrame::GainFocus( fRate, bRewindMovie, bLoop ); } diff --git a/stepmania/src/BGAnimationLayer.h b/stepmania/src/BGAnimationLayer.h index 7ad66a674b..b1640e7679 100644 --- a/stepmania/src/BGAnimationLayer.h +++ b/stepmania/src/BGAnimationLayer.h @@ -76,8 +76,6 @@ protected: // common stuff bool m_bGeneric; - float m_fRepeatCommandEverySeconds; // -1 = no repeat - float m_fSecondsUntilNextCommand; float m_fUpdateRate; // set by GainFocus float m_fFOV; // -1 = no change bool m_bLighting;