tinkering around
parent
ed6039d472
commit
c37eb9b139
|
@ -671,7 +671,7 @@ SharedBuffer<u8> Channel::ProcessPacket(
|
|||
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;
|
||||
|
@ -1301,15 +1301,13 @@ nextpeer:
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1355,11 +1353,11 @@ core::list<Peer*> Connection::GetPeers()
|
|||
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;
|
||||
|
|
|
@ -477,7 +477,7 @@ public:
|
|||
|
||||
// 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; }
|
||||
|
|
|
@ -95,7 +95,7 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize)
|
|||
Environment->addButton(rect, this, 257, L"Exit");
|
||||
}
|
||||
{
|
||||
core::rect<s32> rect(0, 0, 180, 220);
|
||||
core::rect<s32> rect(0, 0, 180, 240);
|
||||
rect = rect + v2s32(size.X/2 + 90, size.Y/2-rect.getHeight()/2);
|
||||
const wchar_t *text =
|
||||
L"Keys:\n"
|
||||
|
|
17
src/main.cpp
17
src/main.cpp
|
@ -89,10 +89,6 @@ SUGG: Implement a "Fast check queue" (a queue with a map for checking
|
|||
if something is already in it)
|
||||
- Use it in active block queue in water flowing
|
||||
|
||||
SUGG: Signs could be done in the same way as torches. For this, blocks
|
||||
need an additional metadata field for the texts
|
||||
- This is also needed for item container chests
|
||||
|
||||
SUGG: Precalculate lighting translation table at runtime (at startup)
|
||||
|
||||
SUGG: A version number to blocks, which increments when the block is
|
||||
|
@ -179,6 +175,12 @@ TODO: Check if the usage of Client::isFetchingBlocks() in
|
|||
TODO: Make an option to the server to disable building and digging near
|
||||
the starting position
|
||||
|
||||
SUGG: Signs could be done in the same way as torches. For this, blocks
|
||||
need an additional metadata field for the texts
|
||||
- This is also needed for item container chests
|
||||
TODO: There has to be some better way to handle static objects than to
|
||||
send them all the time. This affects signs and item objects.
|
||||
|
||||
Doing now:
|
||||
======================================================================
|
||||
|
||||
|
@ -2347,7 +2349,7 @@ int main(int argc, char *argv[])
|
|||
while(client.getChatMessage(message))
|
||||
{
|
||||
chat_lines.push_back(ChatLine(message));
|
||||
if(chat_lines.size() > 7)
|
||||
if(chat_lines.size() > 5)
|
||||
{
|
||||
core::list<ChatLine>::Iterator
|
||||
i = chat_lines.begin();
|
||||
|
@ -2385,6 +2387,11 @@ int main(int argc, char *argv[])
|
|||
screensize.Y - 10
|
||||
);
|
||||
chat_guitext->setRelativePosition(rect);
|
||||
|
||||
if(chat_lines.size() == 0)
|
||||
chat_guitext->setVisible(false);
|
||||
else
|
||||
chat_guitext->setVisible(true);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -3133,6 +3133,8 @@ void Server::handlePeerChange(PeerChange &c)
|
|||
message += L"*** ";
|
||||
message += name;
|
||||
message += L" left game";
|
||||
if(c.timeout)
|
||||
message += L" (timed out)";
|
||||
}
|
||||
|
||||
// Delete player
|
||||
|
|
Loading…
Reference in New Issue