clean up GetVisible() optimization to not process things that won't show. Fixes editor crash on playback.

This commit is contained in:
Chris Danford
2007-09-16 21:22:09 +00:00
parent 2322929f9c
commit 5272d5994c
3 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -318,7 +318,7 @@ GetNextVisiblePlayerInfo( vector<PlayerInfo>::iterator iter, vector<PlayerInfo>
{
for( ; iter != v.end(); ++iter )
{
if( !iter->m_pPlayer->HasNoteField() )
if( !iter->m_pPlayer->HasVisibleParts() )
continue;
return iter;
}
@@ -476,7 +476,7 @@ void ScreenGameplay::Init()
FOREACH_EnabledPlayerInfoNotDummy( m_vPlayerInfo, pi )
{
if( pi->m_pPlayer->HasNoteField() )
if( pi->m_pPlayer->HasVisibleParts() )
{
pi->m_sprOniGameOver.Load( THEME->GetPathG(m_sName,"oni gameover") );
pi->m_sprOniGameOver->SetName( ssprintf("OniGameOver%s",pi->GetName().c_str()) );