Skip to content

Commit

Permalink
Properly disqualify a Replay Score
Browse files Browse the repository at this point in the history
and remove frets from the Player ?????
  • Loading branch information
poco0317 committed Sep 2, 2019
1 parent e532fe9 commit 611781d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
6 changes: 0 additions & 6 deletions src/Etterna/Actor/Gameplay/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions src/Etterna/Actor/Gameplay/Player.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,6 @@ class Player : public ActorFrame

RageSound m_soundMine;

vector<bool> m_vbFretIsDown;

vector<RageSound> m_vKeysounds;

ThemeMetric<float> GRAY_ARROWS_Y_STANDARD;
Expand Down
16 changes: 14 additions & 2 deletions src/Etterna/Actor/Gameplay/PlayerReplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,27 @@
PlayerReplay::PlayerReplay(NoteData& nd, bool bVisibleParts)
: Player(nd, bVisibleParts)
{
// eh
}

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,
Expand Down Expand Up @@ -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;
}
}

Expand Down
5 changes: 5 additions & 0 deletions src/Etterna/Actor/Gameplay/PlayerReplay.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 611781d

Please sign in to comment.