Don't limit max players for net evaluation to 32.

This commit is contained in:
Josh Allen
2004-12-08 05:35:03 +00:00
parent 268dafa582
commit 0292eb99c1
4 changed files with 7 additions and 13 deletions
+2 -10
View File
@@ -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)
+1 -2
View File
@@ -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.
+3
View File
@@ -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] );
+1 -1
View File
@@ -20,7 +20,7 @@ protected:
private:
Quad m_rectUsersBG;
BitmapText m_textUsers[NETMAXPLAYERS];
vector<BitmapText> m_textUsers;
int m_iCurrentPlayer;
int m_iActivePlayers;