From f7a43118efc2537021a46246208a2de962637650 Mon Sep 17 00:00:00 2001 From: MinaciousGrace Date: Thu, 21 Sep 2017 22:05:43 -0400 Subject: [PATCH 1/5] dont use the old 11111 flag when initializing normpercent in highscore, this was used a long time ago when testing something and should have been removed then but i guess i forgot --- src/HighScore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HighScore.cpp b/src/HighScore.cpp index 162f8ceebd..be5594f9bc 100644 --- a/src/HighScore.cpp +++ b/src/HighScore.cpp @@ -227,7 +227,7 @@ HighScoreImpl::HighScoreImpl() iScore = 0; fPercentDP = 0.f; fWifeScore = 0.f; - fSSRNormPercent = 11111.f; + fSSRNormPercent = 0.f; fMusicRate = 0.f; fJudgeScale = 0.f; bEtternaValid = true; From e1ed93eac91dfee0638d985a74dcb81135b9b703 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 25 Sep 2017 03:53:34 -0400 Subject: [PATCH 2/5] purge stupid 11111 ssrnormpercent flags with great prejudice --- src/HighScore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HighScore.cpp b/src/HighScore.cpp index be5594f9bc..2c95718ce3 100644 --- a/src/HighScore.cpp +++ b/src/HighScore.cpp @@ -824,7 +824,7 @@ void HighScore::LoadFromNode( const XNode* pNode ) m_Impl->bEtternaValid = false; } - if (m_Impl->fSSRNormPercent == 11111.f) { + if (m_Impl->fSSRNormPercent > 1000.f) { if (m_Impl->grade != Grade_Failed) m_Impl->fSSRNormPercent = RescoreToWifeJudgeDuringLoad(4); else From 4ff3fb3fad1725c29512f3d6328e2fdf69dea743 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 25 Sep 2017 03:51:40 -0400 Subject: [PATCH 3/5] implement lurkers fix to noccpbkey determination logic --- src/ScoreManager.cpp | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/ScoreManager.cpp b/src/ScoreManager.cpp index 3e58bac8dd..9f210d653a 100644 --- a/src/ScoreManager.cpp +++ b/src/ScoreManager.cpp @@ -390,8 +390,11 @@ XNode* ScoresAtRate::CreateNode(const int& rate) const { string rs = ssprintf("%.3f", static_cast(rate) / 10000.f); // should be safe as this is only called if there is at least 1 score (which would be the pb) o->AppendAttr("PBKey", PBptr->GetScoreKey()); - if(noccPBptr != nullptr && PBptr->GetScoreKey() != noccPBptr->GetScoreKey()) // don't write unless it's different from the pbkey -mina - o->AppendAttr("noccPBKey", noccPBptr->GetScoreKey()); + if (noccPBptr != nullptr) { + if(PBptr->GetScoreKey() != noccPBptr->GetScoreKey()) + o->AppendAttr("noccPBKey", noccPBptr->GetScoreKey()); // don't write unless it's different from the pbkey -mina + } + o->AppendAttr("BestGrade", GradeToString(bestGrade)); o->AppendAttr("Rate", rs); @@ -439,13 +442,17 @@ void ScoresAtRate::LoadFromNode(const XNode* node, const string& ck, const float PBptr = &scores.find(sk)->second; } - // Set any nocc pb - if (noccPBptr == nullptr) - noccPBptr = &scores.find(sk)->second; - else { - // update nocc pb if a better score is found - if (noccPBptr->GetWifeScore() < scores[sk].GetWifeScore() && scores[sk].GetChordCohesion() == 1) + // lurker says: + // don't even TRY to fuck with nocc pb unless the score is nocc + if (scores[sk].GetChordCohesion() == 0) { + // Set any nocc pb + if (noccPBptr == nullptr) noccPBptr = &scores.find(sk)->second; + else { + // update nocc pb if a better score is found + if (noccPBptr->GetSSRNormPercent() < scores[sk].GetSSRNormPercent()) + noccPBptr = &scores.find(sk)->second; + } } // Fill in stuff for the highscores From 92047da71e3adc643cc23a1614e8aa8c9e295684 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 25 Sep 2017 03:50:37 -0400 Subject: [PATCH 4/5] temp hack to avoid recompiling calc 3 times to update version number --- src/ScoreManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ScoreManager.cpp b/src/ScoreManager.cpp index 9f210d653a..b3512b6a1a 100644 --- a/src/ScoreManager.cpp +++ b/src/ScoreManager.cpp @@ -220,7 +220,7 @@ void ScoreManager::RecalculateSSRs(LoadingWindow *ld) { ++scoreindex; HighScore* hs = AllScores[i]; - if (hs->GetSSRCalcVersion() == GetCalcVersion()) + if (hs->GetSSRCalcVersion() == 236) // temp hack continue; Steps* steps = SONGMAN->GetStepsByChartkey(hs->GetChartKey()); @@ -253,7 +253,7 @@ void ScoreManager::RecalculateSSRs(LoadingWindow *ld) { auto dakine = MinaSDCalc(serializednd, steps->GetNoteData().GetNumTracks(), musicrate, ssrpercent, 1.f, td->HasWarps()); FOREACH_ENUM(Skillset, ss) hs->SetSkillsetSSR(ss, dakine[ss]); - hs->SetSSRCalcVersion(GetCalcVersion()); + hs->SetSSRCalcVersion(236); // temp hack td->UnsetEtaner(); nd.UnsetNerv(); @@ -322,7 +322,7 @@ float ScoreManager::AggregateSSRs(Skillset ss, float rating, float res, int iter rating += res; sum = 0.0; for (int i = 0; i < static_cast(TopSSRs.size()); i++) { - if(TopSSRs[i]->GetSSRCalcVersion() == GetCalcVersion() && TopSSRs[i]->GetEtternaValid()) + if(TopSSRs[i]->GetSSRCalcVersion() == 236 && TopSSRs[i]->GetEtternaValid()) // temp hack sum += max(0.0, 2.f / erfc(0.1*(TopSSRs[i]->GetSkillsetSSR(ss) - rating)) - 1.5); } } while (pow(2, rating * 0.1) < sum); From fc238bc642b819e8383f25b39b6c884c9a06ac58 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 25 Sep 2017 03:52:19 -0400 Subject: [PATCH 5/5] correct comment about setchordcohesion function/call --- src/ScoreManager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ScoreManager.cpp b/src/ScoreManager.cpp index b3512b6a1a..52b8596c5c 100644 --- a/src/ScoreManager.cpp +++ b/src/ScoreManager.cpp @@ -273,7 +273,9 @@ void ScoreManager::RecalculateSSRs(LoadingWindow *ld) { totalscorenotes += hs->GetTapNoteScore(TNS_Miss); if (totalstepsnotes - totalscorenotes == 0) - hs->SetChordCohesion(1); // we are setting nochordcohesion to 1 here, functions should be renamed? -mina + hs->SetChordCohesion(1); // the set function isn't inverted but the get function is, this sets bnochordcohesion to 1 + else + hs->SetChordCohesion(0); } return; }