From 3b1a156ca62df0bee851bd1c2f36cedac337c6ca Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sat, 5 Jan 2008 15:14:23 +0000 Subject: [PATCH] We want to update the children manually, so we need to be overriding UpdateInternal(), not Update(). Overriding Update() was causing Update() to be called on each of our children twice. --- stepmania/src/FadingBanner.cpp | 9 ++++----- stepmania/src/FadingBanner.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/stepmania/src/FadingBanner.cpp b/stepmania/src/FadingBanner.cpp index 0d9295bd32..8d0805792c 100644 --- a/stepmania/src/FadingBanner.cpp +++ b/stepmania/src/FadingBanner.cpp @@ -40,11 +40,11 @@ void FadingBanner::ScaleToClipped( float fWidth, float fHeight ) m_Banner[i].ScaleToClipped( fWidth, fHeight ); } -void FadingBanner::Update( float fDeltaTime ) +void FadingBanner::UpdateInternal( float fDeltaTime ) { // update children manually - // ActorFrame::Update( fDeltaTime ); - Actor::Update( fDeltaTime ); + // ActorFrame::UpdateInternal( fDeltaTime ); + Actor::UpdateInternal( fDeltaTime ); if( !m_bSkipNextBannerUpdate ) { @@ -144,8 +144,7 @@ bool FadingBanner::LoadFromCachedBanner( const RString &path ) return false; } - BeforeChange(); - m_Banner[m_iIndexLatest].Load( ID ); + Load( ID ); return bLowRes; } diff --git a/stepmania/src/FadingBanner.h b/stepmania/src/FadingBanner.h index fe2086be8d..594ec18692 100644 --- a/stepmania/src/FadingBanner.h +++ b/stepmania/src/FadingBanner.h @@ -33,7 +33,7 @@ public: bool LoadFromCachedBanner( const RString &path ); void SetMovingFast( bool fast ) { m_bMovingFast=fast; } - virtual void Update( float fDeltaTime ); + virtual void UpdateInternal( float fDeltaTime ); virtual void DrawPrimitives(); // Lua