summaryrefslogtreecommitdiffstats
path: root/source/Simulator/FireSimulator.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-10-06 15:44:14 +0200
committermadmaxoft <github@xoft.cz>2013-10-06 15:44:14 +0200
commitdabbf24f587d6c946b84620fb6a86e9b587a23b8 (patch)
tree7615b6f1c6030b15a67528e84d9740639adbd344 /source/Simulator/FireSimulator.cpp
parentRemoved remnants of the old webserver. (diff)
parentAPIDump: Brought cItem docs up-to-date. (diff)
downloadcuberite-dabbf24f587d6c946b84620fb6a86e9b587a23b8.tar
cuberite-dabbf24f587d6c946b84620fb6a86e9b587a23b8.tar.gz
cuberite-dabbf24f587d6c946b84620fb6a86e9b587a23b8.tar.bz2
cuberite-dabbf24f587d6c946b84620fb6a86e9b587a23b8.tar.lz
cuberite-dabbf24f587d6c946b84620fb6a86e9b587a23b8.tar.xz
cuberite-dabbf24f587d6c946b84620fb6a86e9b587a23b8.tar.zst
cuberite-dabbf24f587d6c946b84620fb6a86e9b587a23b8.zip
Diffstat (limited to '')
-rw-r--r--source/Simulator/FireSimulator.cpp22
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;
+ }
+ }
}