mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57: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;
|
||||
}
|
||||
|
||||
qrec->packetnumber += 1;
|
||||
|
||||
Com_sprintf(keyvalue, sizeof(keyvalue), "\\queryid\\%d.%d", qrec->queryid, qrec->packetnumber);
|
||||
strcat(buffer, keyvalue);
|
||||
|
||||
qrec->packetnumber++;
|
||||
|
||||
sendto((SOCKET)qrec->querysock, buffer, (int)strlen(buffer), 0, addr, sizeof(*addr));
|
||||
*buffer = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue