Write radar values for edits. If the program loading them doesn't trust the values, then it can ignore the values
This commit is contained in:
@@ -170,9 +170,8 @@ RString NotesWriterSM::GetSMNotesTag( const Song &song, const Steps &in, bool bS
|
|||||||
lines.push_back( ssprintf( " %s:", DifficultyToString(in.GetDifficulty()).c_str() ) );
|
lines.push_back( ssprintf( " %s:", DifficultyToString(in.GetDifficulty()).c_str() ) );
|
||||||
lines.push_back( ssprintf( " %d:", in.GetMeter() ) );
|
lines.push_back( ssprintf( " %d:", in.GetMeter() ) );
|
||||||
|
|
||||||
int MaxRadar = bSavingCache? NUM_RadarCategory:5;
|
|
||||||
vector<RString> asRadarValues;
|
vector<RString> asRadarValues;
|
||||||
for( int r=0; r < MaxRadar; r++ )
|
for( int r=0; r < NUM_RadarCategory; r++ )
|
||||||
asRadarValues.push_back( ssprintf("%.3f", in.GetRadarValues()[r]) );
|
asRadarValues.push_back( ssprintf("%.3f", in.GetRadarValues()[r]) );
|
||||||
/* Don't append a newline here; it's added in NoteDataUtil::GetSMNoteDataString.
|
/* Don't append a newline here; it's added in NoteDataUtil::GetSMNoteDataString.
|
||||||
* If we add it here, then every time we write unmodified data we'll add an extra
|
* If we add it here, then every time we write unmodified data we'll add an extra
|
||||||
|
|||||||
@@ -152,9 +152,13 @@ void Steps::CalculateRadarValues( float fMusicLengthSeconds )
|
|||||||
if( parent != NULL )
|
if( parent != NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Do write radar values, and leave it up to the reading app whether they want to trust
|
||||||
|
// the cached values without recalculating them.
|
||||||
|
/*
|
||||||
// If we're an edit, leave the RadarValues invalid.
|
// If we're an edit, leave the RadarValues invalid.
|
||||||
if( IsAnEdit() )
|
if( IsAnEdit() )
|
||||||
return;
|
return;
|
||||||
|
*/
|
||||||
|
|
||||||
NoteData tempNoteData;
|
NoteData tempNoteData;
|
||||||
this->GetNoteData( tempNoteData );
|
this->GetNoteData( tempNoteData );
|
||||||
|
|||||||
Reference in New Issue
Block a user