fix crash when going from ScreenSelectGameMode back to ScreenTitleMenu
This commit is contained in:
@@ -73,14 +73,25 @@ void ScreenSelect::Update( float fDelta )
|
|||||||
}
|
}
|
||||||
|
|
||||||
Screen::Update( fDelta );
|
Screen::Update( fDelta );
|
||||||
|
|
||||||
|
// GAMESTATE->m_MasterPlayerNumber is set to PLAYER_INVALID when going Back to
|
||||||
|
// the title screen and this screen is updated after. TODO: find out why
|
||||||
|
if( GAMESTATE->m_MasterPlayerNumber != PLAYER_INVALID )
|
||||||
|
{
|
||||||
int iSelection = this->GetSelectionIndex(GAMESTATE->m_MasterPlayerNumber);
|
int iSelection = this->GetSelectionIndex(GAMESTATE->m_MasterPlayerNumber);
|
||||||
m_BGAnimations[iSelection].Update( fDelta );
|
m_BGAnimations[iSelection].Update( fDelta );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenSelect::DrawPrimitives()
|
void ScreenSelect::DrawPrimitives()
|
||||||
{
|
{
|
||||||
|
// GAMESTATE->m_MasterPlayerNumber is set to PLAYER_INVALID when going Back to
|
||||||
|
// the title screen and this screen is updated after. TODO: find out why
|
||||||
|
if( GAMESTATE->m_MasterPlayerNumber != PLAYER_INVALID )
|
||||||
|
{
|
||||||
int iSelection = this->GetSelectionIndex(GAMESTATE->m_MasterPlayerNumber);
|
int iSelection = this->GetSelectionIndex(GAMESTATE->m_MasterPlayerNumber);
|
||||||
m_BGAnimations[iSelection].Draw();
|
m_BGAnimations[iSelection].Draw();
|
||||||
|
}
|
||||||
m_Menu.DrawBottomLayer();
|
m_Menu.DrawBottomLayer();
|
||||||
Screen::DrawPrimitives();
|
Screen::DrawPrimitives();
|
||||||
m_Menu.DrawTopLayer();
|
m_Menu.DrawTopLayer();
|
||||||
|
|||||||
Reference in New Issue
Block a user