new metric [GameState] DisablePremiumInEventMode (bool)
This commit is contained in:
@@ -383,6 +383,9 @@ UseNameBlacklist=false
|
|||||||
AllowExtra2=true
|
AllowExtra2=true
|
||||||
# Don't let the player change difficulties on an ES/OMES
|
# Don't let the player change difficulties on an ES/OMES
|
||||||
LockExtraStageSelection=true
|
LockExtraStageSelection=true
|
||||||
|
# [sm-ssc] Normally, in event mode, the premium value is ignored. Set this
|
||||||
|
# metric to true to re-gain that behavior.
|
||||||
|
DisablePremiumInEventMode=false
|
||||||
|
|
||||||
[GrooveRadar]
|
[GrooveRadar]
|
||||||
# Polar graph that shows difficulty stuff in depth
|
# Polar graph that shows difficulty stuff in depth
|
||||||
|
|||||||
+22
-22
@@ -541,6 +541,11 @@ void GameState::SavePlayerProfile( PlayerNumber pn )
|
|||||||
{
|
{
|
||||||
if( !PROFILEMAN->IsPersistentProfile(pn) )
|
if( !PROFILEMAN->IsPersistentProfile(pn) )
|
||||||
return;
|
return;
|
||||||
|
// AutoplayCPU should not save scores. -aj
|
||||||
|
// xxx: this MAY cause issues with Multiplayer. However, without a working
|
||||||
|
// Multiplayer build, we'll never know. -aj
|
||||||
|
if( m_pPlayerState[pn]->m_PlayerController != PC_HUMAN )
|
||||||
|
return;
|
||||||
|
|
||||||
bool bWasMemoryCard = PROFILEMAN->ProfileWasLoadedFromMemoryCard(pn);
|
bool bWasMemoryCard = PROFILEMAN->ProfileWasLoadedFromMemoryCard(pn);
|
||||||
if( bWasMemoryCard )
|
if( bWasMemoryCard )
|
||||||
@@ -890,10 +895,8 @@ void GameState::ResetMusicStatistics()
|
|||||||
//m_bStop = false;
|
//m_bStop = false;
|
||||||
m_bFreeze = false;
|
m_bFreeze = false;
|
||||||
m_bDelay = false;
|
m_bDelay = false;
|
||||||
/*
|
m_iWarpBeginRow = -1; // Set to -1 because some song may want to warp to row 0. -aj
|
||||||
m_iWarpToRow = -1; // Set to -1 because some song may want to warp to row 0. -aj
|
m_iWarpEndRow = -1; // Set when a warp is encountered. also see above. -aj
|
||||||
m_iWarpFromRow = -1; // Set when a warp is encountered. also see above. -aj
|
|
||||||
*/
|
|
||||||
m_fMusicSecondsVisible = 0;
|
m_fMusicSecondsVisible = 0;
|
||||||
m_fSongBeatVisible = 0;
|
m_fSongBeatVisible = 0;
|
||||||
Actor::SetBGMTime( 0, 0, 0, 0 );
|
Actor::SetBGMTime( 0, 0, 0, 0 );
|
||||||
@@ -940,7 +943,6 @@ void GameState::ResetStageStatistics()
|
|||||||
|
|
||||||
static Preference<float> g_fVisualDelaySeconds( "VisualDelaySeconds", 0.0f );
|
static Preference<float> g_fVisualDelaySeconds( "VisualDelaySeconds", 0.0f );
|
||||||
// todo: modify for warps -aj
|
// todo: modify for warps -aj
|
||||||
// m_iWarpToRow
|
|
||||||
void GameState::UpdateSongPosition( float fPositionSeconds, const TimingData &timing, const RageTimer ×tamp )
|
void GameState::UpdateSongPosition( float fPositionSeconds, const TimingData &timing, const RageTimer ×tamp )
|
||||||
{
|
{
|
||||||
if( !timestamp.IsZero() )
|
if( !timestamp.IsZero() )
|
||||||
@@ -948,12 +950,11 @@ void GameState::UpdateSongPosition( float fPositionSeconds, const TimingData &ti
|
|||||||
else
|
else
|
||||||
m_LastBeatUpdate.Touch();
|
m_LastBeatUpdate.Touch();
|
||||||
|
|
||||||
/*
|
|
||||||
// xxx testing: only do this on monotune survivor
|
// xxx testing: only do this on monotune survivor
|
||||||
if( m_pCurSong && m_pCurSong->GetDisplayFullTitle() == "monotune survivor" )
|
if( m_pCurSong && m_pCurSong->GetDisplayFullTitle() == "monotune survivor" )
|
||||||
LOG->Trace( ssprintf("[GameState::UpdateSongPosition] cur BPS = %f, fPositionSeconds = %f",m_fCurBPS,fPositionSeconds) );
|
LOG->Trace( ssprintf("[GameState::UpdateSongPosition] cur BPS = %f, fPositionSeconds = %f",m_fCurBPS,fPositionSeconds) );
|
||||||
*/
|
|
||||||
timing.GetBeatAndBPSFromElapsedTime( fPositionSeconds, m_fSongBeat, m_fCurBPS, m_bFreeze, m_bDelay );
|
timing.GetBeatAndBPSFromElapsedTime( fPositionSeconds, m_fSongBeat, m_fCurBPS, m_bFreeze, m_bDelay, m_iWarpBeginRow, m_iWarpEndRow );
|
||||||
// "Crash reason : -243478.890625 -48695.773438"
|
// "Crash reason : -243478.890625 -48695.773438"
|
||||||
ASSERT_M( m_fSongBeat > -2000, ssprintf("Song beat %f at %f seconds", m_fSongBeat, fPositionSeconds) );
|
ASSERT_M( m_fSongBeat > -2000, ssprintf("Song beat %f at %f seconds", m_fSongBeat, fPositionSeconds) );
|
||||||
|
|
||||||
@@ -975,7 +976,8 @@ void GameState::UpdateSongPosition( float fPositionSeconds, const TimingData &ti
|
|||||||
m_fMusicSecondsVisible = fPositionSeconds - g_fVisualDelaySeconds.Get();
|
m_fMusicSecondsVisible = fPositionSeconds - g_fVisualDelaySeconds.Get();
|
||||||
float fThrowAway;
|
float fThrowAway;
|
||||||
bool bThrowAway;
|
bool bThrowAway;
|
||||||
timing.GetBeatAndBPSFromElapsedTime( m_fMusicSecondsVisible, m_fSongBeatVisible, fThrowAway, bThrowAway, bThrowAway );
|
int iThrowAway1, iThrowAway2;
|
||||||
|
timing.GetBeatAndBPSFromElapsedTime( m_fMusicSecondsVisible, m_fSongBeatVisible, fThrowAway, bThrowAway, bThrowAway, iThrowAway1, iThrowAway2 );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// xxx testing: only do this on monotune survivor
|
// xxx testing: only do this on monotune survivor
|
||||||
@@ -1082,7 +1084,7 @@ Stage GameState::GetCurrentStage() const
|
|||||||
case 3: return Stage_4th;
|
case 3: return Stage_4th;
|
||||||
case 4: return Stage_5th;
|
case 4: return Stage_5th;
|
||||||
case 5: return Stage_6th;
|
case 5: return Stage_6th;
|
||||||
default: return Stage_Next;
|
default: return Stage_Next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1102,8 +1104,8 @@ int GameState::GetCourseSongIndex() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hack: when we're loading a new course song, we want to display the new song number, even
|
/* Hack: when we're loading a new course song, we want to display the new song
|
||||||
* though we haven't started that song yet. */
|
* number, even though we haven't started that song yet. */
|
||||||
int GameState::GetLoadingCourseSongIndex() const
|
int GameState::GetLoadingCourseSongIndex() const
|
||||||
{
|
{
|
||||||
int iIndex = GetCourseSongIndex();
|
int iIndex = GetCourseSongIndex();
|
||||||
@@ -1324,11 +1326,11 @@ EarnedExtraStage GameState::CalculateEarnedExtraStage() const
|
|||||||
switch( dc )
|
switch( dc )
|
||||||
{
|
{
|
||||||
case Difficulty_Edit:
|
case Difficulty_Edit:
|
||||||
continue; /* not hard enough! */
|
continue; // can't use edit steps
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if( dc < MIN_DIFFICULTY_FOR_EXTRA )
|
if( dc < MIN_DIFFICULTY_FOR_EXTRA )
|
||||||
continue; /* not hard enough! */
|
continue; // not hard enough!
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1376,11 +1378,11 @@ StageResult GameState::GetStageResult( PlayerNumber pn ) const
|
|||||||
if( p == pn )
|
if( p == pn )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* If anyone did just as well, at best it's a draw. */
|
// If anyone did just as well, at best it's a draw.
|
||||||
if( STATSMAN->m_CurStageStats.m_player[p].m_iActualDancePoints == STATSMAN->m_CurStageStats.m_player[pn].m_iActualDancePoints )
|
if( STATSMAN->m_CurStageStats.m_player[p].m_iActualDancePoints == STATSMAN->m_CurStageStats.m_player[pn].m_iActualDancePoints )
|
||||||
win = RESULT_DRAW;
|
win = RESULT_DRAW;
|
||||||
|
|
||||||
/* If anyone did better, we lost. */
|
// If anyone did better, we lost.
|
||||||
if( STATSMAN->m_CurStageStats.m_player[p].m_iActualDancePoints > STATSMAN->m_CurStageStats.m_player[pn].m_iActualDancePoints )
|
if( STATSMAN->m_CurStageStats.m_player[p].m_iActualDancePoints > STATSMAN->m_CurStageStats.m_player[pn].m_iActualDancePoints )
|
||||||
return RESULT_LOSE;
|
return RESULT_LOSE;
|
||||||
}
|
}
|
||||||
@@ -1563,8 +1565,8 @@ void GameState::GetRankingFeats( PlayerNumber pn, vector<RankingFeat> &asFeatsOu
|
|||||||
|
|
||||||
Profile *pProf = PROFILEMAN->GetProfile(pn);
|
Profile *pProf = PROFILEMAN->GetProfile(pn);
|
||||||
|
|
||||||
// Check for feats even if the PlayMode is rave or battle because the player may have
|
// Check for feats even if the PlayMode is rave or battle because the player
|
||||||
// made high scores then switched modes.
|
// may have made high scores then switched modes.
|
||||||
CHECKPOINT_M( ssprintf("PlayMode %i", int(m_PlayMode)) );
|
CHECKPOINT_M( ssprintf("PlayMode %i", int(m_PlayMode)) );
|
||||||
switch( m_PlayMode )
|
switch( m_PlayMode )
|
||||||
{
|
{
|
||||||
@@ -2059,12 +2061,10 @@ CoinMode GameState::GetCoinMode() const
|
|||||||
return GamePreferences::m_CoinMode;
|
return GamePreferences::m_CoinMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ThemeMetric<bool> DISABLE_PREMIUM_IN_EVENT_MODE("GameState","DisablePremiumInEventMode");
|
||||||
Premium GameState::GetPremium() const
|
Premium GameState::GetPremium() const
|
||||||
{
|
{
|
||||||
if( IsEventMode() )
|
return DISABLE_PREMIUM_IN_EVENT_MODE ? Premium_Off : g_Premium;
|
||||||
return Premium_Off;
|
|
||||||
else
|
|
||||||
return g_Premium;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float GameState::GetGoalPercentComplete( PlayerNumber pn )
|
float GameState::GetGoalPercentComplete( PlayerNumber pn )
|
||||||
|
|||||||
Reference in New Issue
Block a user