Allow versus oni graceful failure.
This commit is contained in:
@@ -11,6 +11,8 @@ StepMania 5.0 $next | 20111xxx
|
|||||||
2011/12/12
|
2011/12/12
|
||||||
----------
|
----------
|
||||||
* [ScreenEdit] Add the GAMESTATE:InStepEditor LUA binding. [Wolfman2000]
|
* [ScreenEdit] Add the GAMESTATE:InStepEditor LUA binding. [Wolfman2000]
|
||||||
|
* [Player, ScreenGameplay] Allow failing on Oni without crashing. This one
|
||||||
|
took awhile. [Wolfman2000]
|
||||||
|
|
||||||
2011/12/11
|
2011/12/11
|
||||||
----------
|
----------
|
||||||
|
|||||||
+2
-2
@@ -799,7 +799,7 @@ void Player::Update( float fDeltaTime )
|
|||||||
|
|
||||||
//LOG->Trace( "Player::Update(%f)", fDeltaTime );
|
//LOG->Trace( "Player::Update(%f)", fDeltaTime );
|
||||||
|
|
||||||
if( GAMESTATE->m_pCurSong==NULL )
|
if( GAMESTATE->m_pCurSong==NULL || IsOniDead() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ActorFrame::Update( fDeltaTime );
|
ActorFrame::Update( fDeltaTime );
|
||||||
@@ -1520,7 +1520,7 @@ void Player::DrawPrimitives()
|
|||||||
|
|
||||||
DISPLAY->LoadMenuPerspective( 45, SCREEN_WIDTH, SCREEN_HEIGHT, SCALE(fSkew,0.f,1.f,this->GetX(),SCREEN_CENTER_X), fCenterY );
|
DISPLAY->LoadMenuPerspective( 45, SCREEN_WIDTH, SCREEN_HEIGHT, SCALE(fSkew,0.f,1.f,this->GetX(),SCREEN_CENTER_X), fCenterY );
|
||||||
|
|
||||||
if( m_pNoteField )
|
if( m_pNoteField && !IsOniDead() )
|
||||||
{
|
{
|
||||||
float fOriginalY = m_pNoteField->GetY();
|
float fOriginalY = m_pNoteField->GetY();
|
||||||
|
|
||||||
|
|||||||
@@ -1682,7 +1682,9 @@ void ScreenGameplay::Update( float fDeltaTime )
|
|||||||
// kill them!
|
// kill them!
|
||||||
SOUND->PlayOnceFromDir( THEME->GetPathS(m_sName,"oni die") );
|
SOUND->PlayOnceFromDir( THEME->GetPathS(m_sName,"oni die") );
|
||||||
pi->ShowOniGameOver();
|
pi->ShowOniGameOver();
|
||||||
|
int tracks = pi->m_NoteData.GetNumTracks();
|
||||||
pi->m_NoteData.Init(); // remove all notes and scoring
|
pi->m_NoteData.Init(); // remove all notes and scoring
|
||||||
|
pi->m_NoteData.SetNumTracks(tracks); // reset the number of tracks.
|
||||||
pi->m_pPlayer->FadeToFail(); // tell the NoteField to fade to white
|
pi->m_pPlayer->FadeToFail(); // tell the NoteField to fade to white
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user