mirror of
https://github.com/minetest/minetest.git
synced 2025-07-04 08:50:22 +02:00
Fix ordering issue with new server peers
This commit is contained in:
@ -30,9 +30,10 @@ class PeerHandler
|
||||
{
|
||||
public:
|
||||
PeerHandler() = default;
|
||||
|
||||
virtual ~PeerHandler() = default;
|
||||
|
||||
// Note: all functions are called from within a Receive() call on the same thread.
|
||||
|
||||
/*
|
||||
This is called after the Peer has been inserted into the
|
||||
Connection's peer container.
|
||||
@ -46,22 +47,4 @@ public:
|
||||
virtual void deletingPeer(IPeer *peer, bool timeout) = 0;
|
||||
};
|
||||
|
||||
enum PeerChangeType : u8
|
||||
{
|
||||
PEER_ADDED,
|
||||
PEER_REMOVED
|
||||
};
|
||||
|
||||
struct PeerChange
|
||||
{
|
||||
PeerChange(PeerChangeType t, session_t _peer_id, bool _timeout) :
|
||||
type(t), peer_id(_peer_id), timeout(_timeout)
|
||||
{
|
||||
}
|
||||
PeerChange() = delete;
|
||||
|
||||
PeerChangeType type;
|
||||
session_t peer_id;
|
||||
bool timeout;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user