1
0

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
This commit is contained in:
peterbell10
2018-07-24 22:30:49 +01:00
committed by Tiger Wang
parent b5f29d5d2c
commit c94d7184eb
28 changed files with 857 additions and 1576 deletions

View File

@@ -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
);