Fixed major steps counting bug in server. Removed unneeded commented code.
This commit is contained in:
@@ -526,18 +526,7 @@ void NetworkSyncManager::ProcessInput()
|
|||||||
for (int i=0;i<PlayersInPack; i++)
|
for (int i=0;i<PlayersInPack; i++)
|
||||||
for (int j=0;j<NETNUMTAPSCORES;j++) {
|
for (int j=0;j<NETNUMTAPSCORES;j++) {
|
||||||
m_EvalPlayerData[i].tapScores[j] = m_packet.Read2();
|
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;
|
break;
|
||||||
case 5: //Scoreboard Update
|
case 5: //Scoreboard Update
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "NetworkSyncServer.h"
|
#include "NetworkSyncServer.h"
|
||||||
|
#include "RageLog.h"
|
||||||
|
|
||||||
LanPlayer::LanPlayer() {
|
LanPlayer::LanPlayer() {
|
||||||
score = 0;
|
score = 0;
|
||||||
@@ -240,24 +241,31 @@ void StepManiaLanServer::GameOver(PacketFunctions &Packet, int clientNum) {
|
|||||||
Reply.ClearPacket();
|
Reply.ClearPacket();
|
||||||
Reply.Write1( 4+128 );
|
Reply.Write1( 4+128 );
|
||||||
Reply.Write1(numPlayers);
|
Reply.Write1(numPlayers);
|
||||||
|
//I can't get the following area to work with out the {}.
|
||||||
for (int x = 0; x < numPlayers; x++) {
|
for (int x = 0; x < numPlayers; x++) {
|
||||||
Reply.Write4(playersPtr[x]->score);
|
Reply.Write4(playersPtr[x]->score);
|
||||||
|
// 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);
|
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);
|
Reply.Write1(playersPtr[x]->diff);
|
||||||
|
// LOG->Info("Diff: %d", playersPtr[x]->diff);
|
||||||
}
|
}
|
||||||
for (int x = 0; x < numPlayers; x++) {
|
for (int x = 0; x < numPlayers; x++) {
|
||||||
for (int y = 6; y >= 0; y--) {
|
for (int y = 6; y >= 1; y--) {
|
||||||
//Dont send NoGoods
|
//Dont send NoGoods
|
||||||
//Send in reverse
|
//Send in reverse
|
||||||
Reply.Write2(playersPtr[x]->steps[y]);
|
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++) {
|
for (int x = 0; x < numPlayers; x++) {
|
||||||
Reply.Write2(playersPtr[x]->maxCombo);
|
Reply.Write2(playersPtr[x]->maxCombo);
|
||||||
|
// LOG->Info("MaxCombo: %d", playersPtr[x]->maxCombo);
|
||||||
}
|
}
|
||||||
SendNetPacket(clientNum, (char*)Reply.Data, Reply.Position);
|
SendNetPacket(clientNum, (char*)Reply.Data, Reply.Position);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ class LanPlayer {
|
|||||||
int projgrade;
|
int projgrade;
|
||||||
int combo;
|
int combo;
|
||||||
int currstep;
|
int currstep;
|
||||||
int steps[8];
|
int steps[9];
|
||||||
int maxCombo;
|
int maxCombo;
|
||||||
int Grade;
|
int Grade;
|
||||||
int offset;
|
int offset;
|
||||||
int PlayerID;
|
int PlayerID;
|
||||||
char diff;
|
int diff;
|
||||||
LanPlayer();
|
LanPlayer();
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user