From 65252818b8b663ed2f8c056a89b895a815f52196 Mon Sep 17 00:00:00 2001 From: poco0317 Date: Thu, 20 Dec 2018 17:48:54 -0600 Subject: [PATCH] Set player count to 1 and fix gameplay issue stemming from that ...Time to kill player 2 once and for all. --- src/AutoKeysounds.cpp | 15 ++------------- src/AutoKeysounds.h | 3 +-- src/PlayerNumber.cpp | 3 +-- src/PlayerNumber.h | 7 +++---- 4 files changed, 7 insertions(+), 21 deletions(-) diff --git a/src/AutoKeysounds.cpp b/src/AutoKeysounds.cpp index de6941c25d..94fc24fe3f 100644 --- a/src/AutoKeysounds.cpp +++ b/src/AutoKeysounds.cpp @@ -113,15 +113,13 @@ AutoKeysounds::LoadAutoplaySoundsInto(RageSoundReader_Chain* pChain) void AutoKeysounds::LoadTracks(const Song* pSong, RageSoundReader*& pShared, - RageSoundReader*& pPlayer1, - RageSoundReader*& pPlayer2) + RageSoundReader*& pPlayer1) { // If we have two players, prefer a three-track sound; otherwise prefer a // two-track sound. // bool bTwoPlayers = GAMESTATE->GetNumPlayersEnabled() == 2; pPlayer1 = nullptr; - pPlayer2 = nullptr; pShared = nullptr; vector vsMusicFile; @@ -197,7 +195,7 @@ AutoKeysounds::FinishLoading() Song* pSong = GAMESTATE->m_pCurSong; vector apSounds; - LoadTracks(pSong, m_pSharedSound, m_pPlayerSounds[0], m_pPlayerSounds[1]); + LoadTracks(pSong, m_pSharedSound, m_pPlayerSounds[0]); // Load autoplay sounds, if any. { @@ -234,15 +232,6 @@ AutoKeysounds::FinishLoading() apSounds.push_back(m_pPlayerSounds[0]); } - if (m_pPlayerSounds[1] != nullptr) { - m_pPlayerSounds[1] = - new RageSoundReader_PitchChange(m_pPlayerSounds[1]); - m_pPlayerSounds[1] = - new RageSoundReader_PostBuffering(m_pPlayerSounds[1]); - m_pPlayerSounds[1] = new RageSoundReader_Pan(m_pPlayerSounds[1]); - apSounds.push_back(m_pPlayerSounds[1]); - } - if (apSounds.size() > 1) { auto* pMerge = new RageSoundReader_Merge; diff --git a/src/AutoKeysounds.h b/src/AutoKeysounds.h index 966c13cc75..e3999b0fa6 100644 --- a/src/AutoKeysounds.h +++ b/src/AutoKeysounds.h @@ -30,8 +30,7 @@ class AutoKeysounds void LoadAutoplaySoundsInto(RageSoundReader_Chain* pChain); static void LoadTracks(const Song* pSong, RageSoundReader*& pGlobal, - RageSoundReader*& pPlayer1, - RageSoundReader*& pPlayer2); + RageSoundReader*& pPlayer1); NoteData m_ndAutoKeysoundsOnly[NUM_PLAYERS]; vector m_vKeysounds; diff --git a/src/PlayerNumber.cpp b/src/PlayerNumber.cpp index 5525f51797..341d9332f8 100644 --- a/src/PlayerNumber.cpp +++ b/src/PlayerNumber.cpp @@ -4,8 +4,7 @@ #include "PlayerNumber.h" static const char* PlayerNumberNames[] = { - "P1", - "P2" + "P1" }; XToString(PlayerNumber); XToLocalizedString(PlayerNumber); diff --git a/src/PlayerNumber.h b/src/PlayerNumber.h index 6e3abf204c..b7058a5ce8 100644 --- a/src/PlayerNumber.h +++ b/src/PlayerNumber.h @@ -1,4 +1,4 @@ -/* PlayerNumber - A simple type representing a player. */ +/* PlayerNumber - A simple type representing a player. */ #ifndef PlayerNumber_H #define PlayerNumber_H @@ -9,8 +9,7 @@ enum PlayerNumber { PLAYER_1 = 0, - PLAYER_2, - NUM_PlayerNumber, // leave this at the end + NUM_PlayerNumber, // leave this at the end PlayerNumber_Invalid }; const PlayerNumber NUM_PLAYERS = NUM_PlayerNumber; @@ -23,7 +22,7 @@ LuaDeclareType(PlayerNumber); /** @brief A foreach loop to handle the different players. */ #define FOREACH_PlayerNumber(pn) FOREACH_ENUM(PlayerNumber, pn) -const PlayerNumber OPPOSITE_PLAYER[NUM_PLAYERS] = { PLAYER_1 }; +const PlayerNumber OPPOSITE_PLAYER[NUM_PLAYERS] = { PLAYER_1 }; enum MultiPlayer {