Fixed major steps counting bug in server. Removed unneeded commented code.

This commit is contained in:
Josh Allen
2004-09-02 02:47:09 +00:00
parent 514dd10d4a
commit 22f42b117b
3 changed files with 11 additions and 14 deletions
-11
View File
@@ -526,18 +526,7 @@ void NetworkSyncManager::ProcessInput()
for (int i=0;i<PlayersInPack; i++)
for (int j=0;j<NETNUMTAPSCORES;j++) {
m_EvalPlayerData[i].tapScores[j] = m_packet.Read2();
// m_EvalPlayerData[i].tapScores[0] = 0;
// m_EvalPlayerData[i].tapScores[1] = 1;
// m_EvalPlayerData[i].tapScores[2] = 2;
// m_EvalPlayerData[i].tapScores[3] = 3;
// m_EvalPlayerData[i].tapScores[4] = 4;
// m_EvalPlayerData[i].tapScores[5] = 5;
// m_EvalPlayerData[i].tapScores[6] = 6;
// m_EvalPlayerData[i].tapScores[7] = 7;
}
}
break;
case 5: //Scoreboard Update
+9 -1
View File
@@ -2,6 +2,7 @@
*/
#include "NetworkSyncServer.h"
#include "RageLog.h"
LanPlayer::LanPlayer() {
score = 0;
@@ -240,24 +241,31 @@ void StepManiaLanServer::GameOver(PacketFunctions &Packet, int clientNum) {
Reply.ClearPacket();
Reply.Write1( 4+128 );
Reply.Write1(numPlayers);
//I can't get the following area to work with out the {}.
for (int x = 0; x < numPlayers; x++) {
Reply.Write4(playersPtr[x]->score);
// LOG->Info("SCORE: %d", playersPtr[x]->score);
}
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++) {
Reply.Write1(playersPtr[x]->diff);
// LOG->Info("Diff: %d", playersPtr[x]->diff);
}
for (int x = 0; x < numPlayers; x++) {
for (int y = 6; y >= 0; y--) {
for (int y = 6; y >= 1; y--) {
//Dont send NoGoods
//Send in reverse
Reply.Write2(playersPtr[x]->steps[y]);
// LOG->Info("step %d: %d", y, playersPtr[x]->steps[y]);
}
Reply.Write2(playersPtr[x]->steps[8]); //Tack on OK
}
for (int x = 0; x < numPlayers; x++) {
Reply.Write2(playersPtr[x]->maxCombo);
// LOG->Info("MaxCombo: %d", playersPtr[x]->maxCombo);
}
SendNetPacket(clientNum, (char*)Reply.Data, Reply.Position);
}
+2 -2
View File
@@ -25,12 +25,12 @@ class LanPlayer {
int projgrade;
int combo;
int currstep;
int steps[8];
int steps[9];
int maxCombo;
int Grade;
int offset;
int PlayerID;
char diff;
int diff;
LanPlayer();
private:
};