summaryrefslogtreecommitdiff
path: root/src/content_sao.h
diff options
context:
space:
mode:
authorNer'zhul <nerzhul@users.noreply.github.com>2016-11-05 10:25:30 +0100
committerGitHub <noreply@github.com>2016-11-05 10:25:30 +0100
commit66bb2954362748c4722d366d0df490ad51a591a2 (patch)
treeafccdbd313686ab10e98c62729745e8252089bd6 /src/content_sao.h
parentb5c84c34ce283a56317902d24067d9a0795a44c5 (diff)
downloadminetest-66bb2954362748c4722d366d0df490ad51a591a2.tar.gz
minetest-66bb2954362748c4722d366d0df490ad51a591a2.tar.bz2
minetest-66bb2954362748c4722d366d0df490ad51a591a2.zip
PlayerSAO saving fix (#4734)
PlayerSAO::disconnected() function was historical and remove the link between SAO and RemotePlayer session. With previous attributes linked to RemotePlayer saving was working. But now attributes are read from SAO not RemotePlayer and the current serialize function verify SAO exists to save the player attributes. Because PlayerSAO::disconnected marks playersao for removal, only mark playerSAO for removal and let PlayerSAO::removingFromEnvironment do the correct saving behaviour and all the disconnection process instead of doing a partial removal and let the server loop doing the RemotePlayer cleanup and remove some saved attributes...
Diffstat (limited to 'src/content_sao.h')
-rw-r--r--src/content_sao.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/content_sao.h b/src/content_sao.h
index 5d837a466..f58c7dadb 100644
--- a/src/content_sao.h
+++ b/src/content_sao.h
@@ -318,6 +318,7 @@ public:
private:
std::string getPropertyPacket();
+ void unlinkPlayerSessionAndSave();
RemotePlayer *m_player;
u16 m_peer_id;