Changeset 1739 for code/branches/network/src/network/Client.cc
- Timestamp:
- Sep 8, 2008, 1:36:32 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/network/Client.cc
r1735 r1739 61 61 isSynched_=false; 62 62 gameStateFailure_=false; 63 isServer_ = false; 63 64 } 64 65 … … 72 73 isSynched_=false; 73 74 gameStateFailure_=false; 75 isServer_ = false; 74 76 } 75 77 … … 83 85 isSynched_=false; 84 86 gameStateFailure_=false; 87 isServer_ = false; 85 88 } 86 89 … … 151 154 if(client_connection.isConnected() && isSynched_){ 152 155 COUT(4) << "popping partial gamestate: " << std::endl; 153 /*packet::Gamestate *gs = gamestate.getGamestate();156 packet::Gamestate *gs = gamestate.getGamestate(); 154 157 if(gs){ 155 158 COUT(4) << "client tick: sending gs " << gs << std::endl; … … 157 160 COUT(3) << "Problem adding partial gamestate to queue" << std::endl; 158 161 // gs gets automatically deleted by enet callback 159 } */162 } 160 163 } 161 164 ENetEvent *event; … … 168 171 } 169 172 int gameStateID = gamestate.processGamestates(); 170 /*if(gameStateID==GAMESTATEID_INITIAL)173 if(gameStateID==GAMESTATEID_INITIAL) 171 174 if(gameStateFailure_){ 172 packet::Acknowledgement ack(GAMESTATEID_INITIAL, 0);173 if(!ack .send())175 packet::Acknowledgement *ack = new packet::Acknowledgement(GAMESTATEID_INITIAL, 0); 176 if(!ack->send()) 174 177 COUT(3) << "could not (negatively) ack gamestate" << std::endl; 175 178 else … … 183 186 isSynched_=true; 184 187 gameStateFailure_=false; 185 packet::Acknowledgement ack(gameStateID, 0);186 if(!ack .send())188 packet::Acknowledgement *ack = new packet::Acknowledgement(gameStateID, 0); 189 if(!ack->send()) 187 190 COUT(3) << "could not ack gamestate" << std::endl; 188 } */// otherwise we had no gamestate to load191 }// otherwise we had no gamestate to load 189 192 gamestate.cleanup(); 190 193 return;
Note: See TracChangeset
for help on using the changeset viewer.