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/gametypes/SpaceRace.cc

    r8822 r8829  
    3030
    3131#include "core/CoreIncludes.h"
    32 #include "network/Host.h"
    33 #include <util/Clock.h>
    34 #include <util/Math.h>
     32#include "chat/ChatManager.h"
     33#include "util/Clock.h"
     34#include "util/Math.h"
    3535#include "util/Convert.h"
    3636
     
    6060                        + " before the time limit. You lose!";
    6161            const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
    62             Host::Broadcast(message);
     62            ChatManager::message(message);
    6363        }
    6464        else
     
    7070                        + "." + multi_cast<std::string>(ms) + " seconds.";
    7171            const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
    72             Host::Broadcast(message);
     72            ChatManager::message(message);
    7373/*
    7474            float time = this->clock_.getSecondsPrecise();
     
    8686
    8787        std::string message("The match has started! Reach the check points as quickly as possible!");
    88         Host::Broadcast(message);
     88        ChatManager::message(message);
    8989    }
    9090
     
    9999                        + " seconds.";
    100100        const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
    101         Host::Broadcast(message);
     101        ChatManager::message(message);
    102102    }
    103103
Note: See TracChangeset for help on using the changeset viewer.