summaryrefslogtreecommitdiffstats
path: root/src/Simulator/FireSimulator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Simulator/FireSimulator.cpp')
-rw-r--r--src/Simulator/FireSimulator.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Simulator/FireSimulator.cpp b/src/Simulator/FireSimulator.cpp
index 45969bd0a..d5671c5c2 100644
--- a/src/Simulator/FireSimulator.cpp
+++ b/src/Simulator/FireSimulator.cpp
@@ -352,18 +352,18 @@ void cFireSimulator::TrySpreadFire(cChunk * a_Chunk, int a_RelX, int a_RelY, int
void cFireSimulator::RemoveFuelNeighbors(cChunk * a_Chunk, int a_RelX, int a_RelY, int a_RelZ)
{
- for (size_t i = 0; i < ARRAYCOUNT(gNeighborCoords); i++)
+ for (auto & Coord : gNeighborCoords)
{
BLOCKTYPE BlockType;
- int X = a_RelX + gNeighborCoords[i].x;
- int Z = a_RelZ + gNeighborCoords[i].z;
+ int X = a_RelX + Coord.x;
+ int Z = a_RelZ + Coord.z;
cChunkPtr Neighbour = a_Chunk->GetRelNeighborChunkAdjustCoords(X, Z);
if (Neighbour == nullptr)
{
continue;
}
- BlockType = Neighbour->GetBlock(X, a_RelY + gNeighborCoords[i].y, Z);
+ BlockType = Neighbour->GetBlock(X, a_RelY + Coord.y, Z);
if (!IsFuel(BlockType))
{
@@ -371,12 +371,12 @@ void cFireSimulator::RemoveFuelNeighbors(cChunk * a_Chunk, int a_RelX, int a_Rel
}
int AbsX = (Neighbour->GetPosX() * cChunkDef::Width) + X;
- int Y = a_RelY + gNeighborCoords[i].y;
+ int Y = a_RelY + Coord.y;
int AbsZ = (Neighbour->GetPosZ() * cChunkDef::Width) + Z;
if (BlockType == E_BLOCK_TNT)
{
- m_World.SpawnPrimedTNT(AbsX, Y, AbsZ, 0);
+ m_World.SpawnPrimedTNT({static_cast<double>(AbsX), static_cast<double>(Y), static_cast<double>(AbsZ)}, 0);
Neighbour->SetBlock(X, Y, Z, E_BLOCK_AIR, 0);
return;
}