summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-02-01 14:06:32 +0100
committerTycho <work.tycho+git@gmail.com>2014-02-01 14:06:32 +0100
commitc6304b2b4faf31c2e4a91a07bcac298467898dba (patch)
treefbb8ef9920403a02d26215492444a0b6045fa247 /src/World.cpp
parentMerge branch 'master' into GeneratingBenchmark2 (diff)
downloadcuberite-c6304b2b4faf31c2e4a91a07bcac298467898dba.tar
cuberite-c6304b2b4faf31c2e4a91a07bcac298467898dba.tar.gz
cuberite-c6304b2b4faf31c2e4a91a07bcac298467898dba.tar.bz2
cuberite-c6304b2b4faf31c2e4a91a07bcac298467898dba.tar.lz
cuberite-c6304b2b4faf31c2e4a91a07bcac298467898dba.tar.xz
cuberite-c6304b2b4faf31c2e4a91a07bcac298467898dba.tar.zst
cuberite-c6304b2b4faf31c2e4a91a07bcac298467898dba.zip
Diffstat (limited to '')
-rw-r--r--src/World.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 7b4cb553a..78b42e810 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -1486,7 +1486,7 @@ int cWorld::GetBiomeAt (int a_BlockX, int a_BlockZ)
void cWorld::SetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
{
- m_ChunkMap->SetBlock(this, a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta);
+ m_ChunkMap->SetBlock(*this, a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta);
}
@@ -1672,9 +1672,8 @@ bool cWorld::GetBlocks(sSetBlockVector & a_Blocks, bool a_ContinueOnFailure)
bool cWorld::DigBlock(int a_X, int a_Y, int a_Z)
{
cBlockHandler *Handler = cBlockHandler::GetBlockHandler(GetBlock(a_X, a_Y, a_Z));
- cChunkInterface *ChunkInterface = new cChunkInterface(GetChunkMap());
- Handler->OnDestroyed(ChunkInterface, this, a_X, a_Y, a_Z);
- delete ChunkInterface;
+ cChunkInterface ChunkInterface(GetChunkMap());
+ Handler->OnDestroyed(ChunkInterface, *this, a_X, a_Y, a_Z);
return m_ChunkMap->DigBlock(a_X, a_Y, a_Z);
}