diff options
author | peterbell10 <peterbell10@live.co.uk> | 2018-07-24 23:30:49 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2018-07-24 23:30:49 +0200 |
commit | c94d7184ebaf7e8540f717c70c1e03ae62e5a7bd (patch) | |
tree | 3a373f8ea6f06dc9b117d2d103bfaee5705040b8 /src/Simulator | |
parent | Stop cFunctionRef constructor from disabling default copy constructor. (#4173) (diff) | |
download | cuberite-c94d7184ebaf7e8540f717c70c1e03ae62e5a7bd.tar cuberite-c94d7184ebaf7e8540f717c70c1e03ae62e5a7bd.tar.gz cuberite-c94d7184ebaf7e8540f717c70c1e03ae62e5a7bd.tar.bz2 cuberite-c94d7184ebaf7e8540f717c70c1e03ae62e5a7bd.tar.lz cuberite-c94d7184ebaf7e8540f717c70c1e03ae62e5a7bd.tar.xz cuberite-c94d7184ebaf7e8540f717c70c1e03ae62e5a7bd.tar.zst cuberite-c94d7184ebaf7e8540f717c70c1e03ae62e5a7bd.zip |
Diffstat (limited to 'src/Simulator')
-rw-r--r-- | src/Simulator/FloodyFluidSimulator.cpp | 4 | ||||
-rw-r--r-- | src/Simulator/VaporizeFluidSimulator.cpp | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/src/Simulator/FloodyFluidSimulator.cpp b/src/Simulator/FloodyFluidSimulator.cpp index b5ded0c3e..76f1502ff 100644 --- a/src/Simulator/FloodyFluidSimulator.cpp +++ b/src/Simulator/FloodyFluidSimulator.cpp @@ -258,7 +258,7 @@ void cFloodyFluidSimulator::SpreadToNeighbor(cChunk * a_NearChunk, int a_RelX, i ); a_NearChunk->SetBlock(a_RelX, a_RelY, a_RelZ, NewBlock, 0); - a_NearChunk->BroadcastSoundEffect( + m_World.BroadcastSoundEffect( "block.lava.extinguish", Vector3d(BlockX, a_RelY, BlockZ), 0.5f, @@ -278,7 +278,7 @@ void cFloodyFluidSimulator::SpreadToNeighbor(cChunk * a_NearChunk, int a_RelX, i ); a_NearChunk->SetBlock(a_RelX, a_RelY, a_RelZ, NewBlock, 0); - a_NearChunk->BroadcastSoundEffect( + m_World.BroadcastSoundEffect( "block.lava.extinguish", Vector3d(BlockX, a_RelY, BlockZ), 0.5f, diff --git a/src/Simulator/VaporizeFluidSimulator.cpp b/src/Simulator/VaporizeFluidSimulator.cpp index 873dbe177..32a55794d 100644 --- a/src/Simulator/VaporizeFluidSimulator.cpp +++ b/src/Simulator/VaporizeFluidSimulator.cpp @@ -5,7 +5,9 @@ #include "Globals.h" #include "VaporizeFluidSimulator.h" +#include "../OpaqueWorld.h" #include "../Chunk.h" +#include "../Blocks/BroadcastInterface.h" @@ -35,13 +37,9 @@ void cVaporizeFluidSimulator::AddBlock(Vector3i a_Block, cChunk * a_Chunk) ) { a_Chunk->SetBlock(RelX, a_Block.y, RelZ, E_BLOCK_AIR, 0); - a_Chunk->BroadcastSoundEffect( + World::GetBroadcastInterface(m_World).BroadcastSoundEffect( "block.fire.extinguish", - { - static_cast<double>(a_Block.x), - static_cast<double>(a_Block.y), - static_cast<double>(a_Block.z) - }, + Vector3d(a_Block), 1.0f, 0.6f ); |