mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs OpenSim/Region/Framework/Scenes/Scene.cs
This commit is contained in:
@@ -372,21 +372,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
|
||||
UUID fromAgentID, UUID ownerID, string fromName, ChatTypeEnum type,
|
||||
string message, ChatSourceType src, bool ignoreDistance)
|
||||
{
|
||||
// don't send chat to child agents
|
||||
if (presence.IsChildAgent) return false;
|
||||
|
||||
Vector3 fromRegionPos = fromPos + regionPos;
|
||||
Vector3 toRegionPos = presence.AbsolutePosition +
|
||||
new Vector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize,
|
||||
presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
|
||||
|
||||
int dis = (int)Util.GetDistanceTo(toRegionPos, fromRegionPos);
|
||||
|
||||
if (type == ChatTypeEnum.Whisper && dis > m_whisperdistance ||
|
||||
type == ChatTypeEnum.Say && dis > m_saydistance ||
|
||||
type == ChatTypeEnum.Shout && dis > m_shoutdistance)
|
||||
{
|
||||
if (presence.LifecycleState != ScenePresenceState.Running)
|
||||
return false;
|
||||
|
||||
if (!ignoreDistance)
|
||||
{
|
||||
Vector3 fromRegionPos = fromPos + regionPos;
|
||||
Vector3 toRegionPos = presence.AbsolutePosition +
|
||||
new Vector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize,
|
||||
presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
|
||||
|
||||
int dis = (int)Util.GetDistanceTo(toRegionPos, fromRegionPos);
|
||||
|
||||
if (type == ChatTypeEnum.Whisper && dis > m_whisperdistance ||
|
||||
type == ChatTypeEnum.Say && dis > m_saydistance ||
|
||||
type == ChatTypeEnum.Shout && dis > m_shoutdistance)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: should change so the message is sent through the avatar rather than direct to the ClientView
|
||||
|
||||
@@ -1212,7 +1212,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
|
||||
json.Add("jsonrpc", OSD.FromString("2.0"));
|
||||
json.Add("id", OSD.FromString(jsonId));
|
||||
json.Add("method", OSD.FromString(method));
|
||||
// Experiment
|
||||
|
||||
json.Add("params", OSD.SerializeMembers(parameters));
|
||||
|
||||
string jsonRequestData = OSDParser.SerializeJsonString(json);
|
||||
@@ -1240,8 +1240,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
|
||||
}
|
||||
|
||||
Stream rstream = webResponse.GetResponseStream();
|
||||
if (rstream.Length < 1)
|
||||
return false;
|
||||
|
||||
OSDMap mret = new OSDMap();
|
||||
try
|
||||
@@ -1318,8 +1316,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
|
||||
}
|
||||
|
||||
Stream rstream = webResponse.GetResponseStream();
|
||||
if (rstream.Length < 1)
|
||||
return false;
|
||||
|
||||
OSDMap response = new OSDMap();
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user