diff --git a/Docs/Changelog_sm5.txt b/Docs/Changelog_sm5.txt index 194703cba3..02a780e44e 100644 --- a/Docs/Changelog_sm5.txt +++ b/Docs/Changelog_sm5.txt @@ -12,6 +12,10 @@ StepMania 5.0 Preview 2 | 20110??? ---------- * [PlayerOptions] Removed the ScoreDisplay mod choices. Use lua to make your own scoring formulas that work in reverse instead. [Wolfman2000] +* [ScreenGameplay] Fix an assist tick bug if there was no Player 1. Note that + this changes the behavior slightly: it is the first enabled player, or + master player, that gets the ticks now. A better solution will be looked at + in the future. [Wolfman2000] 2011/06/04 ---------- diff --git a/src/GameState.h b/src/GameState.h index 5e925e05ff..17ed341899 100644 --- a/src/GameState.h +++ b/src/GameState.h @@ -139,6 +139,14 @@ public: PlayerNumber GetFirstDisabledPlayer() const; bool IsCpuPlayer( PlayerNumber pn ) const; bool AnyPlayersAreCpu() const; + + /** + * @brief Retrieve the present master player number. + * @return The master player number. */ + PlayerNumber GetMasterPlayerNumber() const + { + return m_MasterPlayerNumber; + } bool IsCourseMode() const; bool IsBattleMode() const; // not Rave diff --git a/src/ScreenGameplay.cpp b/src/ScreenGameplay.cpp index ef55cd02c7..af23e65018 100644 --- a/src/ScreenGameplay.cpp +++ b/src/ScreenGameplay.cpp @@ -1393,7 +1393,7 @@ void ScreenGameplay::PlayTicks() /* TODO: Allow all players to have ticks. Not as simple as it looks. * If a loop takes place, it could make one player's ticks come later * than intended. Any help here would be appreciated. -Wolfman2000 */ - Player &player = *m_vPlayerInfo[0].m_pPlayer; + Player &player = *m_vPlayerInfo[GAMESTATE->GetMasterPlayerNumber()].m_pPlayer; const NoteData &nd = player.GetNoteData(); m_GameplayAssist.PlayTicks( nd, player.GetPlayerState() ); }