Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 19, 2008, 9:50:36 PM (16 years ago)
Author:
landauf
Message:

added chat overlay

File:
1 edited

Legend:

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

    r1917 r1953  
    4646#include "core/CoreIncludes.h"
    4747#include "packet/Packet.h"
     48
    4849// #include "packet/Acknowledgement.h"
    4950
     
    6970  * @param port port of the application on the server
    7071  */
    71   Client::Client(std::string address, int port) : client_connection(port, address){
     72  Client::Client(const std::string& address, int port) : client_connection(port, address){
    7273    isConnected=false;
    7374    isSynched_=false;
     
    116117  }
    117118
    118   bool Client::processChat(std::string message, unsigned int playerID){
    119     COUT(1) << "Player " << playerID << ": " << message << std::endl;
     119  bool Client::processChat(const std::string& message, unsigned int playerID){
     120//    COUT(1) << "Player " << playerID << ": " << message << std::endl;
    120121    return true;
    121122  }
    122  
     123
    123124  /**
    124125   * This function implements the method of sending a chat message to the server
    125    * @param message message to be sent 
     126   * @param message message to be sent
    126127   * @return result(true/false)
    127128   */
    128   bool Client::chat(std::string message){
     129  bool Client::chat(const std::string& message){
    129130    packet::Chat *m = new packet::Chat(message, Host::getPlayerID());
    130131    return m->send();
     
    134135  /**
    135136   * Processes incoming packets, sends a gamestate to the server and does the cleanup
    136    * @param time 
     137   * @param time
    137138   */
    138139  void Client::tick(float time){
Note: See TracChangeset for help on using the changeset viewer.