Push check down.
This commit is contained in:
+17
-16
@@ -925,9 +925,6 @@ int Player::GetClosestNote( int col, int iNoteRow, int iMaxRowsAhead, int iMaxRo
|
|||||||
|
|
||||||
void Player::Step( int col, int row, const RageTimer &tm, bool bHeld, bool bRelease )
|
void Player::Step( int col, int row, const RageTimer &tm, bool bHeld, bool bRelease )
|
||||||
{
|
{
|
||||||
// XXX: Ignore for now.
|
|
||||||
if( bRelease )
|
|
||||||
return;
|
|
||||||
// If we're playing on oni and we've died, do nothing.
|
// If we're playing on oni and we've died, do nothing.
|
||||||
if( GAMESTATE->m_SongOptions.GetCurrent().m_LifeType == SongOptions::LIFE_BATTERY && m_pPlayerStageStats && m_pPlayerStageStats->bFailed )
|
if( GAMESTATE->m_SongOptions.GetCurrent().m_LifeType == SongOptions::LIFE_BATTERY && m_pPlayerStageStats && m_pPlayerStageStats->bFailed )
|
||||||
return;
|
return;
|
||||||
@@ -939,7 +936,7 @@ void Player::Step( int col, int row, const RageTimer &tm, bool bHeld, bool bRele
|
|||||||
const float fSongBeat = GAMESTATE->m_pCurSong ? GAMESTATE->m_pCurSong->GetBeatFromElapsedTime( fPositionSeconds ) : GAMESTATE->m_fSongBeat;
|
const float fSongBeat = GAMESTATE->m_pCurSong ? GAMESTATE->m_pCurSong->GetBeatFromElapsedTime( fPositionSeconds ) : GAMESTATE->m_fSongBeat;
|
||||||
const int iSongRow = row == -1 ? BeatToNoteRow( fSongBeat ) : row;
|
const int iSongRow = row == -1 ? BeatToNoteRow( fSongBeat ) : row;
|
||||||
|
|
||||||
|
if( !bRelease )
|
||||||
{
|
{
|
||||||
// Update roll life
|
// Update roll life
|
||||||
// Let's not check the whole array every time.
|
// Let's not check the whole array every time.
|
||||||
@@ -1002,9 +999,9 @@ void Player::Step( int col, int row, const RageTimer &tm, bool bHeld, bool bRele
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Count calories for this step, unless we're being called because a button is
|
// Count calories for this step, unless we're being called because a button is
|
||||||
// held over a mine.
|
// held over a mine or being released.
|
||||||
//
|
//
|
||||||
if( m_pPlayerStageStats && m_pPlayerState && !bHeld )
|
if( m_pPlayerStageStats && m_pPlayerState && !bHeld && !bRelease )
|
||||||
{
|
{
|
||||||
// TODO: remove use of PlayerNumber
|
// TODO: remove use of PlayerNumber
|
||||||
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
||||||
@@ -1098,7 +1095,8 @@ void Player::Step( int col, int row, const RageTimer &tm, bool bHeld, bool bRele
|
|||||||
switch( m_pPlayerState->m_PlayerController )
|
switch( m_pPlayerState->m_PlayerController )
|
||||||
{
|
{
|
||||||
case PC_HUMAN:
|
case PC_HUMAN:
|
||||||
|
if( !bRelease )
|
||||||
|
{
|
||||||
switch( tn.type )
|
switch( tn.type )
|
||||||
{
|
{
|
||||||
case TapNote::mine:
|
case TapNote::mine:
|
||||||
@@ -1120,6 +1118,11 @@ void Player::Step( int col, int row, const RageTimer &tm, bool bHeld, bool bRele
|
|||||||
else score = TNS_None;
|
else score = TNS_None;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// XXX:
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PC_CPU:
|
case PC_CPU:
|
||||||
@@ -1248,14 +1251,7 @@ void Player::Step( int col, int row, const RageTimer &tm, bool bHeld, bool bRele
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( score != TNS_None )
|
||||||
|
|
||||||
if( m_pNoteField )
|
|
||||||
m_pNoteField->Step( col, score );
|
|
||||||
|
|
||||||
bool bSteppedOnATap = score != TNS_None;
|
|
||||||
|
|
||||||
if( bSteppedOnATap )
|
|
||||||
{
|
{
|
||||||
/* Search for keyed sounds separately. If we can't find a nearby note, search
|
/* Search for keyed sounds separately. If we can't find a nearby note, search
|
||||||
* backwards indefinitely, and ignore grading. */
|
* backwards indefinitely, and ignore grading. */
|
||||||
@@ -1275,8 +1271,13 @@ void Player::Step( int col, int row, const RageTimer &tm, bool bHeld, bool bRele
|
|||||||
m_vKeysounds[tn.iKeysoundIndex].Play();
|
m_vKeysounds[tn.iKeysoundIndex].Play();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// XXX:
|
||||||
|
if( !bRelease )
|
||||||
|
{
|
||||||
|
if( m_pNoteField )
|
||||||
|
m_pNoteField->Step( col, score );
|
||||||
MESSAGEMAN->Broadcast( m_sMessageToSendOnStep );
|
MESSAGEMAN->Broadcast( m_sMessageToSendOnStep );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool Unjudged( const TapNote &tn )
|
static bool Unjudged( const TapNote &tn )
|
||||||
|
|||||||
Reference in New Issue
Block a user