mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
Merge branch 'master' into bigmerge
Conflicts: OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs OpenSim/Region/CoreModules/LightShare/LightShareModule.cs OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
This commit is contained in:
@@ -45,7 +45,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
|
||||
private const int DEBUG_CHANNEL = 2147483647;
|
||||
|
||||
private bool m_enabled = true;
|
||||
private int m_saydistance = 30;
|
||||
private int m_saydistance = 20;
|
||||
private int m_shoutdistance = 100;
|
||||
private int m_whisperdistance = 10;
|
||||
private List<Scene> m_scenes = new List<Scene>();
|
||||
@@ -242,7 +242,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
|
||||
|
||||
foreach (Scene s in m_scenes)
|
||||
{
|
||||
s.ForEachScenePresence(
|
||||
// This should use ForEachClient, but clients don't have a position.
|
||||
// If camera is moved into client, then camera position can be used
|
||||
s.ForEachRootScenePresence(
|
||||
delegate(ScenePresence presence)
|
||||
{
|
||||
ILandObject Presencecheck = s.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y);
|
||||
@@ -306,12 +308,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
|
||||
|
||||
if (c.Scene != null)
|
||||
{
|
||||
((Scene)c.Scene).ForEachRootScenePresence
|
||||
((Scene)c.Scene).ForEachRootClient
|
||||
(
|
||||
delegate(ScenePresence presence)
|
||||
delegate(IClientAPI client)
|
||||
{
|
||||
IClientAPI client = presence.ControllingClient;
|
||||
|
||||
// don't forward SayOwner chat from objects to
|
||||
// non-owner agents
|
||||
if ((c.Type == ChatTypeEnum.Owner) &&
|
||||
@@ -321,7 +321,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
|
||||
|
||||
client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID,
|
||||
(byte)sourceType, (byte)ChatAudibleLevel.Fully);
|
||||
receiverIDs.Add(presence.UUID);
|
||||
receiverIDs.Add(client.AgentId);
|
||||
}
|
||||
);
|
||||
(c.Scene as Scene).EventManager.TriggerOnChatToClients(
|
||||
|
||||
@@ -98,9 +98,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
||||
|
||||
public void SendGeneralAlert(string message)
|
||||
{
|
||||
m_scene.ForEachRootScenePresence(delegate(ScenePresence presence)
|
||||
m_scene.ForEachRootClient(delegate(IClientAPI client)
|
||||
{
|
||||
presence.ControllingClient.SendAlertMessage(message);
|
||||
client.SendAlertMessage(message);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -162,9 +162,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
||||
public void SendNotificationToUsersInRegion(
|
||||
UUID fromAvatarID, string fromAvatarName, string message)
|
||||
{
|
||||
m_scene.ForEachRootScenePresence(delegate(ScenePresence presence)
|
||||
m_scene.ForEachRootClient(delegate(IClientAPI client)
|
||||
{
|
||||
presence.ControllingClient.SendBlueBoxMessage(fromAvatarID, fromAvatarName, message);
|
||||
client.SendBlueBoxMessage(fromAvatarID, fromAvatarName, message);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -145,58 +145,39 @@ namespace OpenSim.Region.CoreModules.World.LightShare
|
||||
param.Add(mBlock);
|
||||
return param;
|
||||
}
|
||||
public void SendProfileToClient(ScenePresence presence)
|
||||
|
||||
public void SendProfileToClient(IClientAPI client)
|
||||
{
|
||||
SendProfileToClient(client, m_scene.RegionInfo.WindlightSettings);
|
||||
}
|
||||
|
||||
public void SendProfileToClient(IClientAPI client, RegionLightShareData wl)
|
||||
{
|
||||
IClientAPI client = presence.ControllingClient;
|
||||
if (m_enableWindlight && m_scene.RegionInfo.WindlightSettings.valid)
|
||||
{
|
||||
if (presence.IsChildAgent == false)
|
||||
{
|
||||
List<byte[]> param = compileWindlightSettings(m_scene.RegionInfo.WindlightSettings);
|
||||
client.SendGenericMessage("Windlight", param);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//We probably don't want to spam chat with this.. probably
|
||||
//m_log.Debug("[WINDLIGHT]: Module disabled");
|
||||
}
|
||||
}
|
||||
public void SendProfileToClient(ScenePresence presence, RegionLightShareData wl)
|
||||
{
|
||||
IClientAPI client = presence.ControllingClient;
|
||||
if (m_enableWindlight && m_scene.RegionInfo.WindlightSettings.valid)
|
||||
{
|
||||
if (presence.IsChildAgent == false)
|
||||
{
|
||||
List<byte[]> param = compileWindlightSettings(wl);
|
||||
client.SendGenericMessage("Windlight", param);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//We probably don't want to spam chat with this.. probably
|
||||
//m_log.Debug("[WINDLIGHT]: Module disabled");
|
||||
List<byte[]> param = compileWindlightSettings(wl);
|
||||
client.SendGenericMessage("Windlight", param);
|
||||
}
|
||||
}
|
||||
|
||||
private void EventManager_OnMakeRootAgent(ScenePresence presence)
|
||||
{
|
||||
if (m_enableWindlight && m_scene.RegionInfo.WindlightSettings.valid)
|
||||
m_log.Debug("[WINDLIGHT]: Sending windlight scene to new client");
|
||||
SendProfileToClient(presence);
|
||||
SendProfileToClient(presence.ControllingClient);
|
||||
}
|
||||
|
||||
private void EventManager_OnSendNewWindlightProfileTargeted(RegionLightShareData wl, UUID pUUID)
|
||||
{
|
||||
ScenePresence Sc;
|
||||
if (m_scene.TryGetScenePresence(pUUID,out Sc))
|
||||
{
|
||||
SendProfileToClient(Sc,wl);
|
||||
}
|
||||
IClientAPI client;
|
||||
m_scene.TryGetClient(pUUID, out client);
|
||||
SendProfileToClient(client, wl);
|
||||
}
|
||||
|
||||
private void EventManager_OnSaveNewWindlightProfile()
|
||||
{
|
||||
if (m_scene.RegionInfo.WindlightSettings.valid)
|
||||
m_scene.ForEachScenePresence(SendProfileToClient);
|
||||
m_scene.ForEachRootClient(SendProfileToClient);
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
|
||||
private Queue m_pendingQ;
|
||||
private Scene m_scene;
|
||||
private int m_whisperdistance = 10;
|
||||
private int m_saydistance = 30;
|
||||
private int m_saydistance = 20;
|
||||
private int m_shoutdistance = 100;
|
||||
|
||||
#region IRegionModule Members
|
||||
|
||||
@@ -678,13 +678,14 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||
if (!Scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false))
|
||||
return;
|
||||
|
||||
Scene.ForEachRootScenePresence(delegate(ScenePresence p)
|
||||
Scene.ForEachRootClient(delegate(IClientAPI client)
|
||||
{
|
||||
if (p.UUID != senderID)
|
||||
if (client.AgentId != senderID)
|
||||
{
|
||||
// make sure they are still there, we could be working down a long list
|
||||
// Also make sure they are actually in the region
|
||||
if (p != null && !p.IsChildAgent)
|
||||
ScenePresence p;
|
||||
if(Scene.TryGetScenePresence(client.AgentId, out p))
|
||||
{
|
||||
if (!Scene.TeleportClientHome(p.UUID, p.ControllingClient))
|
||||
{
|
||||
@@ -952,9 +953,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
|
||||
|
||||
public void sendRegionInfoPacketToAll()
|
||||
{
|
||||
Scene.ForEachRootScenePresence(delegate(ScenePresence sp)
|
||||
Scene.ForEachRootClient(delegate(IClientAPI client)
|
||||
{
|
||||
HandleRegionInfoRequest(sp.ControllingClient);
|
||||
HandleRegionInfoRequest(client);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -488,9 +488,9 @@ namespace OpenSim.Region.CoreModules
|
||||
|
||||
private void SunUpdateToAllClients()
|
||||
{
|
||||
m_scene.ForEachRootScenePresence(delegate(ScenePresence sp)
|
||||
m_scene.ForEachRootClient(delegate(IClientAPI client)
|
||||
{
|
||||
SunToClient(sp.ControllingClient);
|
||||
SunToClient(client);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -435,9 +435,9 @@ namespace OpenSim.Region.CoreModules
|
||||
m_frameLastUpdateClientArray = m_frame;
|
||||
}
|
||||
|
||||
m_scene.ForEachRootScenePresence(delegate(ScenePresence sp)
|
||||
m_scene.ForEachRootClient(delegate(IClientAPI client)
|
||||
{
|
||||
sp.ControllingClient.SendWindData(windSpeeds);
|
||||
client.SendWindData(windSpeeds);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user