From d113837cd4d264509353f5d708268a7fe0cc8980 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Tue, 14 Mar 2006 08:51:12 +0000 Subject: [PATCH] Consider attacks to be at the same time if they are less than 1 ms apart. --- stepmania/src/ScreenEdit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 220e65750c..7fa4eb79f1 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -1163,7 +1163,7 @@ static int FindAttackAtTime( const AttackArray& attacks, float fStartTime ) { for( unsigned i = 0; i < attacks.size(); ++i ) { - if( attacks[i].fStartSecond == fStartTime ) + if( fabs(attacks[i].fStartSecond - fStartTime) < 0.001f ) return i; } return -1; @@ -1754,7 +1754,7 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB ) if( iAttack >= 0 ) { - const RString sDuration = ssprintf( "%f", ce.attacks[iAttack].fSecsRemaining ); + const RString sDuration = ssprintf( "%.3f", ce.attacks[iAttack].fSecsRemaining ); g_InsertCourseAttack.rows[remove].bEnabled = true; if( g_InsertCourseAttack.rows[duration].choices.size() == 9 )