Skip to content

Commit

Permalink
Consider that a Replay was created using Mirror when calculating misses
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Oct 20, 2019
1 parent d7d8248 commit a4b9e0d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Etterna/Models/Misc/PlayerAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
#include "RageUtil/Utils/RageUtil.h"
#include "RadarValues.h"
#include "PlayerStageStats.h"
#include "Etterna/Models/StepsAndStyles/Style.h"
#include "Etterna/Actor/Gameplay/LifeMeterBar.h"
#include "Etterna/Models/NoteData/NoteDataUtil.h"
#include "Etterna/Models/Misc/GameConstantsAndTypes.h"

HighScore* PlayerAI::pScoreData = nullptr;
TimingData* PlayerAI::pReplayTiming = nullptr;
Expand Down Expand Up @@ -270,6 +273,22 @@ PlayerAI::SetUpSnapshotMap(NoteData* pNoteData, set<int> validNoterows)
}
}

// Have to account for mirror being in the highscore options
// please dont change styles in the middle of calculation and break this
// thanks
if (pScoreData->GetModifiers().find("mirror") != string::npos ||
pScoreData->GetModifiers().find("Mirror") != string::npos) {
PlayerOptions po;
po.Init();
po.m_bTurns[PlayerOptions::TURN_MIRROR] = true;
NoteDataUtil::TransformNoteData(
*pNoteData,
*pReplayTiming,
po,
GAMESTATE->GetCurrentStyle(GAMESTATE->m_pPlayerState->m_PlayerNumber)
->m_StepsType);
}

// Now handle misses and holds.
// For every row in notedata...
FOREACH_NONEMPTY_ROW_ALL_TRACKS(*pNoteData, row)
Expand Down

0 comments on commit a4b9e0d

Please sign in to comment.