mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
Intermediate commit. Sill errors.
Merge branch 'master' into careminster Conflicts: OpenSim/Data/SQLite/SQLiteUserProfilesData.cs OpenSim/Framework/RegionInfo.cs OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs OpenSim/Services/UserProfilesService/UserProfilesService.cs
This commit is contained in:
@@ -754,8 +754,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.UserProfiles
|
||||
IClientAPI remoteClient = (IClientAPI)sender;
|
||||
string serverURI = string.Empty;
|
||||
GetUserProfileServerURI(remoteClient.AgentId, out serverURI);
|
||||
note.TargetId = remoteClient.AgentId;
|
||||
UUID.TryParse(args[0], out note.UserId);
|
||||
note.UserId = remoteClient.AgentId;
|
||||
UUID.TryParse(args[0], out note.TargetId);
|
||||
|
||||
object Note = (object)note;
|
||||
if(!JsonRpcRequest(ref Note, "avatarnotesrequest", serverURI, UUID.Random().ToString()))
|
||||
|
||||
@@ -51,7 +51,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "EntityTransferModule")]
|
||||
public class EntityTransferModule : INonSharedRegionModule, IEntityTransferModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private static readonly string LogHeader = "[ENTITY TRANSFER MODULE]";
|
||||
|
||||
public const int DefaultMaxTransferDistance = 4095;
|
||||
public const bool WaitForAgentArrivedAtDestinationDefault = true;
|
||||
@@ -825,7 +826,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
// The EnableSimulator message makes the client establish a connection with the destination
|
||||
// simulator by sending the initial UseCircuitCode UDP packet to the destination containing the
|
||||
// correct circuit code.
|
||||
m_eqModule.EnableSimulator(destinationHandle, endPoint, sp.UUID);
|
||||
m_eqModule.EnableSimulator(destinationHandle, endPoint, sp.UUID,
|
||||
finalDestination.RegionSizeX, finalDestination.RegionSizeY);
|
||||
m_log.DebugFormat("{0} Sent EnableSimulator. regName={1}, size=<{2},{3}>", LogHeader,
|
||||
finalDestination.RegionName, finalDestination.RegionSizeX, finalDestination.RegionSizeY);
|
||||
|
||||
// XXX: Is this wait necessary? We will always end up waiting on UpdateAgent for the destination
|
||||
// simulator to confirm that it has established communication with the viewer.
|
||||
@@ -835,7 +839,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
// unnecessary - teleport will succeed and SEED caps will be requested without it (though possibly
|
||||
// only on TeleportFinish). This is untested for region teleport between different simulators
|
||||
// though this probably also works.
|
||||
m_eqModule.EstablishAgentCommunication(sp.UUID, endPoint, capsPath);
|
||||
m_eqModule.EstablishAgentCommunication(sp.UUID, endPoint, capsPath, finalDestination.RegionHandle,
|
||||
finalDestination.RegionSizeX, finalDestination.RegionSizeY);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -921,7 +926,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
// OK, send TPFinish to the client, so that it starts the process of contacting the destination region
|
||||
if (m_eqModule != null)
|
||||
{
|
||||
m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID);
|
||||
m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID,
|
||||
finalDestination.RegionSizeX, finalDestination.RegionSizeY);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1074,7 +1080,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
|
||||
// New protocol: send TP Finish directly, without prior ES or EAC. That's what happens in the Linden grid
|
||||
if (m_eqModule != null)
|
||||
m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID);
|
||||
m_eqModule.TeleportFinishEvent(destinationHandle, 13, endPoint, 0, teleportFlags, capsPath, sp.UUID,
|
||||
finalDestination.RegionSizeX, finalDestination.RegionSizeY);
|
||||
else
|
||||
sp.ControllingClient.SendRegionTeleport(destinationHandle, 13, endPoint, 4,
|
||||
teleportFlags, capsPath);
|
||||
@@ -1717,11 +1724,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
if (m_eqModule != null)
|
||||
{
|
||||
m_eqModule.CrossRegion(
|
||||
neighbourRegion.RegionHandle, pos + agent.Velocity, vel2 /* agent.Velocity */, neighbourRegion.ExternalEndPoint,
|
||||
capsPath, agent.UUID, agent.ControllingClient.SessionId);
|
||||
neighbourRegion.RegionHandle, pos + agent.Velocity, vel2 /* agent.Velocity */,
|
||||
neighbourRegion.ExternalEndPoint,
|
||||
capsPath, agent.UUID, agent.ControllingClient.SessionId,
|
||||
neighbourRegion.RegionSizeX, neighbourRegion.RegionSizeY);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.ErrorFormat("{0} Using old CrossRegion packet. Varregion will not work!!", LogHeader);
|
||||
agent.ControllingClient.CrossRegion(neighbourRegion.RegionHandle, pos + agent.Velocity, agent.Velocity, neighbourRegion.ExternalEndPoint,
|
||||
capsPath);
|
||||
}
|
||||
@@ -2087,12 +2097,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
}
|
||||
#endregion
|
||||
|
||||
m_log.DebugFormat("[ENTITY TRANSFER MODULE]: {0} is sending {1} EnableSimulator for neighbour region {2} @ {3} " +
|
||||
"and EstablishAgentCommunication with seed cap {4}",
|
||||
scene.RegionInfo.RegionName, sp.Name, reg.RegionName, reg.RegionHandle, capsPath);
|
||||
m_log.DebugFormat("{0} {1} is sending {2} EnableSimulator for neighbour region {3}(loc=<{4},{5}>,siz=<{6},{7}>) " +
|
||||
"and EstablishAgentCommunication with seed cap {8}", LogHeader,
|
||||
scene.RegionInfo.RegionName, sp.Name,
|
||||
reg.RegionName, reg.RegionLocX, reg.RegionLocY, reg.RegionSizeX, reg.RegionSizeY , capsPath);
|
||||
|
||||
m_eqModule.EnableSimulator(reg.RegionHandle, endPoint, sp.UUID);
|
||||
m_eqModule.EstablishAgentCommunication(sp.UUID, endPoint, capsPath);
|
||||
m_eqModule.EnableSimulator(reg.RegionHandle, endPoint, sp.UUID, reg.RegionSizeX, reg.RegionSizeY);
|
||||
m_eqModule.EstablishAgentCommunication(sp.UUID, endPoint, capsPath, reg.RegionHandle, reg.RegionSizeX, reg.RegionSizeY);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -216,13 +216,13 @@ namespace OpenSim.Region.CoreModules
|
||||
// FIXME: If console region is root then this will be printed by every module. Currently, there is no
|
||||
// way to prevent this, short of making the entire module shared (which is complete overkill).
|
||||
// One possibility is to return a bool to signal whether the module has completely handled the command
|
||||
m_log.InfoFormat("[WIND]: Please change to a specific region in order to set Sun parameters.");
|
||||
MainConsole.Instance.Output("Please change to a specific region in order to set Sun parameters.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_scene.ConsoleScene() != m_scene)
|
||||
{
|
||||
m_log.InfoFormat("[WIND]: Console Scene is not my scene.");
|
||||
MainConsole.Instance.Output("Console Scene is not my scene.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -233,7 +233,9 @@ namespace OpenSim.Region.CoreModules
|
||||
private void HandleConsoleCommand(string module, string[] cmdparams)
|
||||
{
|
||||
ValidateConsole();
|
||||
m_log.Info("[WIND] The wind command can be used to change the currently active wind model plugin and update the parameters for wind plugins.");
|
||||
|
||||
MainConsole.Instance.Output(
|
||||
"The wind command can be used to change the currently active wind model plugin and update the parameters for wind plugins.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -246,7 +248,9 @@ namespace OpenSim.Region.CoreModules
|
||||
if ((cmdparams.Length != 4)
|
||||
|| !cmdparams[1].Equals("base"))
|
||||
{
|
||||
m_log.Info("[WIND] Invalid parameters to change parameters for Wind module base, usage: wind base <parameter> <value>");
|
||||
MainConsole.Instance.Output(
|
||||
"Invalid parameters to change parameters for Wind module base, usage: wind base <parameter> <value>");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -261,7 +265,9 @@ namespace OpenSim.Region.CoreModules
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.InfoFormat("[WIND] Invalid value {0} specified for {1}", cmdparams[3], cmdparams[2]);
|
||||
MainConsole.Instance.OutputFormat(
|
||||
"Invalid value {0} specified for {1}", cmdparams[3], cmdparams[2]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -271,22 +277,23 @@ namespace OpenSim.Region.CoreModules
|
||||
|
||||
if (desiredPlugin.Equals(m_activeWindPlugin.Name))
|
||||
{
|
||||
m_log.InfoFormat("[WIND] Wind model plugin {0} is already active", cmdparams[3]);
|
||||
MainConsole.Instance.OutputFormat("Wind model plugin {0} is already active", cmdparams[3]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_availableWindPlugins.ContainsKey(desiredPlugin))
|
||||
{
|
||||
m_activeWindPlugin = m_availableWindPlugins[cmdparams[3]];
|
||||
m_log.InfoFormat("[WIND] {0} wind model plugin now active", m_activeWindPlugin.Name);
|
||||
|
||||
MainConsole.Instance.OutputFormat("{0} wind model plugin now active", m_activeWindPlugin.Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.InfoFormat("[WIND] Could not find wind model plugin {0}", desiredPlugin);
|
||||
MainConsole.Instance.OutputFormat("Could not find wind model plugin {0}", desiredPlugin);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -300,7 +307,7 @@ namespace OpenSim.Region.CoreModules
|
||||
if ((cmdparams.Length != 4)
|
||||
&& (cmdparams.Length != 3))
|
||||
{
|
||||
m_log.Info("[WIND] Usage: wind <plugin> <param> [value]");
|
||||
MainConsole.Instance.Output("Usage: wind <plugin> <param> [value]");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -311,16 +318,17 @@ namespace OpenSim.Region.CoreModules
|
||||
{
|
||||
if (!float.TryParse(cmdparams[3], out value))
|
||||
{
|
||||
m_log.InfoFormat("[WIND] Invalid value {0}", cmdparams[3]);
|
||||
MainConsole.Instance.OutputFormat("Invalid value {0}", cmdparams[3]);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
WindParamSet(plugin, param, value);
|
||||
MainConsole.Instance.OutputFormat("{0} set to {1}", param, value);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.InfoFormat("[WIND] {0}", e.Message);
|
||||
MainConsole.Instance.OutputFormat("{0}", e.Message);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -328,11 +336,11 @@ namespace OpenSim.Region.CoreModules
|
||||
try
|
||||
{
|
||||
value = WindParamGet(plugin, param);
|
||||
m_log.InfoFormat("[WIND] {0} : {1}", param, value);
|
||||
MainConsole.Instance.OutputFormat("{0} : {1}", param, value);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.InfoFormat("[WIND] {0}", e.Message);
|
||||
MainConsole.Instance.OutputFormat("{0}", e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,13 +374,11 @@ namespace OpenSim.Region.CoreModules
|
||||
{
|
||||
IWindModelPlugin windPlugin = m_availableWindPlugins[plugin];
|
||||
windPlugin.WindParamSet(param, value);
|
||||
m_log.InfoFormat("[WIND] {0} set to {1}", param, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception(String.Format("Could not find plugin {0}", plugin));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public float WindParamGet(string plugin, string param)
|
||||
|
||||
Reference in New Issue
Block a user