From b3e19359d972fde84f4397ed831e876741ca4c5f Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 31 Jul 2008 10:58:15 +0000 Subject: Thank you, sacha magne, for a patch that prevents sim chat from being heard across whole grids. Fixes Mantis #1855 --- OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment/Modules') diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs index 0e397d6..f98633f 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs @@ -222,7 +222,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat if (presence.IsChildAgent) return; LLVector3 fromRegionPos = fromPos + regionPos; - LLVector3 toRegionPos = presence.AbsolutePosition + regionPos; + LLVector3 toRegionPos = presence.AbsolutePosition + + new LLVector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize, + presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); + int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos)); if (type == ChatTypeEnum.Whisper && dis > m_whisperdistance || -- cgit v1.1