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/Entities/EntityEffect.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Entities/EntityEffect.cpp') diff --git a/src/Entities/EntityEffect.cpp b/src/Entities/EntityEffect.cpp index 45a98c0d2..040513a26 100644 --- a/src/Entities/EntityEffect.cpp +++ b/src/Entities/EntityEffect.cpp @@ -410,10 +410,10 @@ void cEntityEffectHunger::OnTick(cPawn & a_Target) void cEntityEffectInvisibility::BroadcastMetadata(cPawn & a_Target) { - auto ParentChunk = a_Target.GetParentChunk(); - if (ParentChunk != nullptr) + auto World = a_Target.GetWorld(); + if (World != nullptr) { - ParentChunk->BroadcastEntityMetadata(a_Target); + World->BroadcastEntityMetadata(a_Target); } } -- cgit v1.2.3