diff options
author | silverice <none@none> | 2010-04-04 03:46:38 +0300 |
---|---|---|
committer | silverice <none@none> | 2010-04-04 03:46:38 +0300 |
commit | 5dfcccdd85691c79e93af7555eafc55214d0471e (patch) | |
tree | e91f144e0ec4f0610c6b2c14ccde7b99dc30eb47 /src/game/GridNotifiers.h | |
parent | 917193eda513d762260a9e4fd4904f00ff407caf (diff) |
correct movement packet broadcasting
mover should be source of movement packets, not player
resolves problem that movements of controlled unit not visible for nearby players
(you can detect it only when controlled unit too far from player-controller)
--HG--
branch : trunk
Diffstat (limited to 'src/game/GridNotifiers.h')
-rw-r--r-- | src/game/GridNotifiers.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game/GridNotifiers.h b/src/game/GridNotifiers.h index c6c4ee30a87..49d2bd38d02 100644 --- a/src/game/GridNotifiers.h +++ b/src/game/GridNotifiers.h @@ -127,9 +127,11 @@ namespace Trinity uint32 i_phaseMask; float i_distSq; uint32 team; - MessageDistDeliverer(WorldObject *src, WorldPacket *msg, float dist, bool own_team_only = false) + Player const* skipped_receiver; + MessageDistDeliverer(WorldObject *src, WorldPacket *msg, float dist, bool own_team_only = false, Player const* skipped = NULL) : i_source(src), i_message(msg), i_distSq(dist * dist), i_phaseMask(src->GetPhaseMask()) , team((own_team_only && src->GetTypeId() == TYPEID_PLAYER) ? ((Player*)src)->GetTeam() : 0) + , skipped_receiver(skipped) { } void Visit(PlayerMapType &m); @@ -140,7 +142,7 @@ namespace Trinity void SendPacket(Player* plr) { // never send packet to self - if(plr == i_source || team && plr->GetTeam() != team) + if(plr == i_source || (team && plr->GetTeam() != team) || skipped_receiver == plr) return; plr->GetSession()->SendPacket(i_message); |