summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-10-21 16:55:22 +0200
committerHowaner <franzi.moos@googlemail.com>2014-10-21 16:55:22 +0200
commit44514e53fc5ad19e57688bed610f804b6d28be33 (patch)
tree224fce184f6d59739d77828889025467ecfd1edf /src/ChunkMap.cpp
parentAdded distance check. (diff)
parentUpdated ProtectionAreas (diff)
downloadcuberite-44514e53fc5ad19e57688bed610f804b6d28be33.tar
cuberite-44514e53fc5ad19e57688bed610f804b6d28be33.tar.gz
cuberite-44514e53fc5ad19e57688bed610f804b6d28be33.tar.bz2
cuberite-44514e53fc5ad19e57688bed610f804b6d28be33.tar.lz
cuberite-44514e53fc5ad19e57688bed610f804b6d28be33.tar.xz
cuberite-44514e53fc5ad19e57688bed610f804b6d28be33.tar.zst
cuberite-44514e53fc5ad19e57688bed610f804b6d28be33.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);