Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8588 in orxonox.OLD for branches/network/src/util


Ignore:
Timestamp:
Jun 19, 2006, 6:46:49 PM (19 years ago)
Author:
rennerc
Message:

implemented chat functionality

Location:
branches/network/src/util
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/util/multiplayer_team_deathmatch.cc

    r8466 r8588  
    548548
    549549
    550 
    551 
    552 
     550/**
     551 * this method is called by NetworkGameManger when he recieved a chat message
     552 * @param userId senders user id
     553 * @param message message string
     554 * @param messageType some int
     555 */
     556void MultiplayerTeamDeathmatch::handleChatMessage( int userId, const std::string & message, int messageType )
     557{
     558  std::string name = "unknown";
     559 
     560  if ( PlayerStats::getStats( userId ) )
     561  {
     562    name = PlayerStats::getStats( userId )->getNickName();
     563  }
     564 
     565  PRINTF(0)("CHATMESSAGE %s: %s\n", name.c_str(), message.c_str() );
     566}
     567
     568
     569
     570
  • branches/network/src/util/multiplayer_team_deathmatch.h

    r8331 r8588  
    5757   
    5858    virtual void process(const Event &event);
     59   
     60    virtual void handleChatMessage( int userId, const std::string & message, int messageType );
    5961
    6062  protected:
  • branches/network/src/util/network_game_rules.h

    r8147 r8588  
    2525   
    2626    virtual PlayerStats * getNewPlayerStats( int userId ){ return new PlayerStats( userId ); }
     27   
     28    virtual void handleChatMessage( int userId, const std::string & message, int messageType ) = 0;
    2729
    2830
Note: See TracChangeset for help on using the changeset viewer.