Changeset 425 for code/branches/FICN/src/network/Client.cc
- Timestamp:
- Dec 5, 2007, 10:06:29 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/network/Client.cc
r415 r425 68 68 bool Client::sendMouse(double x, double y){ 69 69 // generate packet and add it to the queue 70 if(!isConnected) 71 return false; 70 72 if(!client_connection.addPacket(pck_gen.mousem(x, y))) 71 73 return false; … … 81 83 bool Client::sendKeyboard(char key_code){ 82 84 // generate packet and add it to queue 85 if(!isConnected) 86 return false; 83 87 if(!client_connection.addPacket(pck_gen.keystrike(key_code))) 84 88 return false; … … 118 122 */ 119 123 bool Client::sendPackets(){ 124 if(!isConnected) 125 return false; 120 126 ENetEvent event; 121 127 // send packets … … 142 148 void Client::processGamestate( GameStateCompressed *data){ 143 149 gamestate.pushGameState(*data); 150 client_connection.addPacket(pck_gen.acknowledgement(data->id)); 151 client_connection.sendPackets(); 144 152 return; 145 153 } … … 153 161 } 154 162 163 void Client::processChat( chat *data){ 164 std::cout << "Server: " << data->message << std::endl; 165 } 166 155 167 }
Note: See TracChangeset
for help on using the changeset viewer.