Changeset 1431 for code/branches/network/src/network/Client.cc
- Timestamp:
- May 26, 2008, 9:21:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/network/Client.cc
r1425 r1431 85 85 isConnected=false; 86 86 isSynched_=false; 87 gameStateFailure_=false; 87 88 } 88 89 … … 95 96 isConnected=false; 96 97 isSynched_=false; 98 gameStateFailure_=false; 97 99 } 98 100 … … 105 107 isConnected=false; 106 108 isSynched_=false; 109 gameStateFailure_=false; 107 110 } 108 111 … … 247 250 } 248 251 int gameStateID = gamestate.processGameState(); 249 if(gameStateID!=GAMESTATEID_INITIAL){ 252 if(gameStateID==GAMESTATEID_INITIAL) 253 if(gameStateFailure_){ 254 if(!client_connection.addPacket(pck_gen.acknowledgement(GAMESTATEID_INITIAL))) 255 COUT(3) << "could not (negatively) ack gamestate" << std::endl; 256 else 257 COUT(4) << "negatively acked a gamestate" << std::endl; 258 } 259 else 260 gameStateFailure_=true; 261 else if(gameStateID!=0){ 250 262 // ack gamestate and set synched 251 263 if(!isSynched_) 252 264 isSynched_=true; 265 gameStateFailure_=false; 253 266 if(!client_connection.addPacket(pck_gen.acknowledgement(gameStateID))) 254 267 COUT(3) << "could not ack gamestate" << std::endl; 255 } 268 }// otherwise we had no gamestate to load 256 269 gamestate.cleanup(); 257 270 if(!client_connection.sendPackets())
Note: See TracChangeset
for help on using the changeset viewer.