From 5ab903244ed467e78ea4102bd192d2e2c5379357 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 24 Apr 2005 06:31:39 +0000 Subject: [PATCH] support sequences of only one input --- stepmania/src/CodeDetector.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/stepmania/src/CodeDetector.cpp b/stepmania/src/CodeDetector.cpp index d63dd471e2..d35c4473fa 100644 --- a/stepmania/src/CodeDetector.cpp +++ b/stepmania/src/CodeDetector.cpp @@ -116,7 +116,7 @@ bool CodeItem::Load( CString sButtonsNames ) split( sButtonsNames, ",", asButtonNames, false ); } - if( asButtonNames.size() < 2 ) + if( asButtonNames.size() < 1 ) { if( sButtonsNames != "" ) LOG->Trace( "The code '%s' is less than 2 buttons, so it will be ignored.", sButtonsNames.c_str() ); @@ -142,8 +142,10 @@ bool CodeItem::Load( CString sButtonsNames ) switch( m_Type ) { case sequence: - ASSERT( buttons.size() >= 2 ) - fMaxSecondsBack = (buttons.size()-1)*0.6f; + if( buttons.size() == 1 ) + fMaxSecondsBack = -1; + else + fMaxSecondsBack = (buttons.size()-1)*0.6f; break; case hold_and_press: fMaxSecondsBack = -1.f; // not applicable