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

    r8822 r8829  
    4949#include "core/CoreIncludes.h"
    5050#include "core/command/Executor.h"
    51 #include "network/Host.h"
     51#include "chat/ChatManager.h"
    5252#include "infos/PlayerInfo.h"
    5353#include "worldentities/pawns/Pawn.h"
     
    343343        Gametype::playerEntered(player);
    344344        const std::string& message = player->getName() + " entered the game";
    345         Host::Broadcast(message);
     345        ChatManager::message(message);
    346346    }
    347347
     
    358358            }
    359359            const std::string& message = player->getName() + " left the game";
    360             Host::Broadcast(message);
     360            ChatManager::message(message);
    361361            //remove player from map
    362362            playerParty_.erase (player);
     
    615615        {
    616616            const std::string& message = player->getOldName() + " changed name to " + player->getName();
    617             Host::Broadcast(message);
     617            ChatManager::message(message);
    618618        }
    619619
     
    627627        {
    628628            std::string message("Dynamicmatch started!");
    629             Host::Broadcast(message);
     629            ChatManager::message(message);
    630630        }
    631631        else if(tutorial) // Announce selectionphase
     
    643643    {
    644644        std::string message("Earn points:\n\n\n\tIf you're red: Chase the blue player!\n\n\tIf you're blue shoot at a red player or hide.\n\n\tIf you're green: You've got the licence to kill red players!");
    645         Host::Broadcast(message);
     645        ChatManager::message(message);
    646646        callInstructions_.setTimer(10, false, createExecutor(createFunctor(&Dynamicmatch::furtherInstructions, this)));
    647647    }
     
    650650    {
    651651        std::string message("After 3 Minutes the game is over.");
    652         Host::Broadcast(message);
     652        ChatManager::message(message);
    653653    }*/
    654654    void Dynamicmatch::end()
     
    657657
    658658        std::string message("Time out. Press F2 to see the points you scored.");
    659         Host::Broadcast(message);
     659        ChatManager::message(message);
    660660    }
    661661    SpawnPoint* Dynamicmatch::getBestSpawnPoint(PlayerInfo* player) const
Note: See TracChangeset for help on using the changeset viewer.