Properly calculate radars for Couple charts.

This does force another cache update.
This commit is contained in:
Jason Felds
2011-07-13 04:19:39 -04:00
parent 3da9fbd001
commit 497f460b42
4 changed files with 19 additions and 2 deletions
+1
View File
@@ -12,6 +12,7 @@ StepMania 5.0 ????????? | 20110???
----------
* [Difficulty] Allow ALL StepsTypes to use CustomDifficulty properly.
There was some unfair targeting of Couple and Routine. [Wolfman2000]
* [Steps] Calculate accurate radar values for Couple charts. [Wolfman2000]
2011/07/12
----------
@@ -7022,7 +7022,7 @@ M0000
#CHARTSTYLE:Pad;
#DIFFICULTY:Easy;
#METER:3;
#RADARVALUES:0.506,0.724,1.000,0.838,0.000,147.000,117.000,88.000,0.000,48.000,0.000,0.000,0.000,0.506,0.724,1.000,0.838,0.000,147.000,117.000,88.000,0.000,48.000,0.000,0.000,0.000;
#RADARVALUES:0.253,0.362,0.095,0.419,0.000,132.000,10.000,44.000,0.000,0.000,0.000,0.000,0.000,0.253,0.362,0.095,0.419,0.000,132.000,10.000,44.000,0.000,0.000,0.000,0.000,0.000;
#CREDIT:Jason Felds;
#OFFSET:-0.028000;
#BPMS:0.000000=180.000000
+1 -1
View File
@@ -41,7 +41,7 @@
* @brief The internal version of the cache for StepMania.
*
* Increment this value to invalidate the current cache. */
const int FILE_CACHE_VERSION = 190;
const int FILE_CACHE_VERSION = 191;
/** @brief How long does a song sample last by default? */
const float DEFAULT_MUSIC_SAMPLE_LENGTH = 12.f;
+16
View File
@@ -225,6 +225,22 @@ void Steps::CalculateRadarValues( float fMusicLengthSeconds )
for( size_t pn = 0; pn < min(vParts.size(), size_t(NUM_PLAYERS)); ++pn )
NoteDataUtil::CalculateRadarValues( vParts[pn], fMusicLengthSeconds, m_CachedRadarValues[pn] );
}
else if (GAMEMAN->GetStepsTypeInfo(this->m_StepsType).m_StepsTypeCategory == StepsTypeCategory_Couple)
{
NoteData p1 = tempNoteData;
// XXX: Assumption that couple will always have an even number of notes.
const int tracks = tempNoteData.GetNumTracks() / 2;
p1.SetNumTracks(tracks);
NoteDataUtil::CalculateRadarValues(p1,
fMusicLengthSeconds,
m_CachedRadarValues[PLAYER_1]);
// at this point, p2 is tempNoteData.
NoteDataUtil::ShiftTracks(tempNoteData, tracks);
tempNoteData.SetNumTracks(tracks);
NoteDataUtil::CalculateRadarValues(tempNoteData,
fMusicLengthSeconds,
m_CachedRadarValues[PLAYER_2]);
}
else
{
NoteDataUtil::CalculateRadarValues( tempNoteData, fMusicLengthSeconds, m_CachedRadarValues[0] );