Don't limit max players for net evaluation to 32.
This commit is contained in:
@@ -424,16 +424,7 @@ void NetworkSyncManager::StartRequest(short position)
|
||||
m_packet.WriteNT(""); //Write a NULL if no player
|
||||
|
||||
//This needs to be reset before ScreenEvaluation could possibly be called
|
||||
for (int i=0; i<NETMAXPLAYERS; ++i)
|
||||
{
|
||||
m_EvalPlayerData[i].name=0;
|
||||
m_EvalPlayerData[i].grade=0;
|
||||
m_EvalPlayerData[i].score=0;
|
||||
m_EvalPlayerData[i].difficulty=(Difficulty)0;
|
||||
for (int j=0; j<NETNUMTAPSCORES; ++j)
|
||||
m_EvalPlayerData[i].tapScores[j] = 0;
|
||||
m_EvalPlayerData[i].playerOptions = "";
|
||||
}
|
||||
m_EvalPlayerData.clear();
|
||||
|
||||
//Block until go is recieved.
|
||||
//Switch to blocking mode (this is the only
|
||||
@@ -552,6 +543,7 @@ void NetworkSyncManager::ProcessInput()
|
||||
case NSCGON:
|
||||
{
|
||||
int PlayersInPack = m_packet.Read1();
|
||||
m_EvalPlayerData.resize(PlayersInPack);
|
||||
for (int i=0; i<PlayersInPack; ++i)
|
||||
m_EvalPlayerData[i].name = m_packet.Read1();
|
||||
for (int i=0; i<PlayersInPack; ++i)
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
class LoadingWindow;
|
||||
|
||||
#define NETMAXPLAYERS 32
|
||||
const int NETPROTOCOLVERSION=1;
|
||||
const int NETMAXBUFFERSIZE=1020; //1024 - 4 bytes for EzSockets
|
||||
const int NETNUMTAPSCORES=8;
|
||||
@@ -117,7 +116,7 @@ public:
|
||||
vector <CString> m_PlayerNames;
|
||||
|
||||
//Used for ScreenNetEvaluation
|
||||
EndOfGame_PlayerData m_EvalPlayerData[NETMAXPLAYERS];
|
||||
vector<EndOfGame_PlayerData> m_EvalPlayerData;
|
||||
|
||||
//Used togeather for
|
||||
bool ChangedScoreboard(int Column); //If scoreboard changed since this function last called, then true.
|
||||
|
||||
@@ -54,6 +54,8 @@ ScreenNetEvaluation::ScreenNetEvaluation (const CString & sClassName) : ScreenEv
|
||||
m_iActivePlayers = NSMAN->m_ActivePlayers;
|
||||
m_iCurrentPlayer = 0;
|
||||
|
||||
m_textUsers.resize(m_iActivePlayers);
|
||||
|
||||
for( int i=0; i<m_iActivePlayers; ++i )
|
||||
{
|
||||
m_textUsers[i].LoadFromFont( THEME->GetPathF(m_sName,"names") );
|
||||
@@ -104,6 +106,7 @@ void ScreenNetEvaluation::HandleScreenMessage( const ScreenMessage SM )
|
||||
{
|
||||
case SM_GotEval:
|
||||
m_bHasStats = true;
|
||||
m_textUsers.resize(m_iActivePlayers);
|
||||
for( int i=0; i<m_iActivePlayers; ++i )
|
||||
{
|
||||
m_textUsers[i].SetText( NSMAN->m_PlayerNames[NSMAN->m_EvalPlayerData[i].name] );
|
||||
|
||||
@@ -20,7 +20,7 @@ protected:
|
||||
private:
|
||||
Quad m_rectUsersBG;
|
||||
|
||||
BitmapText m_textUsers[NETMAXPLAYERS];
|
||||
vector<BitmapText> m_textUsers;
|
||||
int m_iCurrentPlayer;
|
||||
int m_iActivePlayers;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user