diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-29 21:25:11 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-29 21:25:11 +0100 |
commit | 93d73ac5203e344f67e3f734ab38bc428bc9233d (patch) | |
tree | e32f3ce4b7eaa6cf94c897332fedfe9474a46dac /source/cWorld.cpp | |
parent | Making sure cClientHandle::m_Player was NULL after authentication completed (diff) | |
download | cuberite-93d73ac5203e344f67e3f734ab38bc428bc9233d.tar cuberite-93d73ac5203e344f67e3f734ab38bc428bc9233d.tar.gz cuberite-93d73ac5203e344f67e3f734ab38bc428bc9233d.tar.bz2 cuberite-93d73ac5203e344f67e3f734ab38bc428bc9233d.tar.lz cuberite-93d73ac5203e344f67e3f734ab38bc428bc9233d.tar.xz cuberite-93d73ac5203e344f67e3f734ab38bc428bc9233d.tar.zst cuberite-93d73ac5203e344f67e3f734ab38bc428bc9233d.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cWorld.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/cWorld.cpp b/source/cWorld.cpp index 85faa72e0..3c63f2b28 100644 --- a/source/cWorld.cpp +++ b/source/cWorld.cpp @@ -1057,6 +1057,9 @@ void cWorld::SetMaxPlayers(int iMax) void cWorld::AddPlayer( cPlayer* a_Player )
{
cCSLock Lock(m_CSPlayers);
+
+ ASSERT(std::find(m_Players.begin(), m_Players.end(), a_Player) == m_Players.end()); // Is it already in the list? HOW?
+
m_Players.remove( a_Player ); // Make sure the player is registered only once
m_Players.push_back( a_Player );
}
|