From de3be4c4836d77ba60c07c93c10bb66b61542916 Mon Sep 17 00:00:00 2001 From: Josh Allen Date: Thu, 6 Jul 2006 17:55:44 +0000 Subject: [PATCH] Updated to allow for sending of mine data. Also increment protocol version. --- stepmania/src/NetworkSyncManager.cpp | 4 ++-- stepmania/src/NetworkSyncManager.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stepmania/src/NetworkSyncManager.cpp b/stepmania/src/NetworkSyncManager.cpp index 58d70f7431..32387a4047 100644 --- a/stepmania/src/NetworkSyncManager.cpp +++ b/stepmania/src/NetworkSyncManager.cpp @@ -315,7 +315,7 @@ void NetworkSyncManager::ReportScore(int playerID, int step, int score, int comb m_packet.ClearPacket(); m_packet.Write1( NSCGSU ); - uint8_t ctr = (uint8_t) (playerID * 16 + step - ( TNS_Miss - 1 ) ); + uint8_t ctr = (uint8_t) (playerID * 16 + step - ( TNS_HitMine - 1 ) ); m_packet.Write1(ctr); ctr = uint8_t( STATSMAN->m_CurStageStats.m_player[playerID].GetGrade()*16 ); @@ -344,7 +344,7 @@ void NetworkSyncManager::ReportScore(int playerID, int step, int score, int comb iOffset=1; //Report 0 if hold, or miss (don't forget mines should report) - if (((stepTNS_W1))&&(step!=TNS_HitMine)) + if ((step == TNS_Miss) || (step > TNS_W1)) iOffset = 0; m_packet.Write2((uint16_t) iOffset); diff --git a/stepmania/src/NetworkSyncManager.h b/stepmania/src/NetworkSyncManager.h index 8ea2a08adf..e89f1fd912 100644 --- a/stepmania/src/NetworkSyncManager.h +++ b/stepmania/src/NetworkSyncManager.h @@ -9,7 +9,7 @@ class LoadingWindow; -const int NETPROTOCOLVERSION=2; +const int NETPROTOCOLVERSION=3; const int NETMAXBUFFERSIZE=1020; //1024 - 4 bytes for EzSockets const int NETNUMTAPSCORES=8;