Commit d9de4498 authored by VanillaSalt's avatar VanillaSalt

fix MSG_SWAP

parent 292eb0fe
......@@ -906,11 +906,19 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
break;
}
case MSG_SWAP: {
int c1 = pbuf[4];
int l1 = pbuf[5];
int s1 = pbuf[6];
int c2 = pbuf[12];
int l2 = pbuf[13];
int s2 = pbuf[14];
pbuf += 16;
NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset);
NetServer::ReSendToPlayer(players[1]);
for(auto oit = observers.begin(); oit != observers.end(); ++oit)
NetServer::ReSendToPlayer(*oit);
RefreshSingle(c1, l1, s1);
RefreshSingle(c2, l2, s2);
break;
}
case MSG_FIELD_DISABLED: {
......
......@@ -875,6 +875,12 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
break;
}
case MSG_SWAP: {
int c1 = pbuf[4];
int l1 = pbuf[5];
int s1 = pbuf[6];
int c2 = pbuf[12];
int l2 = pbuf[13];
int s2 = pbuf[14];
pbuf += 16;
NetServer::SendBufferToPlayer(players[0], STOC_GAME_MSG, offset, pbuf - offset);
NetServer::ReSendToPlayer(players[1]);
......@@ -882,6 +888,8 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
NetServer::ReSendToPlayer(players[3]);
for(auto oit = observers.begin(); oit != observers.end(); ++oit)
NetServer::ReSendToPlayer(*oit);
RefreshSingle(c1, l1, s1);
RefreshSingle(c2, l2, s2);
break;
}
case MSG_FIELD_DISABLED: {
......
Subproject commit db298072153b0ff5c0d287172681ca1f9c3a6a04
Subproject commit 982039dd54e2bc70f6cfa4c62b2db52f49df91b7
Subproject commit 36511c63a4cfe7759e7f67e70b32266a46da0d1c
Subproject commit 4b1cad5517e638551d40b84331e33bdaacce909d
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment