Updated to allow for sending of mine data. Also increment protocol version.
This commit is contained in:
@@ -315,7 +315,7 @@ void NetworkSyncManager::ReportScore(int playerID, int step, int score, int comb
|
|||||||
m_packet.ClearPacket();
|
m_packet.ClearPacket();
|
||||||
|
|
||||||
m_packet.Write1( NSCGSU );
|
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);
|
m_packet.Write1(ctr);
|
||||||
|
|
||||||
ctr = uint8_t( STATSMAN->m_CurStageStats.m_player[playerID].GetGrade()*16 );
|
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;
|
iOffset=1;
|
||||||
|
|
||||||
//Report 0 if hold, or miss (don't forget mines should report)
|
//Report 0 if hold, or miss (don't forget mines should report)
|
||||||
if (((step<TNS_W5)||(step>TNS_W1))&&(step!=TNS_HitMine))
|
if ((step == TNS_Miss) || (step > TNS_W1))
|
||||||
iOffset = 0;
|
iOffset = 0;
|
||||||
|
|
||||||
m_packet.Write2((uint16_t) iOffset);
|
m_packet.Write2((uint16_t) iOffset);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
class LoadingWindow;
|
class LoadingWindow;
|
||||||
|
|
||||||
const int NETPROTOCOLVERSION=2;
|
const int NETPROTOCOLVERSION=3;
|
||||||
const int NETMAXBUFFERSIZE=1020; //1024 - 4 bytes for EzSockets
|
const int NETMAXBUFFERSIZE=1020; //1024 - 4 bytes for EzSockets
|
||||||
const int NETNUMTAPSCORES=8;
|
const int NETNUMTAPSCORES=8;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user