aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar
diff options
context:
space:
mode:
authorMelanie2013-09-07 13:54:19 +0100
committerMelanie2013-09-07 13:54:19 +0100
commit2f365ea80be0df545a74da03afceb964da1546d1 (patch)
treea54202b1cdabaa201c0566232bde69cecdcfef6a /OpenSim/Region/CoreModules/Avatar
parentMerge branch 'master' into careminster (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-2f365ea80be0df545a74da03afceb964da1546d1.zip
opensim-SC-2f365ea80be0df545a74da03afceb964da1546d1.tar.gz
opensim-SC-2f365ea80be0df545a74da03afceb964da1546d1.tar.bz2
opensim-SC-2f365ea80be0df545a74da03afceb964da1546d1.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs OpenSim/Region/Framework/Scenes/Scene.cs
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs29
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs6
2 files changed, 17 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
index 174642d..917f164 100644
--- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs
@@ -372,21 +372,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
372 UUID fromAgentID, UUID ownerID, string fromName, ChatTypeEnum type, 372 UUID fromAgentID, UUID ownerID, string fromName, ChatTypeEnum type,
373 string message, ChatSourceType src, bool ignoreDistance) 373 string message, ChatSourceType src, bool ignoreDistance)
374 { 374 {
375 // don't send chat to child agents 375 if (presence.LifecycleState != ScenePresenceState.Running)
376 if (presence.IsChildAgent) return false; 376 return false;
377
378 Vector3 fromRegionPos = fromPos + regionPos;
379 Vector3 toRegionPos = presence.AbsolutePosition +
380 new Vector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize,
381 presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
382 377
383 int dis = (int)Util.GetDistanceTo(toRegionPos, fromRegionPos); 378 if (!ignoreDistance)
384
385 if (type == ChatTypeEnum.Whisper && dis > m_whisperdistance ||
386 type == ChatTypeEnum.Say && dis > m_saydistance ||
387 type == ChatTypeEnum.Shout && dis > m_shoutdistance)
388 { 379 {
389 return false; 380 Vector3 fromRegionPos = fromPos + regionPos;
381 Vector3 toRegionPos = presence.AbsolutePosition +
382 new Vector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize,
383 presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
384
385 int dis = (int)Util.GetDistanceTo(toRegionPos, fromRegionPos);
386
387 if (type == ChatTypeEnum.Whisper && dis > m_whisperdistance ||
388 type == ChatTypeEnum.Say && dis > m_saydistance ||
389 type == ChatTypeEnum.Shout && dis > m_shoutdistance)
390 {
391 return false;
392 }
390 } 393 }
391 394
392 // TODO: should change so the message is sent through the avatar rather than direct to the ClientView 395 // TODO: should change so the message is sent through the avatar rather than direct to the ClientView
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index bf1cffb..56ff2bd 100644
--- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
@@ -1212,7 +1212,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
1212 json.Add("jsonrpc", OSD.FromString("2.0")); 1212 json.Add("jsonrpc", OSD.FromString("2.0"));
1213 json.Add("id", OSD.FromString(jsonId)); 1213 json.Add("id", OSD.FromString(jsonId));
1214 json.Add("method", OSD.FromString(method)); 1214 json.Add("method", OSD.FromString(method));
1215 // Experiment 1215
1216 json.Add("params", OSD.SerializeMembers(parameters)); 1216 json.Add("params", OSD.SerializeMembers(parameters));
1217 1217
1218 string jsonRequestData = OSDParser.SerializeJsonString(json); 1218 string jsonRequestData = OSDParser.SerializeJsonString(json);
@@ -1240,8 +1240,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
1240 } 1240 }
1241 1241
1242 Stream rstream = webResponse.GetResponseStream(); 1242 Stream rstream = webResponse.GetResponseStream();
1243 if (rstream.Length < 1)
1244 return false;
1245 1243
1246 OSDMap mret = new OSDMap(); 1244 OSDMap mret = new OSDMap();
1247 try 1245 try
@@ -1318,8 +1316,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
1318 } 1316 }
1319 1317
1320 Stream rstream = webResponse.GetResponseStream(); 1318 Stream rstream = webResponse.GetResponseStream();
1321 if (rstream.Length < 1)
1322 return false;
1323 1319
1324 OSDMap response = new OSDMap(); 1320 OSDMap response = new OSDMap();
1325 try 1321 try