From 5d9c3aaa59ee08049f83c208e0c7f6986b70c24b Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Sat, 2 Nov 2013 00:58:01 -0400 Subject: [PATCH] propagate Attack::GetAttackBeats precondition --- src/Attack.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Attack.cpp b/src/Attack.cpp index 3d9bac2990..7062b303cf 100644 --- a/src/Attack.cpp +++ b/src/Attack.cpp @@ -22,6 +22,8 @@ void Attack::GetAttackBeats( const Song *pSong, float &fStartBeat, float &fEndBe * prevent popping when the attack has note modifers. */ void Attack::GetRealtimeAttackBeats( const Song *pSong, const PlayerState* pPlayerState, float &fStartBeat, float &fEndBeat ) const { + ASSERT( pSong != NULL ); + if( fStartSecond >= 0 ) { GetAttackBeats( pSong, fStartBeat, fEndBeat ); @@ -29,7 +31,6 @@ void Attack::GetRealtimeAttackBeats( const Song *pSong, const PlayerState* pPlay } ASSERT( pPlayerState != NULL ); - ASSERT( pSong != NULL ); /* If reasonable, push the attack forward 8 beats so that notes on screen don't change suddenly. */ fStartBeat = min( GAMESTATE->m_Position.m_fSongBeat+8, pPlayerState->m_fLastDrawnBeat );