Changeset 1360 for code/trunk/src/network/Client.cc
- Timestamp:
- May 22, 2008, 2:02:06 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/network/Client.cc
r1293 r1360 120 120 isConnected=client_connection.createConnection(); 121 121 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; 125 125 }else 126 126 COUT(1) << "could not create connection" << std::endl; … … 229 229 */ 230 230 void Client::tick(float time){ 231 // COUT(3) << "."; 231 232 if(client_connection.isConnected() && isSynched_){ 232 233 COUT(4) << "popping partial gamestate: " << std::endl; … … 260 261 if(!isSynched_) 261 262 isSynched_=true; 262 client_connection.addPacket(pck_gen.acknowledgement(id)); 263 if(!client_connection.addPacket(pck_gen.acknowledgement(id))) 264 return; 263 265 // we do this at the end of a tick 264 265 266 if(!client_connection.sendPackets()) 267 COUT(2) << "Could not send acknowledgment" << std::endl; 266 268 } 267 269 }
Note: See TracChangeset
for help on using the changeset viewer.