Changeset 6412 for code/branches/pickup2/src/libraries/network/Client.cc
- Timestamp:
- Dec 25, 2009, 1:18:03 PM (15 years ago)
- Location:
- code/branches/pickup2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup2
- Property svn:mergeinfo changed
-
code/branches/pickup2/src/libraries/network/Client.cc
r5929 r6412 62 62 Client::Client(): 63 63 isSynched_(false), 64 gameStateFailure_(false) 64 gameStateFailure_(false), 65 timeSinceLastUpdate_(0) 65 66 { 66 67 } … … 73 74 Client::Client(const std::string& address, int port): 74 75 isSynched_(false), 75 gameStateFailure_(false) 76 gameStateFailure_(false), 77 timeSinceLastUpdate_(0) 76 78 { 77 79 setPort( port ); … … 112 114 } 113 115 116 void Client::printRTT(){ 117 COUT(0) << "Round trip time to server is " << ClientConnection::getRTT() << " ms" << endl; 118 } 119 114 120 /** 115 121 * This function implements the method of sending a chat message to the server … … 133 139 { 134 140 timeSinceLastUpdate_ -= static_cast<unsigned int>( timeSinceLastUpdate_ / NETWORK_PERIOD ) * NETWORK_PERIOD; 135 // COUT(3) << ".";141 // COUT(3) << '.'; 136 142 if ( isConnected() && isSynched_ ) 137 143 { … … 149 155 } 150 156 sendPackets(); // flush the enet queue 151 157 152 158 Connection::processQueue(); 153 159 if(gamestate.processGamestates()) … … 157 163 } 158 164 gamestate.cleanup(); 165 Connection::sendPackets(); 159 166 160 167 return; 161 168 } 162 169 163 170 void Client::connectionClosed() 164 171 {
Note: See TracChangeset
for help on using the changeset viewer.