diff options
author | SmallJoker <mk939@ymail.com> | 2018-05-12 10:55:43 +0200 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2018-05-12 11:50:04 +0200 |
commit | 9dd432c29f662fc668cc2473a2e057acd8357a91 (patch) | |
tree | ff08425847b9aedb80de5ce62c5d58744c2a0125 /src/server.cpp | |
parent | a292d19fd0726cdd192469fbfc5f85770d5819e3 (diff) | |
download | minetest-9dd432c29f662fc668cc2473a2e057acd8357a91.tar.gz minetest-9dd432c29f662fc668cc2473a2e057acd8357a91.tar.bz2 minetest-9dd432c29f662fc668cc2473a2e057acd8357a91.zip |
Run detach callbacks on player leave
Correct docs regarding non-nil detaching children
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server.cpp b/src/server.cpp index f151d09f0..d47b4ecd0 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -2632,6 +2632,9 @@ void Server::DeleteClient(session_t peer_id, ClientDeletionReason reason) PlayerSAO *playersao = player->getPlayerSAO(); assert(playersao); + playersao->clearChildAttachments(); + playersao->clearParentAttachment(); + // inform connected clients NetworkPacket notice(TOCLIENT_UPDATE_PLAYER_LIST, 0, PEER_ID_INEXISTENT); // (u16) 1 + std::string represents a vector serialization representation |