Skip to content

Commit

Permalink
remove unneeded join player handling in ssm
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed Jul 29, 2020
1 parent acb6209 commit 5d5a83c
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions src/Etterna/Screen/Others/ScreenSelectMusic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -976,40 +976,6 @@ ScreenSelectMusic::ChangeSteps(PlayerNumber pn, int dir)
void
ScreenSelectMusic::HandleMessage(const Message& msg)
{
if (m_bRunning && msg == Message_PlayerJoined) {
PlayerNumber master_pn = GAMESTATE->GetMasterPlayerNumber();
// The current steps may no longer be playable. If one player has double
// steps selected, they are no longer playable now that P2 has joined.

// TODO: Invalidate the CurSteps only if they are no longer playable.
// That way, after music change will clamp to the nearest in the
// StepsDisplayList.
GAMESTATE->m_pCurSteps.SetWithoutBroadcast(nullptr);

/* If a course is selected, it may no longer be playable.
* Let MusicWheel know about the late join. */
m_MusicWheel.PlayerJoined();

AfterMusicChange();

const int iSel = 0;
PlayerNumber pn;
const bool b = msg.GetParam("Player", pn);
ASSERT(b);

// load player profiles
if (GAMESTATE->HaveProfileToLoad()) {
GAMESTATE->LoadProfiles(
true); // I guess you could always load edits here...
SCREENMAN->ZeroNextUpdate(); // be kind, don't skip frames if you
// can avoid it
}

m_iSelection = iSel;
Steps* pSteps = m_vpSteps.empty() ? nullptr : m_vpSteps[m_iSelection];

GAMESTATE->m_pCurSteps.Set(pSteps);
}

ScreenWithMenuElements::HandleMessage(msg);
}
Expand Down

0 comments on commit 5d5a83c

Please sign in to comment.