summaryrefslogtreecommitdiffstats
path: root/src/Simulator/FireSimulator.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2018-01-03 18:41:16 +0100
committerGitHub <noreply@github.com>2018-01-03 18:41:16 +0100
commit757231cc6e777b8f4717d1467ef7efa01c7fde15 (patch)
tree6d1021761ad1c492700fe17560cb79520e508d60 /src/Simulator/FireSimulator.cpp
parentConcrete mixing (#4096) (diff)
downloadcuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar
cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar.gz
cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar.bz2
cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar.lz
cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar.xz
cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.tar.zst
cuberite-757231cc6e777b8f4717d1467ef7efa01c7fde15.zip
Diffstat (limited to '')
-rw-r--r--src/Simulator/FireSimulator.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/Simulator/FireSimulator.cpp b/src/Simulator/FireSimulator.cpp
index ac7456b0a..927a7ae22 100644
--- a/src/Simulator/FireSimulator.cpp
+++ b/src/Simulator/FireSimulator.cpp
@@ -14,9 +14,9 @@
// Easy switch for turning on debugging logging:
#if 0
- #define FLOG LOGD
+ #define FIRE_LOG LOGD
#else
- #define FLOG(...)
+ #define FIRE_LOG(...)
#endif
@@ -111,7 +111,7 @@ void cFireSimulator::SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX,
if (!IsAllowedBlock(BlockType))
{
// The block is no longer eligible (not a fire block anymore; a player probably placed a block over the fire)
- FLOG("FS: Removing block {%d, %d, %d}",
+ FIRE_LOG("FS: Removing block {%d, %d, %d}",
AbsPos.x, AbsPos.y, AbsPos.z
);
itr = Data.erase(itr);
@@ -148,14 +148,15 @@ void cFireSimulator::SimulateChunk(std::chrono::milliseconds a_Dt, int a_ChunkX,
}
/*
- FLOG("FS: Fire at {%d, %d, %d} is stepping",
+ FIRE_LOG("FS: Fire at {%d, %d, %d} is stepping",
itr->x + a_ChunkX * cChunkDef::Width, itr->y, itr->z + a_ChunkZ * cChunkDef::Width
);
*/
// Has the fire burnt out?
if (BlockMeta == 0x0f)
{
- FLOG("FS: Fire at {%d, %d, %d} burnt out, removing the fire block",
+ // The fire burnt out completely
+ FIRE_LOG("FS: Fire at {%d, %d, %d} burnt out, removing the fire block",
itr->x + a_ChunkX * cChunkDef::Width, itr->y, itr->z + a_ChunkZ * cChunkDef::Width
);
a_Chunk->SetBlock(x, y, z, E_BLOCK_AIR, 0);
@@ -271,7 +272,7 @@ void cFireSimulator::AddBlock(Vector3i a_Block, cChunk * a_Chunk)
}
} // for itr - ChunkData[]
- FLOG("FS: Adding block {%d, %d, %d}", a_Block.x, a_Block.y, a_Block.z);
+ FIRE_LOG("FS: Adding block {%d, %d, %d}", a_Block.x, a_Block.y, a_Block.z);
ChunkData.push_back(cCoordWithInt(RelX, a_Block.y, RelZ, 100));
}
@@ -351,7 +352,7 @@ void cFireSimulator::TrySpreadFire(cChunk * a_Chunk, int a_RelX, int a_RelY, int
// Start the fire in the neighbor {x, y, z}
/*
- FLOG("FS: Trying to start fire at {%d, %d, %d}.",
+ FIRE_LOG("FS: Trying to start fire at {%d, %d, %d}.",
x + a_Chunk->GetPosX() * cChunkDef::Width, y, z + a_Chunk->GetPosZ() * cChunkDef::Width
);
*/
@@ -365,7 +366,7 @@ void cFireSimulator::TrySpreadFire(cChunk * a_Chunk, int a_RelX, int a_RelY, int
return;
}
- FLOG("FS: Starting new fire at {%d, %d, %d}.", a_PosX, y, a_PosZ);
+ FIRE_LOG("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