fix the demonstration screen when there is no music
This commit is contained in:
@@ -759,6 +759,15 @@ bool ScreenGameplay::IsTimeToPlayTicks() const
|
|||||||
|
|
||||||
void ScreenGameplay::Update( float fDeltaTime )
|
void ScreenGameplay::Update( float fDeltaTime )
|
||||||
{
|
{
|
||||||
|
if( GAMESTATE->m_pCurSong == NULL )
|
||||||
|
{
|
||||||
|
/* ScreenDemonstration will move us to the next screen. We just need to
|
||||||
|
* survive for one update without crashing. We need to call Screen::Update
|
||||||
|
* to make sure we receive the next-screen message. */
|
||||||
|
Screen::Update( fDeltaTime );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if( m_bFirstUpdate )
|
if( m_bFirstUpdate )
|
||||||
{
|
{
|
||||||
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("gameplay intro") ); // crowd cheer
|
SOUNDMAN->PlayOnceFromDir( ANNOUNCER->GetPathTo("gameplay intro") ); // crowd cheer
|
||||||
@@ -811,14 +820,8 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
if( GAMESTATE->m_MasterPlayerNumber != PLAYER_INVALID )
|
if( GAMESTATE->m_MasterPlayerNumber != PLAYER_INVALID )
|
||||||
m_MaxCombo.SetText( ssprintf("%d", GAMESTATE->m_CurStageStats.iCurCombo[GAMESTATE->m_MasterPlayerNumber]) ); /* MAKE THIS WORK FOR BOTH PLAYERS! */
|
m_MaxCombo.SetText( ssprintf("%d", GAMESTATE->m_CurStageStats.iCurCombo[GAMESTATE->m_MasterPlayerNumber]) ); /* MAKE THIS WORK FOR BOTH PLAYERS! */
|
||||||
|
|
||||||
|
|
||||||
//LOG->Trace( "m_fOffsetInBeats = %f, m_fBeatsPerSecond = %f, m_Music.GetPositionSeconds = %f", m_fOffsetInBeats, m_fBeatsPerSecond, m_Music.GetPositionSeconds() );
|
//LOG->Trace( "m_fOffsetInBeats = %f, m_fBeatsPerSecond = %f, m_Music.GetPositionSeconds = %f", m_fOffsetInBeats, m_fBeatsPerSecond, m_Music.GetPositionSeconds() );
|
||||||
|
|
||||||
|
|
||||||
if( GAMESTATE->m_pCurSong == NULL )
|
|
||||||
return;
|
|
||||||
|
|
||||||
|
|
||||||
int pn;
|
int pn;
|
||||||
switch( m_DancingState )
|
switch( m_DancingState )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ bool ScreenJukebox::PrepareForJukebox() // always return true.
|
|||||||
|
|
||||||
SetSong();
|
SetSong();
|
||||||
|
|
||||||
ASSERT( GAMESTATE->m_pCurSong );
|
// ASSERT( GAMESTATE->m_pCurSong );
|
||||||
|
|
||||||
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
|
GAMESTATE->m_MasterPlayerNumber = PLAYER_1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user