fix problem where client held on to its first message forever, sending

it each time resendAll was called on connect etc.
This commit is contained in:
Eric House 2010-06-04 22:23:46 -07:00
parent ca968d8294
commit c7a0271830

View file

@ -961,16 +961,16 @@ removeFromQueue( CommsCtxt* comms, XP_PlayerAddr channelNo, MsgID msgID )
XP_Bool knownGood = XP_FALSE;
next = elem->next;
/* remove the 0-channel message if we've established a channel
number. Only clients should have any 0-channel messages in the
queue, and receiving something from the server is an implicit
ACK -- IFF it isn't left over from the last game. */
if ( (elem->channelNo == 0) && (channelNo != 0) ) {
XP_ASSERT( !comms->isServer );
XP_ASSERT( elem->msgID == 0 );
} else if ( elem->channelNo != channelNo ) {
knownGood = XP_TRUE;
/* If I'm the server and there's more than one guest I have
multiple channels to worry about. Not so for the guest. So
while the guest's messages are labeled with two versions of the
channelNo, the 0th message having the two low bits clear and
all subsequent messages having at least one set, that's not an
issue here: the client needn't test channelNo. */
if ( comms->isServer ) {
knownGood = elem->channelNo != channelNo;
} else {
knownGood = XP_FALSE;
}
if ( !knownGood && (elem->msgID <= msgID) ) {