From f20e832c0d110fa1d90c3bfcb18f070b15a2eb46 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 26 Oct 2004 19:23:41 +0000 Subject: [PATCH] simplify --- stepmania/src/ReceptorArrow.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/stepmania/src/ReceptorArrow.cpp b/stepmania/src/ReceptorArrow.cpp index c60dd64ba9..c9cfca7809 100644 --- a/stepmania/src/ReceptorArrow.cpp +++ b/stepmania/src/ReceptorArrow.cpp @@ -38,6 +38,10 @@ bool ReceptorArrow::Load( CString NoteSkin, PlayerNumber pn, int iColNo ) m_pPressBlock.Load( NOTESKIN->GetPathToFromNoteSkinAndButton(NoteSkin,sButton,"KeypressBlock") ); + m_pReceptorWaiting->Command( "effectclock,beat" ); + m_pReceptorGo->Command( "effectclock,beat" ); + m_pPressBlock->Command( "effectclock,beat" ); + // draw pressblock before receptors this->AddChild( m_pPressBlock ); this->AddChild( m_pReceptorWaiting ); @@ -50,14 +54,6 @@ void ReceptorArrow::Update( float fDeltaTime ) { ActorFrame::Update( fDeltaTime ); - float fPercentIntoBeat = GAMESTATE->m_fSongBeat; - wrap(fPercentIntoBeat, 1); /* Beats can start in very negative territory */ - - // TODO: Generalize this to allow any actor to animate based on the beat. - m_pReceptorWaiting->SetSecondsIntoAnimation( fPercentIntoBeat ); - m_pReceptorGo->SetSecondsIntoAnimation( fPercentIntoBeat ); - m_pPressBlock->SetSecondsIntoAnimation( fPercentIntoBeat ); - // update pressblock alignment based on scroll direction bool bReverse = GAMESTATE->m_PlayerOptions[m_PlayerNumber].GetReversePercentForColumn(m_iColNo) > 0.5; m_pPressBlock->SetVertAlign( bReverse ? Actor::align_bottom : Actor::align_top );