diff options
Diffstat (limited to '')
-rw-r--r-- | src/Simulator/VaporizeFluidSimulator.cpp | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/src/Simulator/VaporizeFluidSimulator.cpp b/src/Simulator/VaporizeFluidSimulator.cpp index 8063a0706..82f71c03f 100644 --- a/src/Simulator/VaporizeFluidSimulator.cpp +++ b/src/Simulator/VaporizeFluidSimulator.cpp @@ -13,32 +13,14 @@ -cVaporizeFluidSimulator::cVaporizeFluidSimulator(cWorld & a_World, BLOCKTYPE a_Fluid, BLOCKTYPE a_StationaryFluid) : - Super(a_World, a_Fluid, a_StationaryFluid) -{ -} - - - - - void cVaporizeFluidSimulator::AddBlock(cChunk & a_Chunk, Vector3i a_Position, BLOCKTYPE a_Block) { - if (a_Chunk == nullptr) - { - return; - } - auto relPos = cChunkDef::AbsoluteToRelative(a_Block); - auto blockType = a_Chunk->GetBlock(relPos); - if ( - (blockType == m_FluidBlock) || - (blockType == m_StationaryFluidBlock) - ) + if ((a_Block == m_FluidBlock) || (a_Block == m_StationaryFluidBlock)) { - a_Chunk->SetBlock(relPos, E_BLOCK_AIR, 0); + a_Chunk.FastSetBlock(a_Position, E_BLOCK_AIR, 0); World::GetBroadcastInterface(m_World).BroadcastSoundEffect( "block.fire.extinguish", - Vector3d(a_Block), + Vector3d(a_Position), 1.0f, 0.6f ); |