]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
ReceivedMessage now sets lastMessageTime when a valid message or ack is received...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 24 Jun 2003 15:10:58 +0000 (15:10 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 24 Jun 2003 15:10:58 +0000 (15:10 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3102 d7cf8633-e32d-0410-b094-e92efae38249

netconn.c

index 439aa7ce0d0d02dfe8f2075d17781992c172fd38..5dcc8de14a589a2e12945e1aaab9b16b783fab98 100755 (executable)
--- a/netconn.c
+++ b/netconn.c
@@ -443,6 +443,7 @@ int NetConn_ReceivedMessage(netconn_t *conn, qbyte *data, int length)
                                        Con_DPrintf("Dropped %u datagram(s)\n", count);
                                }
                                conn->unreliableReceiveSequence = sequence + 1;
+                               conn->lastMessageTime = realtime;
                                unreliableMessagesReceived++;
                                SZ_Clear(&net_message);
                                SZ_Write(&net_message, data, length);
@@ -462,6 +463,7 @@ int NetConn_ReceivedMessage(netconn_t *conn, qbyte *data, int length)
                                        conn->ackSequence++;
                                        if (conn->ackSequence != conn->sendSequence)
                                                Con_DPrintf("ack sequencing error\n");
+                                       conn->lastMessageTime = realtime;
                                        conn->sendMessageLength -= MAX_DATAGRAM;
                                        if (conn->sendMessageLength > 0)
                                        {
@@ -490,6 +492,7 @@ int NetConn_ReceivedMessage(netconn_t *conn, qbyte *data, int length)
                        NetConn_Write(conn->mysocket, (qbyte *)temppacket, 8, &conn->peeraddress);
                        if (sequence == conn->receiveSequence)
                        {
+                               conn->lastMessageTime = realtime;
                                conn->receiveSequence++;
                                memcpy(conn->receiveMessage + conn->receiveMessageLength, data, length);
                                conn->receiveMessageLength += length;