Changeset 1769 for code/trunk/src/network/Client.cc
- Timestamp:
- Sep 11, 2008, 5:06:24 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/network/Client.cc
r1767 r1769 45 45 #include "core/ConsoleCommand.h" 46 46 #include "packet/Packet.h" 47 #include "packet/Acknowledgement.h"47 // #include "packet/Acknowledgement.h" 48 48 49 49 namespace network … … 166 166 assert(packet->process()); 167 167 } 168 int gameStateID = gamestate.processGamestates(); 169 if(gameStateID==GAMESTATEID_INITIAL) 170 if(gameStateFailure_){ 171 packet::Acknowledgement *ack = new packet::Acknowledgement((unsigned int)GAMESTATEID_INITIAL, 0); 172 if(!ack->send()) 173 COUT(3) << "could not (negatively) ack gamestate" << std::endl; 174 else 175 COUT(4) << "negatively acked a gamestate" << std::endl; 176 } 177 else 178 gameStateFailure_=true; 179 else if(gameStateID!=0){ 180 // ack gamestate and set synched 168 if(gamestate.processGamestates()) 169 { 181 170 if(!isSynched_) 182 171 isSynched_=true; 183 gameStateFailure_=false; 184 packet::Acknowledgement *ack = new packet::Acknowledgement(gameStateID, 0); 185 if(!ack->send()) 186 COUT(3) << "could not ack gamestate" << std::endl; 187 }// otherwise we had no gamestate to load 172 }else 173 COUT(3) << "gamestate has not been processed sucessfully" << std::endl; 188 174 gamestate.cleanup(); 189 175 return;
Note: See TracChangeset
for help on using the changeset viewer.