summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-10-21 17:37:03 +0200
committerHowaner <franzi.moos@googlemail.com>2014-10-21 17:37:03 +0200
commit283eda3c4eaa37acc242ccefdb3912768a80d14b (patch)
treefe9cdd385d5687c2f8bfe55d331ead942f28e4aa /src/ChunkMap.cpp
parentLeaves are harvest-able. (diff)
parentUpdated ProtectionAreas (diff)
downloadcuberite-283eda3c4eaa37acc242ccefdb3912768a80d14b.tar
cuberite-283eda3c4eaa37acc242ccefdb3912768a80d14b.tar.gz
cuberite-283eda3c4eaa37acc242ccefdb3912768a80d14b.tar.bz2
cuberite-283eda3c4eaa37acc242ccefdb3912768a80d14b.tar.lz
cuberite-283eda3c4eaa37acc242ccefdb3912768a80d14b.tar.xz
cuberite-283eda3c4eaa37acc242ccefdb3912768a80d14b.tar.zst
cuberite-283eda3c4eaa37acc242ccefdb3912768a80d14b.zip
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r--src/ChunkMap.cpp14
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);