Skip to content
Snippets Groups Projects
Commit ec509fac authored by Perttu Ahola's avatar Perttu Ahola
Browse files

removed Client::isFetchingBlocks

parent d38ac3aa
No related branches found
No related tags found
No related merge requests found
......@@ -1232,25 +1232,6 @@ void Client::Send(u16 channelnum, SharedBuffer<u8> data, bool reliable)
m_con.Send(PEER_ID_SERVER, channelnum, data, reliable);
}
bool Client::isFetchingBlocks()
{
JMutexAutoLock conlock(m_con_mutex);
con::Peer *peer = m_con.GetPeerNoEx(PEER_ID_SERVER);
// Not really fetching but can't fetch more.
if(peer == NULL) return true;
con::Channel *channel = &(peer->channels[1]);
/*
NOTE: Channel 0 should always be used for fetching blocks,
and for nothing else.
*/
if(channel->incoming_reliables.size() > 0)
return true;
if(channel->outgoing_reliables.size() > 0)
return true;
return false;
}
IncomingPacket Client::getPacket()
{
JMutexAutoLock lock(m_incoming_queue_mutex);
......
......@@ -145,9 +145,6 @@ class Client : public con::PeerHandler
bool AsyncProcessData();
void Send(u16 channelnum, SharedBuffer<u8> data, bool reliable);
//TODO: Remove
bool isFetchingBlocks();
// Pops out a packet from the packet queue
IncomingPacket getPacket();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment