|
16 | 16 | #include "Core/Services/Locator.hpp"
|
17 | 17 | #include "GamePreferences.h"
|
18 | 18 | #include "Etterna/Singletons/ReplayManager.h"
|
| 19 | +#include "Etterna/Singletons/GameManager.h" |
| 20 | +#include "Etterna/Models/NoteData/NoteDataUtil.h" |
19 | 21 |
|
20 | 22 | #ifndef _WIN32
|
21 | 23 | #include <cpuid.h>
|
@@ -531,7 +533,8 @@ FillInHighScore(const PlayerStageStats& pss,
|
531 | 533 | asModifiers.push_back(sSongOptions);
|
532 | 534 | }
|
533 | 535 | }
|
534 |
| - hs.SetModifiers(join(", ", asModifiers)); |
| 536 | + const auto modstr = join(", ", asModifiers); |
| 537 | + hs.SetModifiers(modstr); |
535 | 538 |
|
536 | 539 | hs.SetDateTime(DateTime::GetNowDateTime());
|
537 | 540 | hs.SetPlayerGuid(sPlayerGuid);
|
@@ -589,8 +592,39 @@ FillInHighScore(const PlayerStageStats& pss,
|
589 | 592 |
|
590 | 593 | // for this we need the actual totalpoints values, so we need steps data
|
591 | 594 | auto steps = GAMESTATE->m_pCurSteps;
|
| 595 | + auto st = steps->m_StepsType; |
| 596 | + auto* style = GAMEMAN->GetStyleForStepsType(st); |
592 | 597 | auto nd = steps->GetNoteData();
|
593 | 598 | auto* td = steps->GetTimingData();
|
| 599 | + |
| 600 | + // transform the notedata by style if necessary |
| 601 | + if (style != nullptr) { |
| 602 | + NoteData ndo; |
| 603 | + style->GetTransformedNoteDataForStyle(PLAYER_1, nd, ndo); |
| 604 | + nd = ndo; |
| 605 | + } |
| 606 | + |
| 607 | + // Have to account for mirror and shuffle |
| 608 | + if (style != nullptr && td != nullptr) { |
| 609 | + PlayerOptions po; |
| 610 | + po.Init(); |
| 611 | + po.SetForReplay(true); |
| 612 | + po.FromString(modstr); |
| 613 | + auto tmpSeed = GAMESTATE->m_iStageSeed; |
| 614 | + |
| 615 | + // if rng was not saved, only apply non shuffle mods |
| 616 | + if (hs.GetStageSeed() == 0) { |
| 617 | + po.m_bTurns[PlayerOptions::TURN_SHUFFLE] = false; |
| 618 | + po.m_bTurns[PlayerOptions::TURN_SOFT_SHUFFLE] = false; |
| 619 | + po.m_bTurns[PlayerOptions::TURN_SUPER_SHUFFLE] = false; |
| 620 | + po.m_bTurns[PlayerOptions::TURN_HRAN_SHUFFLE] = false; |
| 621 | + } else { |
| 622 | + GAMESTATE->m_iStageSeed = hs.GetStageSeed(); |
| 623 | + } |
| 624 | + |
| 625 | + NoteDataUtil::TransformNoteData(nd, *td, po, style->m_StepsType); |
| 626 | + GAMESTATE->m_iStageSeed = tmpSeed; |
| 627 | + } |
594 | 628 | auto maxpoints = static_cast<float>(nd.WifeTotalScoreCalc(td));
|
595 | 629 |
|
596 | 630 | // i _think_ an assert is ok here.. if this can happen we probably want
|
|
0 commit comments