diff options
author | Samuel Barney <samjbarney@gmail.com> | 2013-10-02 01:48:06 +0200 |
---|---|---|
committer | Samuel Barney <samjbarney@gmail.com> | 2013-10-02 01:48:06 +0200 |
commit | 523c6b4b94a7b52ffa588f7448a0b1e4e6371517 (patch) | |
tree | 5b31bf8e5b46e7e2520ba6bfb94fe899226b58e1 /source/Simulator/FireSimulator.cpp | |
parent | Added glass pane as transparent. Removed excess g_BlockOneHitDig[E_BLOCK_REDSTONE_WIRE]. (diff) | |
parent | Merge pull request #193 from tigerw/bugfixes (diff) | |
download | cuberite-523c6b4b94a7b52ffa588f7448a0b1e4e6371517.tar cuberite-523c6b4b94a7b52ffa588f7448a0b1e4e6371517.tar.gz cuberite-523c6b4b94a7b52ffa588f7448a0b1e4e6371517.tar.bz2 cuberite-523c6b4b94a7b52ffa588f7448a0b1e4e6371517.tar.lz cuberite-523c6b4b94a7b52ffa588f7448a0b1e4e6371517.tar.xz cuberite-523c6b4b94a7b52ffa588f7448a0b1e4e6371517.tar.zst cuberite-523c6b4b94a7b52ffa588f7448a0b1e4e6371517.zip |
Diffstat (limited to 'source/Simulator/FireSimulator.cpp')
-rw-r--r-- | source/Simulator/FireSimulator.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/source/Simulator/FireSimulator.cpp b/source/Simulator/FireSimulator.cpp index 587f45306..da1dc8d15 100644 --- a/source/Simulator/FireSimulator.cpp +++ b/source/Simulator/FireSimulator.cpp @@ -234,10 +234,6 @@ int cFireSimulator::GetBurnStepTime(cChunk * a_Chunk, int a_RelX, int a_RelY, in return m_BurnStepTimeFuel; } } - if ((a_RelY < cChunkDef::Height - 1) && IsFuel(a_Chunk->GetBlock(a_RelX, a_RelY - 1, a_RelZ))) - { - return m_BurnStepTimeFuel; - } for (int i = 0; i < ARRAYCOUNT(gCrossCoords); i++) { @@ -251,7 +247,23 @@ int cFireSimulator::GetBurnStepTime(cChunk * a_Chunk, int a_RelX, int a_RelY, in } } } // for i - gCrossCoords[] - return m_BurnStepTimeNonfuel; + + if ((a_RelY > 0) && (a_RelY < cChunkDef::Height - 1)) + { + // Checked through everything, nothing was flammable + // If block below isn't solid, we can't have fire, otherwise, we have non-fueled fire + BLOCKTYPE BlockBelow = a_Chunk->GetBlock(a_RelX, a_RelY - 1, a_RelZ); + if (g_BlockIsSolid[BlockBelow]) + { + return m_BurnStepTimeNonfuel; + } + else + { + // SetBlock just to make sure fire doesn't spawn + a_Chunk->SetBlock(a_RelX, a_RelY, a_RelZ, E_BLOCK_AIR, 0); + return 0; + } + } } |