summaryrefslogtreecommitdiffstats
path: root/src/Simulator/FireSimulator.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-03-16 14:38:41 +0100
committerHowaner <franzi.moos@googlemail.com>2014-03-27 23:20:28 +0100
commitc4a8336e847d2f4731dd9d899d6af200631f8aef (patch)
treeb4032137f8033224894a190d0c799eb819989f22 /src/Simulator/FireSimulator.cpp
parentAdd new leaves to all classes. (diff)
downloadcuberite-c4a8336e847d2f4731dd9d899d6af200631f8aef.tar
cuberite-c4a8336e847d2f4731dd9d899d6af200631f8aef.tar.gz
cuberite-c4a8336e847d2f4731dd9d899d6af200631f8aef.tar.bz2
cuberite-c4a8336e847d2f4731dd9d899d6af200631f8aef.tar.lz
cuberite-c4a8336e847d2f4731dd9d899d6af200631f8aef.tar.xz
cuberite-c4a8336e847d2f4731dd9d899d6af200631f8aef.tar.zst
cuberite-c4a8336e847d2f4731dd9d899d6af200631f8aef.zip
Diffstat (limited to '')
-rw-r--r--src/Simulator/FireSimulator.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/Simulator/FireSimulator.cpp b/src/Simulator/FireSimulator.cpp
index 26712e6e6..871a1ec5c 100644
--- a/src/Simulator/FireSimulator.cpp
+++ b/src/Simulator/FireSimulator.cpp
@@ -6,6 +6,8 @@
#include "../BlockID.h"
#include "../Defines.h"
#include "../Chunk.h"
+#include "Root.h"
+#include "PluginManager.h"
@@ -315,9 +317,15 @@ void cFireSimulator::TrySpreadFire(cChunk * a_Chunk, int a_RelX, int a_RelY, int
*/
if (CanStartFireInBlock(a_Chunk, x, y, z))
{
- FLOG("FS: Starting new fire at {%d, %d, %d}.",
- x + a_Chunk->GetPosX() * cChunkDef::Width, y, z + a_Chunk->GetPosZ() * cChunkDef::Width
- );
+ int a_PosX = x + a_Chunk->GetPosX() * cChunkDef::Width;
+ int a_PosZ = z + a_Chunk->GetPosZ() * cChunkDef::Width;
+
+ if (cRoot::Get()->GetPluginManager()->CallHookBlockSpread(&m_World, a_PosX, y, a_PosZ))
+ {
+ return;
+ }
+
+ FLOG("FS: Starting new fire at {%d, %d, %d}.", a_PosX, y, a_PosZ);
a_Chunk->UnboundedRelSetBlock(x, y, z, E_BLOCK_FIRE, 0);
}
} // for y