assert on invalid attack ranges at load time so they don't slip to play time

This commit is contained in:
Chris Danford
2005-04-22 05:15:10 +00:00
parent 6113fb3a90
commit ef21deb661
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -32,6 +32,7 @@ void Attack::GetAttackBeats( const Song *song, const PlayerState* pPlayerState,
GAMESTATE->GetUndisplayedBeats( pPlayerState, fSecsRemaining, fStartBeat, fEndBeat );
}
// loading the course should have caught this.
ASSERT_M( fEndBeat >= fStartBeat, ssprintf("%f >= %f", fEndBeat, fStartBeat) );
}
+1
View File
@@ -177,6 +177,7 @@ void Course::LoadFromCRSFile( CString sPath )
{
if( end != -9999 )
{
ASSERT_M( end >= attack.fStartSecond, ssprintf("Attack ends before it starts. end %f, start %f", end, attack.fStartSecond) );
attack.fSecsRemaining = end - attack.fStartSecond;
end = -9999;
}