Removed ProtocolManager::sendMessageExcept() function.

This commit is contained in:
hiker
2016-03-01 16:50:45 +11:00
parent 052e369df2
commit c77522c07f
4 changed files with 3 additions and 14 deletions

View File

@@ -175,14 +175,6 @@ void ProtocolManager::propagateEvent(Event* event)
m_events_to_process.unlock();
} // propagateEvent
// ----------------------------------------------------------------------------
void ProtocolManager::sendMessageExcept(STKPeer *peer,
NetworkString *message,
bool reliable)
{
STKHost::get()->sendPacketExcept(peer, message, reliable);
} // sendMessageExcept
// ----------------------------------------------------------------------------
/** \brief Asks the manager to start a protocol.
* This function will store the request, and process it at a time it is

View File

@@ -162,9 +162,6 @@ private:
public:
virtual void abort();
virtual void propagateEvent(Event* event);
virtual void sendMessageExcept(STKPeer* peer,
NetworkString *message,
bool reliable = true);
virtual uint32_t requestStart(Protocol* protocol);
virtual void requestPause(Protocol* protocol);
virtual void requestUnpause(Protocol* protocol);

View File

@@ -106,8 +106,8 @@ bool ControllerEventsProtocol::notifyEventAsynchronous(Event* event)
if (NetworkConfig::get()->isServer())
{
// Send update to all clients except the original sender.
ProtocolManager::getInstance()->sendMessageExcept(event->getPeer(),
&pure_message, false);
STKHost::get()->sendPacketExcept(event->getPeer(),
&pure_message, false);
} // if server
return true;
} // notifyEventAsynchronous

View File

@@ -465,7 +465,7 @@ void ServerLobbyRoomProtocol::connectionRequested(Event* event)
// size of id -- id -- size of local id -- local id;
message->addUInt8(LE_NEW_PLAYER_CONNECTED).addUInt8(new_player_id)
.addUInt8(new_host_id).encodeString(name_u8);
ProtocolManager::getInstance()->sendMessageExcept(peer, message);
STKHost::get()->sendPacketExcept(peer, message);
delete message;
// Now answer to the peer that just connected