mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 09:25:37 +02:00
Server: Fix Server::Send exception caused by leaving players
Leaving players will have PEER_ID_INVALID for database saving purposes.
This patch clarifies that, and properly protects the batch send function.
Bug introduced by 5f5ea132
.
This commit is contained in:
@@ -123,7 +123,8 @@ public:
|
||||
|
||||
bool inventory_formspec_overridden = false;
|
||||
|
||||
/// returns PEER_ID_INEXISTENT when PlayerSAO is not ready
|
||||
/// returns PEER_ID_INEXISTENT when PlayerSAO is either
|
||||
/// not yet present or about to be removed (e.g. leave).
|
||||
session_t getPeerId() const { return m_peer_id; }
|
||||
|
||||
void setPeerId(session_t peer_id) { m_peer_id = peer_id; }
|
||||
|
Reference in New Issue
Block a user