Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 22, 2008, 2:02:06 PM (16 years ago)
Author:
rgrieder
Message:

merged merge branch back to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/network/Client.cc

    r1293 r1360  
    120120    isConnected=client_connection.createConnection();
    121121    if(isConnected){
    122       COUT(4) << "sending connectrequest" << std::endl;
    123       client_connection.addPacket(pck_gen.generateConnectRequest());
    124       client_connection.sendPackets();
     122      COUT(3) << "sending connectrequest" << std::endl;
     123      if(!client_connection.addPacket(pck_gen.generateConnectRequest()) || !client_connection.sendPackets())
     124        COUT(1) << "could not create connection" << std::endl;
    125125    }else
    126126      COUT(1) << "could not create connection" << std::endl;
     
    229229  */
    230230  void Client::tick(float time){
     231//     COUT(3) << ".";
    231232    if(client_connection.isConnected() && isSynched_){
    232233      COUT(4) << "popping partial gamestate: " << std::endl;
     
    260261      if(!isSynched_)
    261262        isSynched_=true;
    262       client_connection.addPacket(pck_gen.acknowledgement(id));
     263      if(!client_connection.addPacket(pck_gen.acknowledgement(id)))
     264        return;
    263265        // we do this at the end of a tick
    264        if(!client_connection.sendPackets())
    265          COUT(2) << "Could not send acknowledgment" << std::endl;
     266      if(!client_connection.sendPackets())
     267        COUT(2) << "Could not send acknowledgment" << std::endl;
    266268    }
    267269  }
Note: See TracChangeset for help on using the changeset viewer.