Can't forget the mini hold stuff.

This commit is contained in:
Jason Felds
2011-02-13 11:15:37 -05:00
+12 -7
View File
@@ -985,6 +985,7 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
//LOG->Trace(ssprintf("[Player::UpdateHoldNotes] fLife = %f",fLife));
bool bSteppedOnHead = true;
bool bHeadJudged = true;
FOREACH( TrackRowTapNote, vTN, trtn )
{
TapNote &tn = *trtn->pTN;
@@ -995,7 +996,8 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
// taps was hit before activating this group of holds.
/* Something about the logic in this section is causing 192nd steps to
* fail for some odd reason. -aj */
bSteppedOnHead &= (tns != TNS_None && tns != TNS_Miss); // did they step on the start of this hold?
bSteppedOnHead &= (tns != TNS_Miss && tns != TNS_None); // did they step on the start of this hold?
bHeadJudged &= (tns != TNS_None); // has this hold really even started yet?
/*
if(bSteppedOnHead)
@@ -1012,13 +1014,16 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
// register as Held, even if you hit the note. This is considered a
// major roadblock to adoption, so until a proper fix is found,
// DON'T REMOVE THIS HACK! -aj
if( iMaxEndRow-iStartRow <= 4 )
/*if( iMaxEndRow-iStartRow <= 4 )
bInitiatedNote = true;
else
else*/
bInitiatedNote = bSteppedOnHead;
}
else
{
bInitiatedNote = true;
bHeadJudged = true;
}
bool bIsHoldingButton = true;
FOREACH( TrackRowTapNote, vTN, trtn )
@@ -1058,7 +1063,7 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
}
}
if( bInitiatedNote && fLife != 0 )
if( bInitiatedNote && fLife != 0 && bHeadJudged )
{
//LOG->Trace("[Player::UpdateHoldNotes] initiated note, fLife != 0");
/* This hold note is not judged and we stepped on its head.
@@ -1076,7 +1081,7 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
}
// If the song beat is in the range of this hold:
if( iStartRow <= iSongRow && iStartRow <= iMaxEndRow )
if( iStartRow <= iSongRow && iStartRow <= iMaxEndRow && bHeadJudged )
{
switch( subType )
{
@@ -1157,7 +1162,7 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
* which doesn't seem correct. */
if( IMMEDIATE_HOLD_LET_GO )
{
if( bInitiatedNote && fLife == 0 ) // the player has not pressed the button for a long time!
if( bInitiatedNote && fLife == 0 && bHeadJudged ) // the player has not pressed the button for a long time!
{
//LOG->Trace("LetGo from life == 0 (did initiate hold)");
hns = HNS_LetGo;
@@ -1165,7 +1170,7 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
}
// score hold notes that have passed
if( iSongRow >= iMaxEndRow )
if( iSongRow >= iMaxEndRow && bHeadJudged )
{
bool bLetGoOfHoldNote = false;