Partial revert of b61e878.

Pump holds do have a little bit of leeway when it comes to letting go and putting your foot back on as proven by [WinDEU's demonstration of Dignity S20](https://www.youtube.com/watch?v=P2Fw9KPyHIg&feature=youtu.be&t=30).

The value used was determined by two video sources: the one mentioned above and a private one sent to me involving a different song/chart combination. 200ms is a rough estimate for what works. There may be other allowed values.
This commit is contained in:
Jason Felds
2015-07-19 16:08:50 -04:00
parent fa7e042da9
commit 960af12c23
3 changed files with 40 additions and 24 deletions
+38 -24
View File
@@ -107,17 +107,38 @@ void TimingWindowSecondsInit( size_t /*TimingWindow*/ i, RString &sNameOut, floa
sNameOut = "TimingWindowSeconds" + TimingWindowToString( (TimingWindow)i );
switch( i )
{
default:
FAIL_M(ssprintf("Invalid timing window: %i", static_cast<int>(i)));
case TW_W1: defaultValueOut = 0.0225f; break;
case TW_W2: defaultValueOut = 0.045f; break;
case TW_W3: defaultValueOut = 0.090f; break;
case TW_W4: defaultValueOut = 0.135f; break;
case TW_W5: defaultValueOut = 0.180f; break;
case TW_Mine: defaultValueOut = 0.090f; break; // same as great
case TW_Hold: defaultValueOut = 0.250f; break; // allow enough time to take foot off and put back on
case TW_Roll: defaultValueOut = 0.500f; break;
case TW_Attack: defaultValueOut = 0.135f; break;
case TW_W1:
defaultValueOut = 0.0225f;
break;
case TW_W2:
defaultValueOut = 0.045f;
break;
case TW_W3:
defaultValueOut = 0.090f;
break;
case TW_W4:
defaultValueOut = 0.135f;
break;
case TW_W5:
defaultValueOut = 0.180f;
break;
case TW_Mine: // same as great
defaultValueOut = 0.090f;
break;
case TW_Hold: // allow enough time to take foot off and put back on
defaultValueOut = 0.250f;
break;
case TW_Roll:
defaultValueOut = 0.500f;
break;
case TW_Attack:
defaultValueOut = 0.135f;
break;
case TW_Checkpoint: // similar to TW_Hold, but a little more strict typically.
defaultValueOut = 0.2f;
break;
default:
FAIL_M(ssprintf("Invalid timing window: %i", static_cast<int>(i)));
}
}
@@ -1287,19 +1308,12 @@ void Player::UpdateHoldNotes( int iSongRow, float fDeltaTime, vector<TrackRowTap
LOG->Trace("[ ] Holding Button");
*/
// For tickholds, the concept of "life" doesn't really apply.
// XXX: if IMMEDIATE_HOLD_LET_GO this will kill holds if it's EVER let go,
// not just at the first missed checkpoint.
if( m_bTickHolds ) fLife = 0.0;
else
{
// Decrease life
//LOG->Trace("fLife before minus: %f",fLife);
fLife -= fDeltaTime/GetWindowSeconds(TW_Hold);
//LOG->Trace("fLife before clamp: %f",fLife);
fLife = max( fLife, 0 ); // clamp
//LOG->Trace("fLife after: %f",fLife);
}
TimingWindow window = m_bTickHolds ? TW_Checkpoint : TW_Hold;
//LOG->Trace("fLife before minus: %f",fLife);
fLife -= fDeltaTime / GetWindowSeconds(window);
//LOG->Trace("fLife before clamp: %f",fLife);
fLife = max(0, fLife);
//LOG->Trace("fLife after: %f",fLife);
}
break;
case TapNoteSubType_Roll: