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/Server.h

    r8351 r8829  
    6868    void open();
    6969    void close();
    70     bool processChat(const std::string& message, unsigned int playerID);
    7170    void queuePacket(ENetPacket *packet, int clientID, uint8_t channelID);
    7271    virtual bool sendPacket( packet::Packet* packet ){ return packet->send( static_cast<Host*>(this) ); }
     
    8988    bool sendGameStates();
    9089    bool sendObjectDeletes();
    91     virtual bool chat(const std::string& message);
    92     virtual bool broadcast(const std::string& message);
    93     bool sendChat(const std::string& message, unsigned int clientID);
     90    bool isValidTarget(unsigned int targetID);
     91    virtual void doSendChat(const std::string& message, unsigned int sourceID, unsigned int targetID);
     92    virtual void doReceiveChat(const std::string& message, unsigned int sourceID, unsigned int targetID);
    9493    void syncClassid(unsigned int clientID);
    9594
Note: See TracChangeset for help on using the changeset viewer.