diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-04-03 20:18:34 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-04-03 20:18:34 +0200 |
commit | e1ba51e6ca1cdff477279b7064fc0e0b5117c085 (patch) | |
tree | eaad9f451838b75cd990b548b93f8287fbd75865 /src/Simulator | |
parent | Fixed some bugs (diff) | |
parent | Fixed a few MSVC type warnings. (diff) | |
download | cuberite-e1ba51e6ca1cdff477279b7064fc0e0b5117c085.tar cuberite-e1ba51e6ca1cdff477279b7064fc0e0b5117c085.tar.gz cuberite-e1ba51e6ca1cdff477279b7064fc0e0b5117c085.tar.bz2 cuberite-e1ba51e6ca1cdff477279b7064fc0e0b5117c085.tar.lz cuberite-e1ba51e6ca1cdff477279b7064fc0e0b5117c085.tar.xz cuberite-e1ba51e6ca1cdff477279b7064fc0e0b5117c085.tar.zst cuberite-e1ba51e6ca1cdff477279b7064fc0e0b5117c085.zip |
Diffstat (limited to 'src/Simulator')
-rw-r--r-- | src/Simulator/FireSimulator.cpp | 14 | ||||
-rw-r--r-- | src/Simulator/FluidSimulator.cpp | 1 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/Simulator/FireSimulator.cpp b/src/Simulator/FireSimulator.cpp index 26712e6e6..470dfc791 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 "../Bindings/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 diff --git a/src/Simulator/FluidSimulator.cpp b/src/Simulator/FluidSimulator.cpp index 61c93ed73..7779573d7 100644 --- a/src/Simulator/FluidSimulator.cpp +++ b/src/Simulator/FluidSimulator.cpp @@ -36,6 +36,7 @@ bool cFluidSimulator::CanWashAway(BLOCKTYPE a_BlockType) case E_BLOCK_COBWEB: case E_BLOCK_CROPS: case E_BLOCK_DEAD_BUSH: + case E_BLOCK_LILY_PAD: case E_BLOCK_RAIL: case E_BLOCK_REDSTONE_TORCH_OFF: case E_BLOCK_REDSTONE_TORCH_ON: |