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/BlockEntities/MobSpawnerEntity.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/BlockEntities/MobSpawnerEntity.cpp') diff --git a/src/BlockEntities/MobSpawnerEntity.cpp b/src/BlockEntities/MobSpawnerEntity.cpp index 772fa8d79..b92139025 100644 --- a/src/BlockEntities/MobSpawnerEntity.cpp +++ b/src/BlockEntities/MobSpawnerEntity.cpp @@ -178,11 +178,9 @@ void cMobSpawnerEntity::SpawnEntity(void) if (Chunk->GetWorld()->SpawnMobFinalize(std::move(Monster)) != cEntity::INVALID_ID) { HaveSpawnedEntity = true; - Chunk->BroadcastSoundParticleEffect( + m_World->BroadcastSoundParticleEffect( EffectID::PARTICLE_MOBSPAWN, - static_cast(PosX * 8.0), - static_cast(RelY * 8.0), - static_cast(PosZ * 8.0), + Vector3d(PosX, RelY, PosZ).Floor(), 0 ); NearbyEntities++; -- cgit v1.2.3