Example #1
0
void PlayerChat::sendThem(NetworkMessage & message, NetworkLink * but) const
{
    if (PreferencesManager::getInstance()->value("isClient",true).toBool())
        message.sendAll(but);
    else
    {
        NetworkLink * to = m_player->link();
        if (to != but)
            message.sendTo(to);
    }
}
Example #2
0
void PrivateChat::p_sendThem(NetworkMessage & message, NetworkLink * but, bool force) const
{
    if (PreferencesManager::getInstance()->value("isClient",true).toBool())
    {
        if (force || m_set.size() > 1)
            message.sendAll(but);
        return;
    }

    Player * localPlayer = PlayersList::instance()->localPlayer();
    foreach (Player * player, m_set)
    {
        if (player != localPlayer && player != NULL && player->link() != but)
            message.sendTo(player->link());
    }
}
Example #3
0
void PublicChat::sendThem(NetworkMessage & message, NetworkLink * but) const
{
    message.sendAll(but);
}