summaryrefslogtreecommitdiffstats
path: root/source/cPlayer.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-29 09:40:15 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-29 09:40:15 +0100
commit94132159be14774d56392136c10b908cb89cd33d (patch)
treebf80b16a3f33a2a795474700d1931b346c975314 /source/cPlayer.cpp
parentImproved threading performance by reducing thread-hopping in queue locks (cs unlocked before event set) (diff)
downloadcuberite-94132159be14774d56392136c10b908cb89cd33d.tar
cuberite-94132159be14774d56392136c10b908cb89cd33d.tar.gz
cuberite-94132159be14774d56392136c10b908cb89cd33d.tar.bz2
cuberite-94132159be14774d56392136c10b908cb89cd33d.tar.lz
cuberite-94132159be14774d56392136c10b908cb89cd33d.tar.xz
cuberite-94132159be14774d56392136c10b908cb89cd33d.tar.zst
cuberite-94132159be14774d56392136c10b908cb89cd33d.zip
Diffstat (limited to 'source/cPlayer.cpp')
-rw-r--r--source/cPlayer.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/cPlayer.cpp b/source/cPlayer.cpp
index 7899fdc97..c71f04d33 100644
--- a/source/cPlayer.cpp
+++ b/source/cPlayer.cpp
@@ -124,7 +124,12 @@ void cPlayer::Initialize( cWorld* a_World )
cPlayer::~cPlayer(void)
{
+ LOG("Deleting cPlayer \"%s\" @ %p", m_pState->PlayerName.c_str(), this);
+
SaveToDisk();
+
+ m_World->RemovePlayer( this );
+
m_ClientHandle = NULL;
CloseWindow(-1);
@@ -134,7 +139,8 @@ cPlayer::~cPlayer(void)
delete m_CreativeInventory;
delete m_pState;
- m_World->RemovePlayer( this );
+
+ LOG("Player %p deleted", this);
}