From b97a0ad172b4663e3fbd6f4aa8e5645766ac5cb6 Mon Sep 17 00:00:00 2001 From: Charles Lohr Date: Thu, 2 Sep 2004 04:54:54 +0000 Subject: [PATCH] Cleanup and change around... maybe this will work better? --- stepmania/src/NetworkSyncManager.cpp | 7 ++--- stepmania/src/NetworkSyncServer.cpp | 45 ++++++++++------------------ 2 files changed, 18 insertions(+), 34 deletions(-) diff --git a/stepmania/src/NetworkSyncManager.cpp b/stepmania/src/NetworkSyncManager.cpp index 7667556ed3..4ce7d8f865 100644 --- a/stepmania/src/NetworkSyncManager.cpp +++ b/stepmania/src/NetworkSyncManager.cpp @@ -517,16 +517,13 @@ void NetworkSyncManager::ProcessInput() int PlayersInPack = m_packet.Read1(); for (int i=0;iInfo("P%d Score:%d",i,m_EvalPlayerData[i].score); for (int i=0;iscore); -// LOG->Info("SCORE: %d", playersPtr[x]->score); - } - for (int x = 0; x < numPlayers; x++) { + for (int x = 0; x < numPlayers; x++) Reply.Write1(playersPtr[x]->projgrade); -// LOG->Info("Grade: %d", playersPtr[x]->projgrade); - } - for (int x = 0; x < numPlayers; x++) { + for (int x = 0; x < numPlayers; x++) Reply.Write1(playersPtr[x]->diff); -// LOG->Info("Diff: %d", playersPtr[x]->diff); - } - for (int x = 0; x < numPlayers; x++) { - for (int y = 6; y >= 1; y--) { - //Dont send NoGoods - //Send in reverse + for (int y = 6; y >= 1; y--) + for (int x = 0; xsteps[y]); -// LOG->Info("step %d: %d", y, playersPtr[x]->steps[y]); - } + for (int x = 0; x < numPlayers; x++) Reply.Write2(playersPtr[x]->steps[8]); //Tack on OK - } - for (int x = 0; x < numPlayers; x++) { + for (int x = 0; x < numPlayers; x++) Reply.Write2(playersPtr[x]->maxCombo); -// LOG->Info("MaxCombo: %d", playersPtr[x]->maxCombo); - } SendToAllClients(Reply); } } @@ -532,7 +519,7 @@ void StepManiaLanServer::SelectSong(PacketFunctions &Packet, int clientNum) { Client[clientNum].hasSong = true; //Only play if everyone has the same song and the host has select the same song twice. - if (CheckHasSongState()&&SecondSameSelect) { + if ( CheckHasSongState() && SecondSameSelect && (clientNum == 0) ) { Reply.ClearPacket(); Reply.Write1(136); Reply.Write1(2);