Skip to content

Commit

Permalink
convert options string music rates to the explicit variable
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Dec 19, 2016
1 parent fe8d6c0 commit bdc51da
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/HighScore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,17 @@ void HighScoreImpl::LoadFromNode( const XNode *pNode )
pNode->GetChildValue( "StageAward", s ); stageAward = StringToStageAward(s);
pNode->GetChildValue( "PeakComboAward", s ); peakComboAward = StringToPeakComboAward(s);
pNode->GetChildValue( "Modifiers", sModifiers );
if (fMusicRate == 0.f) {
size_t ew = sModifiers.find("xMusic");
size_t dew = string::npos;
if (ew == string::npos)
fMusicRate = 1.f;
else {
dew = sModifiers.find_last_of('.', ew) - 1;
RString loot = sModifiers.substr(dew, ew - dew);
fMusicRate = StringToFloat(loot);
}
}
pNode->GetChildValue( "DateTime", s ); dateTime.FromString( s );
pNode->GetChildValue( "PlayerGuid", sPlayerGuid );
pNode->GetChildValue( "MachineGuid", sMachineGuid );
Expand Down

0 comments on commit bdc51da

Please sign in to comment.