Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 5, 2007, 10:06:29 PM (16 years ago)
Author:
scheusso
Message:

some minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/network/Client.cc

    r415 r425  
    6868  bool Client::sendMouse(double x, double y){
    6969    // generate packet and add it to the queue
     70    if(!isConnected)
     71      return false;
    7072    if(!client_connection.addPacket(pck_gen.mousem(x, y)))
    7173        return false;
     
    8183  bool Client::sendKeyboard(char key_code){
    8284    // generate packet and add it to queue
     85    if(!isConnected)
     86      return false;
    8387    if(!client_connection.addPacket(pck_gen.keystrike(key_code)))
    8488        return false;
     
    118122   */
    119123  bool Client::sendPackets(){
     124    if(!isConnected)
     125      return false;
    120126    ENetEvent event;
    121127    // send packets
     
    142148  void Client::processGamestate( GameStateCompressed *data){
    143149    gamestate.pushGameState(*data);
     150    client_connection.addPacket(pck_gen.acknowledgement(data->id));
     151    client_connection.sendPackets();
    144152    return;
    145153  }
     
    153161  }
    154162 
     163  void Client::processChat( chat *data){
     164    std::cout << "Server: " << data->message << std::endl;
     165  }
     166 
    155167}
Note: See TracChangeset for help on using the changeset viewer.