From 1ab61d7dde2dadfc10d240a8c491695e463e31f3 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 20 Mar 2005 05:51:44 +0000 Subject: [PATCH] don't warn about Sprite having the wrong number of states --- stepmania/src/Sprite.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/stepmania/src/Sprite.cpp b/stepmania/src/Sprite.cpp index 0c909fbe29..d7011af4ac 100644 --- a/stepmania/src/Sprite.cpp +++ b/stepmania/src/Sprite.cpp @@ -692,14 +692,18 @@ void Sprite::SetState( int iNewState ) // problems in debug builds, but they're not fatal. if( iNewState < 0 || iNewState >= (int)m_States.size() ) { - CString sError; - if( m_pTexture ) - sError = ssprintf("The Sprite '%s' (\"%s\") tried to set state index %d, but it has only %u states", - m_pTexture->GetID().filename.c_str(), this->m_sName.c_str(), iNewState, unsigned(m_States.size())); - else - sError = ssprintf("A Sprite (\"%s\") tried to set state index %d but no texture is loaded.", - this->m_sName.c_str(), iNewState ); - Dialog::OK( sError ); + // Don't warn about number of states in "_blank". + if( m_pTexture->GetID().filename.Find("_blank") == -1 ) + { + CString sError; + if( m_pTexture ) + sError = ssprintf("The Sprite '%s' (\"%s\") tried to set state index %d, but it has only %u states", + m_pTexture->GetID().filename.c_str(), this->m_sName.c_str(), iNewState, unsigned(m_States.size())); + else + sError = ssprintf("A Sprite (\"%s\") tried to set state index %d but no texture is loaded.", + this->m_sName.c_str(), iNewState ); + Dialog::OK( sError ); + } } CLAMP(iNewState, 0, (int)m_States.size()-1);