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/modules/overlays/hud/ChatOverlay.cc

    r8826 r8829  
    6767    }
    6868
    69     void ChatOverlay::incomingChat(const std::string& message, unsigned int senderID)
     69    void ChatOverlay::incomingChat(const std::string& message, const std::string& /*name*/)
    7070    {
    71         std::string text = message;
    72 
    73         if (senderID != NETWORK_PEER_ID_UNKNOWN)
    74         {
    75             PlayerInfo* player = PlayerManager::getInstance().getClient(senderID);
    76             if (player)
    77                 text = player->getName() + ": " + message;
    78         }
    79 
    80         this->messages_.push_back(multi_cast<Ogre::DisplayString>(text));
     71        this->messages_.push_back(multi_cast<Ogre::DisplayString>(message));
    8172
    8273        Timer* timer = new Timer();
Note: See TracChangeset for help on using the changeset viewer.