Fixed pump noteskin to not set zero delay on receptor sprites. Changed error messages from Sprite to give 1-indexed state numbers.

This commit is contained in:
Kyzentun
2015-01-28 07:53:55 -07:00
parent 0778e7b35e
commit 58d3fd2b6f
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -188,7 +188,7 @@ void Sprite::LoadFromNode( const XNode* pNode )
}
if(newState.fDelay <= min_state_delay)
{
LuaHelpers::ReportScriptErrorFmt("%s: State #%i has near-zero delay.", ActorUtil::GetWhere(pNode).c_str(), i);
LuaHelpers::ReportScriptErrorFmt("%s: State #%i has near-zero delay.", ActorUtil::GetWhere(pNode).c_str(), i+1);
newState.fDelay= 0.1f;
}
@@ -196,7 +196,7 @@ void Sprite::LoadFromNode( const XNode* pNode )
if( iFrameIndex >= m_pTexture->GetNumFrames() )
{
LuaHelpers::ReportScriptErrorFmt( "%s: State #%i is frame %d, but the texture \"%s\" only has %d frames",
ActorUtil::GetWhere(pNode).c_str(), i, iFrameIndex, sPath.c_str(), m_pTexture->GetNumFrames() );
ActorUtil::GetWhere(pNode).c_str(), i+1, iFrameIndex, sPath.c_str(), m_pTexture->GetNumFrames() );
}
newState.rect = *m_pTexture->GetTextureCoordRect( iFrameIndex );