Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 7, 2011, 3:11:16 PM (13 years ago)
Author:
landauf
Message:

enhanced chat system. chat related code is now separated into network-side code (located in Host, Client, Server) and client-side code (located in ChatManager).
note that there are now two chat related listeners: NetworkChatListener, which is used to send chat from the network to ChatManager, and ChatListener, which is used to send online and offline chat from ChatManager to the actual chat interfaces (ChatOverlay, ChatInputHandler, …).
the "chat" console command now supports a second argument which is the clientID of the receiver. this allows private messages (or gameplay messages directed to only one specific player).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/libraries/network/Client.h

    r7801 r8829  
    7373    Client();
    7474    ~Client();
    75    
     75
    7676    static Client* getInstance(){ return singletonPtr_s; } // tolua_export
    7777
     
    8181    void queuePacket(ENetPacket* packet, int clientID, uint8_t channelID);
    8282    virtual bool sendPacket( packet::Packet* packet ){ return packet->send( static_cast<Host*>(this) ); }
    83     bool processChat(const std::string& message, unsigned int playerID);
    84     virtual bool chat(const std::string& message);
    85     virtual bool broadcast(const std::string& message) { return false; }
     83    virtual void doSendChat(const std::string& message, unsigned int sourceID, unsigned int targetID);
     84    virtual void doReceiveChat(const std::string& message, unsigned int sourceID, unsigned int targetID);
    8685    virtual void printRTT();
    8786
Note: See TracChangeset for help on using the changeset viewer.