Changeset 1483
- Timestamp:
- May 29, 2008, 12:37:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/network/Server.cc
r1433 r1483 159 159 gamestates->processGameStates(); 160 160 updateGamestate(); 161 // usleep(500000); // TODO remove161 usleep(5000); // TODO remove 162 162 return; 163 163 } … … 236 236 if(gs==NULL){ 237 237 COUT(2) << "Server: could not generate gamestate (NULL from compress)" << std::endl; 238 return false;238 continue; 239 239 } 240 240 //std::cout << "adding gamestate" << std::endl; 241 if ( !(connection->addPacket(packet_gen.gstate(gs), cid)) ){ 241 ENetPacket *packet = packet_gen.gstate(gs); 242 if(!packet) 243 continue; 244 if ( !(connection->addPacket(packet, cid)) ){ 242 245 COUT(3) << "Server: packet with client id (cid): " << cid << " not sended: " << temp->getFailures() << std::endl; 243 246 temp->addFailure(); 244 if(temp->getFailures() > 20 )245 disconnectClient(temp); 247 /*if(temp->getFailures() > 0 ) 248 disconnectClient(temp);*/ 246 249 //std::cout << "added gamestate" << std::endl; 247 250 }else
Note: See TracChangeset
for help on using the changeset viewer.