Skip to content

Commit d7e2c08

Browse files
committed
Reduce redundant PlayerStageStats overwriting in Replays
1 parent 27399a8 commit d7e2c08

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/Etterna/Models/Misc/PlayerAI.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,7 @@ PlayerAI::SetPlayerStageStatsForReplay(PlayerStageStats* pss)
673673
pss->m_HighScore = *pScoreData;
674674
pss->CurWifeScore = pScoreData->GetWifeScore();
675675
pss->m_fWifeScore = pScoreData->GetWifeScore();
676+
pss->m_vHoldReplayData = pScoreData->GetHoldReplayDataVector();
676677
pss->m_vNoteRowVector = pScoreData->GetNoteRowVector();
677678
pss->m_vOffsetVector = pScoreData->GetOffsetVector();
678679
pss->m_vTapNoteTypeVector = pScoreData->GetTapNoteTypeVector();

src/Etterna/Screen/Gameplay/ScreenGameplayReplay.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -210,18 +210,6 @@ ScreenGameplayReplay::SaveStats()
210210
// Also the notedata
211211
SetupNoteDataFromRow(GAMESTATE->m_pCurSteps, -1);
212212

213-
// We need to replace the newly created replay data with the actual old
214-
// data Because to keep consistently lazy practices, we can just hack
215-
// things together instead of fixing the real issue -poco
216-
// (doing this fixes a lot of issues in the eval screen)
217-
PlayerStageStats* pss = m_vPlayerInfo.GetPlayerStageStats();
218-
HighScore* hs = PlayerAI::pScoreData;
219-
pss->m_vHoldReplayData = hs->GetHoldReplayDataVector();
220-
pss->m_vNoteRowVector = hs->GetNoteRowVector();
221-
pss->m_vOffsetVector = hs->GetOffsetVector();
222-
pss->m_vTapNoteTypeVector = hs->GetTapNoteTypeVector();
223-
pss->m_vTrackVector = hs->GetTrackVector();
224-
225213
ScreenGameplay::SaveStats();
226214
}
227215

@@ -233,6 +221,7 @@ ScreenGameplayReplay::StageFinished(bool bBackedOut)
233221
return;
234222
}
235223

224+
// Makes sure all PlayerStageStats discrepancies are corrected forcibly.
236225
PlayerAI::SetPlayerStageStatsForReplay(m_vPlayerInfo.GetPlayerStageStats());
237226

238227
STATSMAN->m_CurStageStats.FinalizeScores(false);

0 commit comments

Comments
 (0)