Added RadarCategory_Notes. Rewrote NoteDataWithScoring stuff to only traverse the NoteData once, and match the radar code in NoteDataUtil. Fixed hand and lift counting in NoteDataUtil::CalculateRadarValues. Removed cap from RadarValues so that Stream, Voltage, Air, Freeze, and Chaos can be over 1.0. Fixed Stream and Voltage to not count hold heads twice. Changed SetRadarValues in NotesLoaderSSC to not require the stepfile version number.
This commit is contained in:
+11
-15
@@ -352,25 +352,21 @@ void SetRadarValues(StepsTagInfo& info)
|
||||
{
|
||||
if(info.from_cache || info.for_load_edit)
|
||||
{
|
||||
vector<RString> saValues;
|
||||
split((*info.params)[1], ",", saValues, true);
|
||||
int categories = NUM_RadarCategory;
|
||||
if(info.song->m_fVersion < VERSION_RADAR_FAKE && !info.for_load_edit)
|
||||
{ categories -= 1; }
|
||||
if(saValues.size() == (unsigned int)categories * NUM_PLAYERS)
|
||||
vector<RString> values;
|
||||
split((*info.params)[1], ",", values, true);
|
||||
// Instead of trying to use the version to figure out how many
|
||||
// categories to expect, look at the number of values and split them
|
||||
// evenly. -Kyz
|
||||
size_t cats_per_player= values.size() / NUM_PlayerNumber;
|
||||
RadarValues v[NUM_PLAYERS];
|
||||
FOREACH_PlayerNumber(pn)
|
||||
{
|
||||
RadarValues v[NUM_PLAYERS];
|
||||
FOREACH_PlayerNumber(pn)
|
||||
for(size_t i= 0; i < cats_per_player; ++i)
|
||||
{
|
||||
// Can't use the foreach anymore due to flexible radar lines.
|
||||
for(RadarCategory rc = (RadarCategory)0; rc < categories;
|
||||
enum_add<RadarCategory>(rc, +1))
|
||||
{
|
||||
v[pn][rc] = StringToFloat(saValues[pn*categories + rc]);
|
||||
}
|
||||
v[pn][i]= StringToFloat(values[pn * cats_per_player + i]);
|
||||
}
|
||||
info.steps->SetCachedRadarValues(v);
|
||||
}
|
||||
info.steps->SetCachedRadarValues(v);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user