Changeset 5755e68 in network-game for common/MessageProcessor.cpp


Ignore:
Timestamp:
Jul 16, 2013, 12:53:06 AM (11 years ago)
Author:
dportnoy <dmp1488@…>
Branches:
master
Children:
6b641af
Parents:
4fcf7a4
Message:

MessageProcessor bug fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/MessageProcessor.cpp

    r4fcf7a4 r5755e68  
    3838   if (msg->type == MSG_TYPE_ACK) {
    3939      if (!sentMessages[msg->id].isAcked) {
     40         cout << "Received new ack" << endl;
    4041         sentMessages[msg->id].isAcked = true;
    4142         sentMessages[msg->id].timeAcked = getCurrentMillis();
    42       }
     43      }else
     44         cout << "Received old ack" << endl;
    4345
    4446      return -1; // don't do any further processing
     
    5355      NETWORK_MSG ack;
    5456      ack.id = msg->id;
     57      ack.type = MSG_TYPE_ACK;
    5558
    56       //sendto(sock, (char*)&ack, sizeof(NETWORK_MSG), 0, (struct sockaddr *)source, sizeof(struct sockaddr_in));
     59      sendto(sock, (char*)&ack, sizeof(NETWORK_MSG), 0, (struct sockaddr *)source, sizeof(struct sockaddr_in));
    5760   }
    5861
Note: See TracChangeset for help on using the changeset viewer.