From c94d7184ebaf7e8540f717c70c1e03ae62e5a7bd Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Tue, 24 Jul 2018 22:30:49 +0100 Subject: Broadcast refactor (#4264) * Move Broadcast functions from cChunkMap to cBroadcaster - Remove cBroadcastInterface in favour of cBroadcaster. - cChunk: Remove broadcast functions. * resurect broadcast interface * Absorb cBroadcaster into cWorld. Removes the need for forwarding the function calls. * Improve const-correctness * Use Int8 instead of char + Comment `ForClients` functions * Improve comments * Broadcaster: Rename ForClients functions --- src/Simulator/VaporizeFluidSimulator.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/Simulator/VaporizeFluidSimulator.cpp') 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(a_Block.x), - static_cast(a_Block.y), - static_cast(a_Block.z) - }, + Vector3d(a_Block), 1.0f, 0.6f ); -- cgit v1.2.3