summaryrefslogtreecommitdiffstats
path: root/src/Simulator/FireSimulator.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-03-28 16:39:32 +0100
committermadmaxoft <github@xoft.cz>2014-03-28 16:39:32 +0100
commit173fd0dd9246a0a30041cc103327aed5dd7166d5 (patch)
tree095ec63173d417d83cc709a4bd0fa35801484e4b /src/Simulator/FireSimulator.cpp
parentFixed Prefab's rotations. (diff)
parentAdd missing ChunkDesc import. (diff)
downloadcuberite-173fd0dd9246a0a30041cc103327aed5dd7166d5.tar
cuberite-173fd0dd9246a0a30041cc103327aed5dd7166d5.tar.gz
cuberite-173fd0dd9246a0a30041cc103327aed5dd7166d5.tar.bz2
cuberite-173fd0dd9246a0a30041cc103327aed5dd7166d5.tar.lz
cuberite-173fd0dd9246a0a30041cc103327aed5dd7166d5.tar.xz
cuberite-173fd0dd9246a0a30041cc103327aed5dd7166d5.tar.zst
cuberite-173fd0dd9246a0a30041cc103327aed5dd7166d5.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..e4d4a540d 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, ssFireSpread))
+ {
+ 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