* Cross-border region chat should now work as long as both regions are part of the same simulator.
parent
f427433c85
commit
f364a084f1
|
@ -197,6 +197,7 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
|
|
||||||
// Filled in since it's easier than rewriting right now.
|
// Filled in since it's easier than rewriting right now.
|
||||||
LLVector3 fromPos = e.Position;
|
LLVector3 fromPos = e.Position;
|
||||||
|
LLVector3 fromRegionPos = e.Position + new LLVector3(e.Scene.RegionInfo.RegionLocX * 256, e.Scene.RegionInfo.RegionLocY * 256, 0);
|
||||||
string fromName = e.From;
|
string fromName = e.From;
|
||||||
string message = e.Message;
|
string message = e.Message;
|
||||||
byte type = (byte)e.Type;
|
byte type = (byte)e.Type;
|
||||||
|
@ -244,16 +245,14 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
|
|
||||||
if (e.Channel == 0)
|
if (e.Channel == 0)
|
||||||
{
|
{
|
||||||
scene.ForEachScenePresence(delegate(ScenePresence presence)
|
foreach (Scene m_scene in m_scenes)
|
||||||
{
|
{
|
||||||
int dis = -1000;
|
m_scene.ForEachScenePresence(delegate(ScenePresence presence)
|
||||||
|
{
|
||||||
|
int dis = -100000;
|
||||||
|
|
||||||
//err ??? the following code seems to be request a scenePresence when it already has a ref to it
|
LLVector3 avatarRegionPos = presence.AbsolutePosition + new LLVector3(scene.RegionInfo.RegionLocX * 256, scene.RegionInfo.RegionLocY * 256, 0);
|
||||||
avatar = scene.GetScenePresence(presence.ControllingClient.AgentId);
|
dis = (int)avatarRegionPos.GetDistanceTo(fromRegionPos);
|
||||||
if (avatar != null)
|
|
||||||
{
|
|
||||||
dis = (int) avatar.AbsolutePosition.GetDistanceTo(fromPos);
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (e.Type)
|
switch (e.Type)
|
||||||
{
|
{
|
||||||
|
@ -302,3 +301,4 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue