diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-22 16:45:00 +0100 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-02-22 16:45:00 +0100 |
commit | 1d1b0fd00d9cc370394d05d34b75516bab0344e3 (patch) | |
tree | bb989a997ebe5333bf3e6169b20d4a57dfef37c2 /source/cChunkMap.cpp | |
parent | Added a crude way of disabling redstone. It's necessary though, redstone is completely broken, crashes the server all the time (diff) | |
download | cuberite-1d1b0fd00d9cc370394d05d34b75516bab0344e3.tar cuberite-1d1b0fd00d9cc370394d05d34b75516bab0344e3.tar.gz cuberite-1d1b0fd00d9cc370394d05d34b75516bab0344e3.tar.bz2 cuberite-1d1b0fd00d9cc370394d05d34b75516bab0344e3.tar.lz cuberite-1d1b0fd00d9cc370394d05d34b75516bab0344e3.tar.xz cuberite-1d1b0fd00d9cc370394d05d34b75516bab0344e3.tar.zst cuberite-1d1b0fd00d9cc370394d05d34b75516bab0344e3.zip |
Diffstat (limited to 'source/cChunkMap.cpp')
-rw-r--r-- | source/cChunkMap.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source/cChunkMap.cpp b/source/cChunkMap.cpp index 21b99873f..bfc1bfb4d 100644 --- a/source/cChunkMap.cpp +++ b/source/cChunkMap.cpp @@ -534,14 +534,16 @@ bool cChunkMap::DigBlock(int a_X, int a_Y, int a_Z, cItem & a_PickupItem) AbsoluteToRelative( PosX, PosY, PosZ, ChunkX, ChunkZ );
- cCSLock Lock(m_CSLayers);
- cChunkPtr DestChunk = GetChunk( ChunkX, ZERO_CHUNK_Y, ChunkZ );
- if ((DestChunk == NULL) || !DestChunk->IsValid())
{
- return false;
+ cCSLock Lock(m_CSLayers);
+ cChunkPtr DestChunk = GetChunk( ChunkX, ZERO_CHUNK_Y, ChunkZ );
+ if ((DestChunk == NULL) || !DestChunk->IsValid())
+ {
+ return false;
+ }
+
+ DestChunk->SetBlock(PosX, PosY, PosZ, E_BLOCK_AIR, 0 );
}
-
- DestChunk->SetBlock(PosX, PosY, PosZ, E_BLOCK_AIR, 0 );
m_World->GetSimulatorManager()->WakeUp(a_X, a_Y, a_Z);
|