con->PrintInfo();
dout_con<<"DISCO: Removing peer "<<(peer_id)<<std::endl;
- if(con->deletePeer(peer_id) == false)
+ if(con->deletePeer(peer_id, false) == false)
{
con->PrintInfo(derr_con);
derr_con<<"DISCO: Peer not found"<<std::endl;
continue;
}
- // Remove timeouted peers
+ // Remove timed out peers
core::list<u16>::Iterator i = timeouted_peers.begin();
for(; i != timeouted_peers.end(); i++)
{
PrintInfo(derr_con);
derr_con<<"RunTimeouts(): Removing peer "<<(*i)<<std::endl;
- m_peerhandler->deletingPeer(m_peers[*i], true);
- delete m_peers[*i];
- m_peers.remove(*i);
+ deletePeer(*i, true);
}
}
return list;
}
-bool Connection::deletePeer(u16 peer_id)
+bool Connection::deletePeer(u16 peer_id, bool timeout)
{
if(m_peers.find(peer_id) == NULL)
return false;
- m_peerhandler->deletingPeer(m_peers[peer_id], true);
+ m_peerhandler->deletingPeer(m_peers[peer_id], timeout);
delete m_peers[peer_id];
m_peers.remove(peer_id);
return true;
// Calls PeerHandler::deletingPeer
// Returns false if peer was not found
- bool deletePeer(u16 peer_id);
+ bool deletePeer(u16 peer_id, bool timeout);
void SetPeerID(u16 id){ m_peer_id = id; }
u16 GetPeerID(){ return m_peer_id; }
Environment->addButton(rect, this, 257, L"Exit");\r
}\r
{\r
- core::rect<s32> rect(0, 0, 180, 220);\r
+ core::rect<s32> rect(0, 0, 180, 240);\r
rect = rect + v2s32(size.X/2 + 90, size.Y/2-rect.getHeight()/2);\r
const wchar_t *text =\r
L"Keys:\n"\r
if something is already in it)\r
- Use it in active block queue in water flowing\r
\r
-SUGG: Signs could be done in the same way as torches. For this, blocks\r
- need an additional metadata field for the texts\r
- - This is also needed for item container chests\r
-\r
SUGG: Precalculate lighting translation table at runtime (at startup)\r
\r
SUGG: A version number to blocks, which increments when the block is\r
TODO: Make an option to the server to disable building and digging near\r
the starting position\r
\r
+SUGG: Signs could be done in the same way as torches. For this, blocks\r
+ need an additional metadata field for the texts\r
+ - This is also needed for item container chests\r
+TODO: There has to be some better way to handle static objects than to\r
+ send them all the time. This affects signs and item objects.\r
+\r
Doing now:\r
======================================================================\r
\r
while(client.getChatMessage(message))\r
{\r
chat_lines.push_back(ChatLine(message));\r
- if(chat_lines.size() > 7)\r
+ if(chat_lines.size() > 5)\r
{\r
core::list<ChatLine>::Iterator\r
i = chat_lines.begin();\r
screensize.Y - 10\r
);\r
chat_guitext->setRelativePosition(rect);\r
+\r
+ if(chat_lines.size() == 0)\r
+ chat_guitext->setVisible(false);\r
+ else\r
+ chat_guitext->setVisible(true);\r
}\r
\r
/*\r
message += L"*** ";
message += name;
message += L" left game";
+ if(c.timeout)
+ message += L" (timed out)";
}
// Delete player