diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-04-13 23:28:55 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2013-04-13 23:28:55 +0200 |
commit | f5842062d3f9594d8f22f8938915194d20ebdf5f (patch) | |
tree | 54a92af49ef0e3cff48a22259183399d409c3f89 /source/World.cpp | |
parent | Rewritten entities so that they are owned by individual chunks and ticked within their chunk's Tick() (diff) | |
download | cuberite-f5842062d3f9594d8f22f8938915194d20ebdf5f.tar cuberite-f5842062d3f9594d8f22f8938915194d20ebdf5f.tar.gz cuberite-f5842062d3f9594d8f22f8938915194d20ebdf5f.tar.bz2 cuberite-f5842062d3f9594d8f22f8938915194d20ebdf5f.tar.lz cuberite-f5842062d3f9594d8f22f8938915194d20ebdf5f.tar.xz cuberite-f5842062d3f9594d8f22f8938915194d20ebdf5f.tar.zst cuberite-f5842062d3f9594d8f22f8938915194d20ebdf5f.zip |
Diffstat (limited to '')
-rw-r--r-- | source/World.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/World.cpp b/source/World.cpp index 6e321d63a..74a7ea399 100644 --- a/source/World.cpp +++ b/source/World.cpp @@ -1722,7 +1722,7 @@ void cWorld::AddPlayer(cPlayer * a_Player) void cWorld::RemovePlayer(cPlayer * a_Player) { - m_ChunkMap->RemoveEntityFromChunk(a_Player, a_Player->GetChunkX(), a_Player->GetChunkZ()); + m_ChunkMap->RemoveEntity(a_Player); cCSLock Lock(m_CSPlayers); m_Players.remove(a_Player); } @@ -1853,15 +1853,6 @@ void cWorld::SendPlayerList(cPlayer * a_DestPlayer) -void cWorld::RemoveEntityFromChunk(cEntity * a_Entity, int a_ChunkX, int a_ChunkZ) -{ - m_ChunkMap->RemoveEntityFromChunk(a_Entity, a_ChunkX, a_ChunkZ); -} - - - - - bool cWorld::ForEachEntity(cEntityCallback & a_Callback) { return m_ChunkMap->ForEachEntity(a_Callback); @@ -2084,6 +2075,15 @@ bool cWorld::HasEntity(int a_UniqueID) +void cWorld::RemoveEntity(cEntity * a_Entity) +{ + m_ChunkMap->RemoveEntity(a_Entity); +} + + + + + unsigned int cWorld::GetNumPlayers(void) { cCSLock Lock(m_CSPlayers); |