working on "step on TapAttack" logic
remove mines for NoteField when stepped on
This commit is contained in:
+25
-15
@@ -177,6 +177,7 @@ void PlayerMinus::Load( PlayerNumber pn, const NoteData* pNoteData, LifeMeter* p
|
|||||||
// they change depending on PlayerOptions.
|
// they change depending on PlayerOptions.
|
||||||
|
|
||||||
m_soundMine.Load( THEME->GetPathToS(ssprintf("Player mine p%d",pn+1)) );
|
m_soundMine.Load( THEME->GetPathToS(ssprintf("Player mine p%d",pn+1)) );
|
||||||
|
m_soundAttack.Load( THEME->GetPathToS(ssprintf("Player attack p%d",pn+1)) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerMinus::Update( float fDeltaTime )
|
void PlayerMinus::Update( float fDeltaTime )
|
||||||
@@ -535,6 +536,7 @@ void PlayerMinus::Step( int col, RageTimer tm )
|
|||||||
{
|
{
|
||||||
case PC_HUMAN: {
|
case PC_HUMAN: {
|
||||||
|
|
||||||
|
// TODO: move the judgments into flags in PrefsManager so we don't need logic like this per-game.
|
||||||
if(GAMESTATE->m_CurGame == GAME_EZ2)
|
if(GAMESTATE->m_CurGame == GAME_EZ2)
|
||||||
{
|
{
|
||||||
/* 1 is normal. 2 means scoring is half as hard; .5 means it's twice as hard. */
|
/* 1 is normal. 2 means scoring is half as hard; .5 means it's twice as hard. */
|
||||||
@@ -562,20 +564,6 @@ void PlayerMinus::Step( int col, RageTimer tm )
|
|||||||
|
|
||||||
switch( tn )
|
switch( tn )
|
||||||
{
|
{
|
||||||
// case TAP_ATTACK:
|
|
||||||
// // stepped too close to mine?
|
|
||||||
// if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowAttackSeconds )
|
|
||||||
// {
|
|
||||||
// m_soundAttack.Play();
|
|
||||||
// score = TNS_MISS;
|
|
||||||
// // put attack in effect
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// score = TNS_NONE;
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
|
|
||||||
case TAP_MINE:
|
case TAP_MINE:
|
||||||
// stepped too close to mine?
|
// stepped too close to mine?
|
||||||
if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowMineSeconds )
|
if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowMineSeconds )
|
||||||
@@ -588,6 +576,7 @@ void PlayerMinus::Step( int col, RageTimer tm )
|
|||||||
m_pLifeMeter->ChangeLifeMine();
|
m_pLifeMeter->ChangeLifeMine();
|
||||||
if( m_pCombinedLifeMeter )
|
if( m_pCombinedLifeMeter )
|
||||||
m_pCombinedLifeMeter->ChangeLifeMine(m_PlayerNumber);
|
m_pCombinedLifeMeter->ChangeLifeMine(m_PlayerNumber);
|
||||||
|
m_pNoteField->SetTapNote(col, iIndexOverlappingNote, TAP_EMPTY); // remove from NoteField
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -596,6 +585,18 @@ void PlayerMinus::Step( int col, RageTimer tm )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default: // not a mine
|
default: // not a mine
|
||||||
|
if( IsTapAttack(tn) )
|
||||||
|
{
|
||||||
|
if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowAttackSeconds )
|
||||||
|
{
|
||||||
|
m_soundAttack.Play();
|
||||||
|
score = TNS_NONE; // don't score this as anything
|
||||||
|
m_pNoteField->SetTapNote(col, iIndexOverlappingNote, TAP_EMPTY); // remove from NoteField
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else // !IsTapAttack
|
||||||
|
{
|
||||||
|
// TODO: move the judgments into flags in PrefsManager so we don't need logic like this per-game.
|
||||||
if(GAMESTATE->m_CurGame == GAME_EZ2)
|
if(GAMESTATE->m_CurGame == GAME_EZ2)
|
||||||
{
|
{
|
||||||
/* 1 is normal. 2 means scoring is half as hard; .5 means it's twice as hard. */
|
/* 1 is normal. 2 means scoring is half as hard; .5 means it's twice as hard. */
|
||||||
@@ -617,6 +618,7 @@ void PlayerMinus::Step( int col, RageTimer tm )
|
|||||||
else if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowBooSeconds ) score = TNS_BOO;
|
else if( fScaledSecondsFromPerfect <= PREFSMAN->m_fJudgeWindowBooSeconds ) score = TNS_BOO;
|
||||||
else score = TNS_NONE;
|
else score = TNS_NONE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -661,7 +663,15 @@ void PlayerMinus::Step( int col, RageTimer tm )
|
|||||||
m_pLifeMeter->ChangeLifeMine();
|
m_pLifeMeter->ChangeLifeMine();
|
||||||
if( m_pCombinedLifeMeter )
|
if( m_pCombinedLifeMeter )
|
||||||
m_pCombinedLifeMeter->ChangeLifeMine(m_PlayerNumber);
|
m_pCombinedLifeMeter->ChangeLifeMine(m_PlayerNumber);
|
||||||
|
m_pNoteField->SetTapNote(col, iIndexOverlappingNote, TAP_EMPTY); // remove from NoteField
|
||||||
}
|
}
|
||||||
|
if( IsTapAttack(tn) && score > TNS_GOOD )
|
||||||
|
{
|
||||||
|
m_soundAttack.Play();
|
||||||
|
score = TNS_NONE; // don't score this as anything
|
||||||
|
m_pNoteField->SetTapNote(col, iIndexOverlappingNote, TAP_EMPTY); // remove from NoteField
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case PC_AUTOPLAY:
|
case PC_AUTOPLAY:
|
||||||
if(GAMESTATE->m_CurGame == GAME_EZ2 || GAMESTATE->m_CurGame == GAME_PNM) // these gametypes never hit marvelous on autoplay
|
if(GAMESTATE->m_CurGame == GAME_EZ2 || GAMESTATE->m_CurGame == GAME_PNM) // these gametypes never hit marvelous on autoplay
|
||||||
@@ -727,7 +737,7 @@ void PlayerMinus::Step( int col, RageTimer tm )
|
|||||||
if( score == TNS_PERFECT || score == TNS_MARVELOUS )
|
if( score == TNS_PERFECT || score == TNS_MARVELOUS )
|
||||||
{
|
{
|
||||||
m_iDCState = AS2D_GREAT;
|
m_iDCState = AS2D_GREAT;
|
||||||
if(m_pLifeMeter->GetLife() == 1.0f) // full life
|
if( m_pLifeMeter && m_pLifeMeter->GetLife() == 1.0f) // full life
|
||||||
{
|
{
|
||||||
m_iDCState = AS2D_FEVER; // super celebrate time :)
|
m_iDCState = AS2D_FEVER; // super celebrate time :)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ protected:
|
|||||||
int m_iRowLastCrossed;
|
int m_iRowLastCrossed;
|
||||||
|
|
||||||
RageSound m_soundMine;
|
RageSound m_soundMine;
|
||||||
|
RageSound m_soundAttack;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Player : public PlayerMinus
|
class Player : public PlayerMinus
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ PrefsManager::PrefsManager()
|
|||||||
m_fJudgeWindowBooSeconds = 0.180f;
|
m_fJudgeWindowBooSeconds = 0.180f;
|
||||||
m_fJudgeWindowOKSeconds = 0.250f; // allow enough time to take foot off and put back on
|
m_fJudgeWindowOKSeconds = 0.250f; // allow enough time to take foot off and put back on
|
||||||
m_fJudgeWindowMineSeconds = 0.135f;
|
m_fJudgeWindowMineSeconds = 0.135f;
|
||||||
|
m_fJudgeWindowAttackSeconds = 0.135f;
|
||||||
m_fLifeDeltaMarvelousPercentChange = +0.008f;
|
m_fLifeDeltaMarvelousPercentChange = +0.008f;
|
||||||
m_fLifeDeltaPerfectPercentChange = +0.008f;
|
m_fLifeDeltaPerfectPercentChange = +0.008f;
|
||||||
m_fLifeDeltaGreatPercentChange = +0.004f;
|
m_fLifeDeltaGreatPercentChange = +0.004f;
|
||||||
@@ -253,6 +254,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk()
|
|||||||
ini.GetValue( "Options", "JudgeWindowBooSeconds", m_fJudgeWindowBooSeconds );
|
ini.GetValue( "Options", "JudgeWindowBooSeconds", m_fJudgeWindowBooSeconds );
|
||||||
ini.GetValue( "Options", "JudgeWindowOKSeconds", m_fJudgeWindowOKSeconds );
|
ini.GetValue( "Options", "JudgeWindowOKSeconds", m_fJudgeWindowOKSeconds );
|
||||||
ini.GetValue( "Options", "JudgeWindowMineSeconds", m_fJudgeWindowMineSeconds );
|
ini.GetValue( "Options", "JudgeWindowMineSeconds", m_fJudgeWindowMineSeconds );
|
||||||
|
ini.GetValue( "Options", "JudgeWindowAttackSeconds", m_fJudgeWindowAttackSeconds );
|
||||||
ini.GetValue( "Options", "LifeDeltaMarvelousPercentChange", m_fLifeDeltaMarvelousPercentChange );
|
ini.GetValue( "Options", "LifeDeltaMarvelousPercentChange", m_fLifeDeltaMarvelousPercentChange );
|
||||||
ini.GetValue( "Options", "LifeDeltaPerfectPercentChange", m_fLifeDeltaPerfectPercentChange );
|
ini.GetValue( "Options", "LifeDeltaPerfectPercentChange", m_fLifeDeltaPerfectPercentChange );
|
||||||
ini.GetValue( "Options", "LifeDeltaGreatPercentChange", m_fLifeDeltaGreatPercentChange );
|
ini.GetValue( "Options", "LifeDeltaGreatPercentChange", m_fLifeDeltaGreatPercentChange );
|
||||||
@@ -404,6 +406,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
|
|||||||
ini.SetValue( "Options", "JudgeWindowBooSeconds", m_fJudgeWindowBooSeconds );
|
ini.SetValue( "Options", "JudgeWindowBooSeconds", m_fJudgeWindowBooSeconds );
|
||||||
ini.SetValue( "Options", "JudgeWindowOKSeconds", m_fJudgeWindowOKSeconds );
|
ini.SetValue( "Options", "JudgeWindowOKSeconds", m_fJudgeWindowOKSeconds );
|
||||||
ini.SetValue( "Options", "JudgeWindowMineSeconds", m_fJudgeWindowMineSeconds );
|
ini.SetValue( "Options", "JudgeWindowMineSeconds", m_fJudgeWindowMineSeconds );
|
||||||
|
ini.SetValue( "Options", "JudgeWindowAttackSeconds", m_fJudgeWindowAttackSeconds );
|
||||||
ini.SetValue( "Options", "LifeDeltaMarvelousPercentChange", m_fLifeDeltaMarvelousPercentChange );
|
ini.SetValue( "Options", "LifeDeltaMarvelousPercentChange", m_fLifeDeltaMarvelousPercentChange );
|
||||||
ini.SetValue( "Options", "LifeDeltaPerfectPercentChange", m_fLifeDeltaPerfectPercentChange );
|
ini.SetValue( "Options", "LifeDeltaPerfectPercentChange", m_fLifeDeltaPerfectPercentChange );
|
||||||
ini.SetValue( "Options", "LifeDeltaGreatPercentChange", m_fLifeDeltaGreatPercentChange );
|
ini.SetValue( "Options", "LifeDeltaGreatPercentChange", m_fLifeDeltaGreatPercentChange );
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ public:
|
|||||||
float m_fJudgeWindowBooSeconds;
|
float m_fJudgeWindowBooSeconds;
|
||||||
float m_fJudgeWindowOKSeconds;
|
float m_fJudgeWindowOKSeconds;
|
||||||
float m_fJudgeWindowMineSeconds;
|
float m_fJudgeWindowMineSeconds;
|
||||||
|
float m_fJudgeWindowAttackSeconds;
|
||||||
float m_fLifeDeltaMarvelousPercentChange;
|
float m_fLifeDeltaMarvelousPercentChange;
|
||||||
float m_fLifeDeltaPerfectPercentChange;
|
float m_fLifeDeltaPerfectPercentChange;
|
||||||
float m_fLifeDeltaGreatPercentChange;
|
float m_fLifeDeltaGreatPercentChange;
|
||||||
|
|||||||
Reference in New Issue
Block a user