don't warn about Sprite having the wrong number of states
This commit is contained in:
@@ -691,6 +691,9 @@ void Sprite::SetState( int iNewState )
|
||||
// is loaded in place of a multi-frame sprite. We want to know about these
|
||||
// problems in debug builds, but they're not fatal.
|
||||
if( iNewState < 0 || iNewState >= (int)m_States.size() )
|
||||
{
|
||||
// Don't warn about number of states in "_blank".
|
||||
if( m_pTexture->GetID().filename.Find("_blank") == -1 )
|
||||
{
|
||||
CString sError;
|
||||
if( m_pTexture )
|
||||
@@ -701,6 +704,7 @@ void Sprite::SetState( int iNewState )
|
||||
this->m_sName.c_str(), iNewState );
|
||||
Dialog::OK( sError );
|
||||
}
|
||||
}
|
||||
|
||||
CLAMP(iNewState, 0, (int)m_States.size()-1);
|
||||
m_iCurState = iNewState;
|
||||
|
||||
Reference in New Issue
Block a user