mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-29 06:07:57 +03:00
Properly increment the packet number before sending the gamespy reply
Some programs parse the packet number and stop working properly if the packet number is an incorrect value
This commit is contained in:
parent
c10fd17d19
commit
9427137dbd
2 changed files with 3 additions and 3 deletions
|
@ -192,11 +192,11 @@ static void packet_send(qr_t qrec, struct sockaddr *addr, char *buffer)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qrec->packetnumber += 1;
|
||||||
|
|
||||||
Com_sprintf(keyvalue, sizeof(keyvalue), "\\queryid\\%d.%d", qrec->queryid, qrec->packetnumber);
|
Com_sprintf(keyvalue, sizeof(keyvalue), "\\queryid\\%d.%d", qrec->queryid, qrec->packetnumber);
|
||||||
strcat(buffer, keyvalue);
|
strcat(buffer, keyvalue);
|
||||||
|
|
||||||
qrec->packetnumber++;
|
|
||||||
|
|
||||||
sendto((SOCKET)qrec->querysock, buffer, (int)strlen(buffer), 0, addr, sizeof(*addr));
|
sendto((SOCKET)qrec->querysock, buffer, (int)strlen(buffer), 0, addr, sizeof(*addr));
|
||||||
*buffer = 0;
|
*buffer = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
// These values are the only one that must be set for the version
|
// These values are the only one that must be set for the version
|
||||||
#define PRODUCT_VERSION_MAJOR 0
|
#define PRODUCT_VERSION_MAJOR 0
|
||||||
#define PRODUCT_VERSION_MINOR 81
|
#define PRODUCT_VERSION_MINOR 81
|
||||||
#define PRODUCT_VERSION_PATCH 1
|
#define PRODUCT_VERSION_PATCH 2
|
||||||
#define PRODUCT_VERSION_SUFFIX PRODUCT_VERSION_STAGE
|
#define PRODUCT_VERSION_SUFFIX PRODUCT_VERSION_STAGE
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue