From 611781da6bd9587ba8d9f1cdc08eee04f60a3cc7 Mon Sep 17 00:00:00 2001 From: Barinade Date: Mon, 2 Sep 2019 04:59:54 -0500 Subject: [PATCH] Properly disqualify a Replay Score and remove frets from the Player ????? --- src/Etterna/Actor/Gameplay/Player.cpp | 6 ------ src/Etterna/Actor/Gameplay/Player.h | 2 -- src/Etterna/Actor/Gameplay/PlayerReplay.cpp | 16 ++++++++++++++-- src/Etterna/Actor/Gameplay/PlayerReplay.h | 5 +++++ 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/Etterna/Actor/Gameplay/Player.cpp b/src/Etterna/Actor/Gameplay/Player.cpp index c052cfa627..020da4b477 100644 --- a/src/Etterna/Actor/Gameplay/Player.cpp +++ b/src/Etterna/Actor/Gameplay/Player.cpp @@ -466,12 +466,6 @@ Player::Init(const std::string& sType, ActorUtil::LoadAllCommands(*m_pNoteField, sType); this->AddChild(m_pNoteField); } - - m_vbFretIsDown.resize( - GAMESTATE->GetCurrentStyle(GetPlayerState()->m_PlayerNumber) - ->m_iColsPerPlayer); - FOREACH(bool, m_vbFretIsDown, b) - *b = false; } /** * @brief Determine if a TapNote needs a tap note style judgment. diff --git a/src/Etterna/Actor/Gameplay/Player.h b/src/Etterna/Actor/Gameplay/Player.h index 4c0ce78030..d7628491cc 100644 --- a/src/Etterna/Actor/Gameplay/Player.h +++ b/src/Etterna/Actor/Gameplay/Player.h @@ -277,8 +277,6 @@ class Player : public ActorFrame RageSound m_soundMine; - vector m_vbFretIsDown; - vector m_vKeysounds; ThemeMetric GRAY_ARROWS_Y_STANDARD; diff --git a/src/Etterna/Actor/Gameplay/PlayerReplay.cpp b/src/Etterna/Actor/Gameplay/PlayerReplay.cpp index 3f5493cebf..fb0cb960fa 100644 --- a/src/Etterna/Actor/Gameplay/PlayerReplay.cpp +++ b/src/Etterna/Actor/Gameplay/PlayerReplay.cpp @@ -17,6 +17,7 @@ PlayerReplay::PlayerReplay(NoteData& nd, bool bVisibleParts) : Player(nd, bVisibleParts) { + // eh } PlayerReplay::~PlayerReplay() @@ -24,6 +25,19 @@ PlayerReplay::~PlayerReplay() // dont have to do anything here } +void +PlayerReplay::Init(const std::string& sType, + PlayerState* pPlayerState, + PlayerStageStats* pPlayerStageStats, + LifeMeter* pLM, + ScoreKeeper* pPrimaryScoreKeeper) +{ + Player::Init( + sType, pPlayerState, pPlayerStageStats, pLM, pPrimaryScoreKeeper); + if (m_pPlayerStageStats) + m_pPlayerStageStats->m_bDisqualified = true; +} + void PlayerReplay::UpdateHoldsAndRolls( float fDeltaTime, @@ -182,8 +196,6 @@ PlayerReplay::CrossedRows(int iLastRowCrossed, this->m_Timing->IsJudgableAtRow(iRow)) { if (PlayerAI::GetReplayType() != 2) { Step(iTrack, iRow, now, false, false); - if (m_pPlayerStageStats) - m_pPlayerStageStats->m_bDisqualified = true; } } diff --git a/src/Etterna/Actor/Gameplay/PlayerReplay.h b/src/Etterna/Actor/Gameplay/PlayerReplay.h index 9aecf264dc..826a507e3e 100644 --- a/src/Etterna/Actor/Gameplay/PlayerReplay.h +++ b/src/Etterna/Actor/Gameplay/PlayerReplay.h @@ -10,6 +10,11 @@ class PlayerReplay : public Player PlayerReplay(NoteData& nd, bool bVisibleParts = true); ~PlayerReplay() override; + void Init(const std::string& sType, + PlayerState* pPlayerState, + PlayerStageStats* pPlayerStageStats, + LifeMeter* pLM, + ScoreKeeper* pPrimaryScoreKeeper); void Update(float fDeltaTime) override; void CrossedRows(int iLastrowCrossed, const std::chrono::steady_clock::time_point& now) override;