diff options
author | Mattes D <github@xoft.cz> | 2014-10-15 19:01:55 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-10-15 19:09:09 +0200 |
commit | eeb580a74e48829908c303f8145802bfa1805c68 (patch) | |
tree | a08569e93e3b203f64237ef5fc6902821e24f83b /src/ChunkMap.cpp | |
parent | Usernames are lowercased before generating offline UUID. (diff) | |
download | cuberite-eeb580a74e48829908c303f8145802bfa1805c68.tar cuberite-eeb580a74e48829908c303f8145802bfa1805c68.tar.gz cuberite-eeb580a74e48829908c303f8145802bfa1805c68.tar.bz2 cuberite-eeb580a74e48829908c303f8145802bfa1805c68.tar.lz cuberite-eeb580a74e48829908c303f8145802bfa1805c68.tar.xz cuberite-eeb580a74e48829908c303f8145802bfa1805c68.tar.zst cuberite-eeb580a74e48829908c303f8145802bfa1805c68.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ChunkMap.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp index 299fe0eca..6f56b23e0 100644 --- a/src/ChunkMap.cpp +++ b/src/ChunkMap.cpp @@ -954,7 +954,7 @@ void cChunkMap::SetChunkData(cSetChunkData & a_SetChunkData) } // Notify plugins of the chunk becoming available - cPluginManager::Get()->CallHookChunkAvailable(m_World, ChunkX, ChunkZ); + cPluginManager::Get()->CallHookChunkAvailable(*m_World, ChunkX, ChunkZ); } @@ -1145,11 +1145,11 @@ void cChunkMap::FastSetBlocks(sSetBlockList & a_BlockList) -void cChunkMap::CollectPickupsByPlayer(cPlayer * a_Player) +void cChunkMap::CollectPickupsByPlayer(cPlayer & a_Player) { - int BlockX = (int)(a_Player->GetPosX()); // Truncating doesn't matter much; we're scanning entire chunks anyway - int BlockY = (int)(a_Player->GetPosY()); - int BlockZ = (int)(a_Player->GetPosZ()); + int BlockX = (int)(a_Player.GetPosX()); // Truncating doesn't matter much; we're scanning entire chunks anyway + int BlockY = (int)(a_Player.GetPosY()); + int BlockZ = (int)(a_Player.GetPosZ()); int ChunkX = 0, ChunkZ = 0; cChunkDef::AbsoluteToRelative(BlockX, BlockY, BlockZ, ChunkX, ChunkZ); int OtherChunkX = ChunkX + ((BlockX > 8) ? 1 : -1); @@ -2973,7 +2973,7 @@ void cChunkMap::cChunkLayer::UnloadUnusedChunks(void) if ( (m_Chunks[i] != NULL) && // Is valid (m_Chunks[i]->CanUnload()) && // Can unload - !cPluginManager::Get()->CallHookChunkUnloading(m_Parent->GetWorld(), m_Chunks[i]->GetPosX(), m_Chunks[i]->GetPosZ()) // Plugins agree + !cPluginManager::Get()->CallHookChunkUnloading(*(m_Parent->GetWorld()), m_Chunks[i]->GetPosX(), m_Chunks[i]->GetPosZ()) // Plugins agree ) { // The cChunk destructor calls our GetChunk() while removing its entities @@ -2987,6 +2987,8 @@ void cChunkMap::cChunkLayer::UnloadUnusedChunks(void) + + void cChunkMap::FastSetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) { cCSLock Lock(m_CSFastSetBlock); |