Merge branch 'master' into httptests
commit
18a292ad02
|
@ -1293,7 +1293,7 @@ namespace OpenSim.Framework
|
||||||
void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks);
|
void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks);
|
||||||
void SendViewerTime(int phase);
|
void SendViewerTime(int phase);
|
||||||
|
|
||||||
void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, string flAbout,
|
void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] membershipType, string flAbout,
|
||||||
uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID);
|
uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID);
|
||||||
|
|
||||||
void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question);
|
void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question);
|
||||||
|
|
|
@ -138,8 +138,6 @@ namespace OpenSim.Framework
|
||||||
protected uint m_httpPort;
|
protected uint m_httpPort;
|
||||||
protected string m_serverURI;
|
protected string m_serverURI;
|
||||||
protected string m_regionName = String.Empty;
|
protected string m_regionName = String.Empty;
|
||||||
protected bool Allow_Alternate_Ports;
|
|
||||||
public bool m_allow_alternate_ports;
|
|
||||||
protected string m_externalHostName;
|
protected string m_externalHostName;
|
||||||
protected IPEndPoint m_internalEndPoint;
|
protected IPEndPoint m_internalEndPoint;
|
||||||
protected uint m_remotingPort;
|
protected uint m_remotingPort;
|
||||||
|
@ -147,6 +145,7 @@ namespace OpenSim.Framework
|
||||||
public string RemotingAddress;
|
public string RemotingAddress;
|
||||||
public UUID ScopeID = UUID.Zero;
|
public UUID ScopeID = UUID.Zero;
|
||||||
private UUID m_maptileStaticUUID = UUID.Zero;
|
private UUID m_maptileStaticUUID = UUID.Zero;
|
||||||
|
private bool m_resolveAddress = false;
|
||||||
|
|
||||||
public uint WorldLocX = 0;
|
public uint WorldLocX = 0;
|
||||||
public uint WorldLocY = 0;
|
public uint WorldLocY = 0;
|
||||||
|
@ -544,7 +543,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
private void ReadNiniConfig(IConfigSource source, string name)
|
private void ReadNiniConfig(IConfigSource source, string name)
|
||||||
{
|
{
|
||||||
// bool creatingNew = false;
|
bool creatingNew = false;
|
||||||
|
|
||||||
if (source.Configs.Count == 0)
|
if (source.Configs.Count == 0)
|
||||||
{
|
{
|
||||||
|
@ -568,7 +567,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
source.AddConfig(name);
|
source.AddConfig(name);
|
||||||
|
|
||||||
// creatingNew = true;
|
creatingNew = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name == String.Empty)
|
if (name == String.Empty)
|
||||||
|
@ -672,18 +671,19 @@ namespace OpenSim.Framework
|
||||||
}
|
}
|
||||||
m_internalEndPoint = new IPEndPoint(address, port);
|
m_internalEndPoint = new IPEndPoint(address, port);
|
||||||
|
|
||||||
// AllowAlternatePorts
|
// ResolveAddress
|
||||||
//
|
//
|
||||||
allKeys.Remove("AllowAlternatePorts");
|
allKeys.Remove("ResolveAddress");
|
||||||
if (config.Contains("AllowAlternatePorts"))
|
if (config.Contains("ResolveAddress"))
|
||||||
{
|
{
|
||||||
m_allow_alternate_ports = config.GetBoolean("AllowAlternatePorts", true);
|
m_resolveAddress = config.GetBoolean("ResolveAddress", false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_allow_alternate_ports = Convert.ToBoolean(MainConsole.Instance.CmdPrompt("Allow alternate ports", "False"));
|
if (creatingNew)
|
||||||
|
m_resolveAddress = Convert.ToBoolean(MainConsole.Instance.CmdPrompt("Resolve hostname to IP on start (for running inside Docker)", "False"));
|
||||||
|
|
||||||
config.Set("AllowAlternatePorts", m_allow_alternate_ports.ToString());
|
config.Set("ResolveAddress", m_resolveAddress.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExternalHostName
|
// ExternalHostName
|
||||||
|
@ -706,10 +706,18 @@ namespace OpenSim.Framework
|
||||||
"[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}",
|
"[REGIONINFO]: Resolving SYSTEMIP to {0} for external hostname of region {1}",
|
||||||
m_externalHostName, name);
|
m_externalHostName, name);
|
||||||
}
|
}
|
||||||
else
|
else if (!m_resolveAddress)
|
||||||
{
|
{
|
||||||
m_externalHostName = externalName;
|
m_externalHostName = externalName;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
IPAddress[] addrs = Dns.GetHostAddresses(externalName);
|
||||||
|
if (addrs.Length != 1) // If it is ambiguous or not resolveable, use it literally
|
||||||
|
m_externalHostName = externalName;
|
||||||
|
else
|
||||||
|
m_externalHostName = addrs[0].ToString();
|
||||||
|
}
|
||||||
|
|
||||||
// RegionType
|
// RegionType
|
||||||
m_regionType = config.GetString("RegionType", String.Empty);
|
m_regionType = config.GetString("RegionType", String.Empty);
|
||||||
|
@ -901,8 +909,6 @@ namespace OpenSim.Framework
|
||||||
config.Set("InternalAddress", m_internalEndPoint.Address.ToString());
|
config.Set("InternalAddress", m_internalEndPoint.Address.ToString());
|
||||||
config.Set("InternalPort", m_internalEndPoint.Port);
|
config.Set("InternalPort", m_internalEndPoint.Port);
|
||||||
|
|
||||||
config.Set("AllowAlternatePorts", m_allow_alternate_ports.ToString());
|
|
||||||
|
|
||||||
config.Set("ExternalHostName", m_externalHostName);
|
config.Set("ExternalHostName", m_externalHostName);
|
||||||
|
|
||||||
if (m_nonphysPrimMin > 0)
|
if (m_nonphysPrimMin > 0)
|
||||||
|
@ -995,10 +1001,6 @@ namespace OpenSim.Framework
|
||||||
configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
||||||
"Internal IP Port for incoming UDP client connections",
|
"Internal IP Port for incoming UDP client connections",
|
||||||
m_internalEndPoint.Port.ToString(), true);
|
m_internalEndPoint.Port.ToString(), true);
|
||||||
configMember.addConfigurationOption("allow_alternate_ports",
|
|
||||||
ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
|
|
||||||
"Allow sim to find alternate UDP ports when ports are in use?",
|
|
||||||
m_allow_alternate_ports.ToString(), true);
|
|
||||||
configMember.addConfigurationOption("external_host_name",
|
configMember.addConfigurationOption("external_host_name",
|
||||||
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
||||||
"External Host Name", m_externalHostName, true);
|
"External Host Name", m_externalHostName, true);
|
||||||
|
@ -1068,9 +1070,6 @@ namespace OpenSim.Framework
|
||||||
configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
configMember.addConfigurationOption("internal_ip_port", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
||||||
"Internal IP Port for incoming UDP client connections",
|
"Internal IP Port for incoming UDP client connections",
|
||||||
ConfigSettings.DefaultRegionHttpPort.ToString(), false);
|
ConfigSettings.DefaultRegionHttpPort.ToString(), false);
|
||||||
configMember.addConfigurationOption("allow_alternate_ports", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN,
|
|
||||||
"Allow sim to find alternate UDP ports when ports are in use?",
|
|
||||||
"false", true);
|
|
||||||
configMember.addConfigurationOption("external_host_name",
|
configMember.addConfigurationOption("external_host_name",
|
||||||
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
|
||||||
"External Host Name", "127.0.0.1", false);
|
"External Host Name", "127.0.0.1", false);
|
||||||
|
@ -1141,9 +1140,6 @@ namespace OpenSim.Framework
|
||||||
case "internal_ip_port":
|
case "internal_ip_port":
|
||||||
m_internalEndPoint.Port = (int) configuration_result;
|
m_internalEndPoint.Port = (int) configuration_result;
|
||||||
break;
|
break;
|
||||||
case "allow_alternate_ports":
|
|
||||||
m_allow_alternate_ports = (bool) configuration_result;
|
|
||||||
break;
|
|
||||||
case "external_host_name":
|
case "external_host_name":
|
||||||
if ((string) configuration_result != "SYSTEMIP")
|
if ((string) configuration_result != "SYSTEMIP")
|
||||||
{
|
{
|
||||||
|
@ -1220,7 +1216,6 @@ namespace OpenSim.Framework
|
||||||
if ((RemotingAddress != null) && !RemotingAddress.Equals(""))
|
if ((RemotingAddress != null) && !RemotingAddress.Equals(""))
|
||||||
args["remoting_address"] = OSD.FromString(RemotingAddress);
|
args["remoting_address"] = OSD.FromString(RemotingAddress);
|
||||||
args["remoting_port"] = OSD.FromString(RemotingPort.ToString());
|
args["remoting_port"] = OSD.FromString(RemotingPort.ToString());
|
||||||
args["allow_alt_ports"] = OSD.FromBoolean(m_allow_alternate_ports);
|
|
||||||
if ((proxyUrl != null) && !proxyUrl.Equals(""))
|
if ((proxyUrl != null) && !proxyUrl.Equals(""))
|
||||||
args["proxy_url"] = OSD.FromString(proxyUrl);
|
args["proxy_url"] = OSD.FromString(proxyUrl);
|
||||||
if (RegionType != String.Empty)
|
if (RegionType != String.Empty)
|
||||||
|
@ -1275,8 +1270,6 @@ namespace OpenSim.Framework
|
||||||
RemotingAddress = args["remoting_address"].AsString();
|
RemotingAddress = args["remoting_address"].AsString();
|
||||||
if (args["remoting_port"] != null)
|
if (args["remoting_port"] != null)
|
||||||
UInt32.TryParse(args["remoting_port"].AsString(), out m_remotingPort);
|
UInt32.TryParse(args["remoting_port"].AsString(), out m_remotingPort);
|
||||||
if (args["allow_alt_ports"] != null)
|
|
||||||
m_allow_alternate_ports = args["allow_alt_ports"].AsBoolean();
|
|
||||||
if (args["proxy_url"] != null)
|
if (args["proxy_url"] != null)
|
||||||
proxyUrl = args["proxy_url"].AsString();
|
proxyUrl = args["proxy_url"].AsString();
|
||||||
if (args["region_type"] != null)
|
if (args["region_type"] != null)
|
||||||
|
@ -1314,7 +1307,8 @@ namespace OpenSim.Framework
|
||||||
kvp["http_port"] = HttpPort.ToString();
|
kvp["http_port"] = HttpPort.ToString();
|
||||||
kvp["internal_ip_address"] = InternalEndPoint.Address.ToString();
|
kvp["internal_ip_address"] = InternalEndPoint.Address.ToString();
|
||||||
kvp["internal_port"] = InternalEndPoint.Port.ToString();
|
kvp["internal_port"] = InternalEndPoint.Port.ToString();
|
||||||
kvp["alternate_ports"] = m_allow_alternate_ports.ToString();
|
// TODO: Remove in next major version
|
||||||
|
kvp["alternate_ports"] = "False";
|
||||||
kvp["server_uri"] = ServerURI;
|
kvp["server_uri"] = ServerURI;
|
||||||
|
|
||||||
return kvp;
|
return kvp;
|
||||||
|
|
|
@ -1685,6 +1685,8 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
// hide the password in the connection string
|
// hide the password in the connection string
|
||||||
passPosition = connectionString.IndexOf("password", StringComparison.OrdinalIgnoreCase);
|
passPosition = connectionString.IndexOf("password", StringComparison.OrdinalIgnoreCase);
|
||||||
|
if (passPosition == -1)
|
||||||
|
return connectionString;
|
||||||
passPosition = connectionString.IndexOf("=", passPosition);
|
passPosition = connectionString.IndexOf("=", passPosition);
|
||||||
if (passPosition < connectionString.Length)
|
if (passPosition < connectionString.Length)
|
||||||
passPosition += 1;
|
passPosition += 1;
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Threading;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
@ -74,7 +75,7 @@ namespace OpenSim
|
||||||
|
|
||||||
private string m_timedScript = "disabled";
|
private string m_timedScript = "disabled";
|
||||||
private int m_timeInterval = 1200;
|
private int m_timeInterval = 1200;
|
||||||
private Timer m_scriptTimer;
|
private System.Timers.Timer m_scriptTimer;
|
||||||
|
|
||||||
public OpenSim(IConfigSource configSource) : base(configSource)
|
public OpenSim(IConfigSource configSource) : base(configSource)
|
||||||
{
|
{
|
||||||
|
@ -125,6 +126,21 @@ namespace OpenSim
|
||||||
m_log.Info("[OPENSIM MAIN]: Using async_call_method " + Util.FireAndForgetMethod);
|
m_log.Info("[OPENSIM MAIN]: Using async_call_method " + Util.FireAndForgetMethod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Mono.Unix.UnixSignal[] signals;
|
||||||
|
|
||||||
|
|
||||||
|
private Thread signal_thread = new Thread (delegate ()
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
// Wait for a signal to be delivered
|
||||||
|
int index = Mono.Unix.UnixSignal.WaitAny (signals, -1);
|
||||||
|
|
||||||
|
//Mono.Unix.Native.Signum signal = signals [index].Signum;
|
||||||
|
MainConsole.Instance.RunCommand("shutdown");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Performs initialisation of the scene, such as loading configuration from disk.
|
/// Performs initialisation of the scene, such as loading configuration from disk.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -134,6 +150,24 @@ namespace OpenSim
|
||||||
m_log.Info("========================= STARTING OPENSIM =========================");
|
m_log.Info("========================= STARTING OPENSIM =========================");
|
||||||
m_log.Info("====================================================================");
|
m_log.Info("====================================================================");
|
||||||
|
|
||||||
|
if(!Util.IsWindows())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// linux mac os specifics
|
||||||
|
signals = new Mono.Unix.UnixSignal[]
|
||||||
|
{
|
||||||
|
new Mono.Unix.UnixSignal(Mono.Unix.Native.Signum.SIGTERM)
|
||||||
|
};
|
||||||
|
signal_thread.Start();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.Info("Could not set up UNIX signal handlers. SIGTERM will not");
|
||||||
|
m_log.InfoFormat("shut down gracefully: {0}", e.Message);
|
||||||
|
m_log.Debug("Exception was: ", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
//m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString());
|
//m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString());
|
||||||
// http://msdn.microsoft.com/en-us/library/bb384202.aspx
|
// http://msdn.microsoft.com/en-us/library/bb384202.aspx
|
||||||
//GCSettings.LatencyMode = GCLatencyMode.Batch;
|
//GCSettings.LatencyMode = GCLatencyMode.Batch;
|
||||||
|
@ -217,7 +251,7 @@ namespace OpenSim
|
||||||
// Start timer script (run a script every xx seconds)
|
// Start timer script (run a script every xx seconds)
|
||||||
if (m_timedScript != "disabled")
|
if (m_timedScript != "disabled")
|
||||||
{
|
{
|
||||||
m_scriptTimer = new Timer();
|
m_scriptTimer = new System.Timers.Timer();
|
||||||
m_scriptTimer.Enabled = true;
|
m_scriptTimer.Enabled = true;
|
||||||
m_scriptTimer.Interval = m_timeInterval*1000;
|
m_scriptTimer.Interval = m_timeInterval*1000;
|
||||||
m_scriptTimer.Elapsed += RunAutoTimerScript;
|
m_scriptTimer.Elapsed += RunAutoTimerScript;
|
||||||
|
|
|
@ -2704,7 +2704,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
OutPacket(packet, ThrottleOutPacketType.Task);
|
OutPacket(packet, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember,
|
public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] membershipType,
|
||||||
string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
|
string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
|
||||||
UUID partnerID)
|
UUID partnerID)
|
||||||
{
|
{
|
||||||
|
@ -2716,7 +2716,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
else
|
else
|
||||||
avatarReply.PropertiesData.AboutText = Utils.EmptyBytes;
|
avatarReply.PropertiesData.AboutText = Utils.EmptyBytes;
|
||||||
avatarReply.PropertiesData.BornOn = Util.StringToBytes256(bornOn);
|
avatarReply.PropertiesData.BornOn = Util.StringToBytes256(bornOn);
|
||||||
avatarReply.PropertiesData.CharterMember = charterMember;
|
avatarReply.PropertiesData.CharterMember = membershipType;
|
||||||
if (flAbout != null)
|
if (flAbout != null)
|
||||||
avatarReply.PropertiesData.FLAboutText = Util.StringToBytes256(flAbout);
|
avatarReply.PropertiesData.FLAboutText = Util.StringToBytes256(flAbout);
|
||||||
else
|
else
|
||||||
|
|
|
@ -81,7 +81,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
uint port = (uint)scene.RegionInfo.InternalEndPoint.Port;
|
uint port = (uint)scene.RegionInfo.InternalEndPoint.Port;
|
||||||
|
|
||||||
IPAddress listenIP = scene.RegionInfo.InternalEndPoint.Address;
|
IPAddress listenIP = scene.RegionInfo.InternalEndPoint.Address;
|
||||||
Initialise(listenIP, ref port, scene.RegionInfo.ProxyOffset, scene.RegionInfo.m_allow_alternate_ports, m_Config, scene.AuthenticateHandler);
|
Initialise(listenIP, ref port, scene.RegionInfo.ProxyOffset, m_Config, scene.AuthenticateHandler);
|
||||||
scene.RegionInfo.InternalEndPoint.Port = (int)port;
|
scene.RegionInfo.InternalEndPoint.Port = (int)port;
|
||||||
|
|
||||||
AddScene(scene);
|
AddScene(scene);
|
||||||
|
@ -98,9 +98,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public virtual void Initialise(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, AgentCircuitManager circuitManager)
|
public virtual void Initialise(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, IConfigSource configSource, AgentCircuitManager circuitManager)
|
||||||
{
|
{
|
||||||
m_udpServer = new LLUDPServer(listenIP, ref port, proxyPortOffsetParm, allow_alternate_port, configSource, circuitManager);
|
m_udpServer = new LLUDPServer(listenIP, ref port, proxyPortOffsetParm, configSource, circuitManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void AddScene(IScene scene)
|
public virtual void AddScene(IScene scene)
|
||||||
|
@ -430,12 +430,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
public JobEngine OqrEngine { get; protected set; }
|
public JobEngine OqrEngine { get; protected set; }
|
||||||
|
|
||||||
public LLUDPServer(
|
public LLUDPServer(
|
||||||
IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port,
|
IPAddress listenIP, ref uint port, int proxyPortOffsetParm,
|
||||||
IConfigSource configSource, AgentCircuitManager circuitManager)
|
IConfigSource configSource, AgentCircuitManager circuitManager)
|
||||||
: base(listenIP, (int)port)
|
: base(listenIP, (int)port)
|
||||||
{
|
{
|
||||||
#region Environment.TickCount Measurement
|
#region Environment.TickCount Measurement
|
||||||
|
|
||||||
|
// Update the port with the one we actually got
|
||||||
|
port = (uint)Port;
|
||||||
|
|
||||||
// Measure the resolution of Environment.TickCount
|
// Measure the resolution of Environment.TickCount
|
||||||
TickCountResolution = 0f;
|
TickCountResolution = 0f;
|
||||||
for (int i = 0; i < 10; i++)
|
for (int i = 0; i < 10; i++)
|
||||||
|
|
|
@ -107,6 +107,11 @@ namespace OpenMetaverse
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float AverageReceiveTicksForLastSamplePeriod { get; private set; }
|
public float AverageReceiveTicksForLastSamplePeriod { get; private set; }
|
||||||
|
|
||||||
|
public int Port
|
||||||
|
{
|
||||||
|
get { return m_udpPort; }
|
||||||
|
}
|
||||||
|
|
||||||
#region PacketDropDebugging
|
#region PacketDropDebugging
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// For debugging purposes only... random number generator for dropping
|
/// For debugging purposes only... random number generator for dropping
|
||||||
|
@ -217,10 +222,6 @@ namespace OpenMetaverse
|
||||||
SocketType.Dgram,
|
SocketType.Dgram,
|
||||||
ProtocolType.Udp);
|
ProtocolType.Udp);
|
||||||
|
|
||||||
// OpenSim may need this but in AVN, this messes up automated
|
|
||||||
// sim restarts badly
|
|
||||||
//m_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false);
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (m_udpSocket.Ttl < 128)
|
if (m_udpSocket.Ttl < 128)
|
||||||
|
@ -248,13 +249,22 @@ namespace OpenMetaverse
|
||||||
// we never want two regions to listen on the same port as they cannot demultiplex each other's messages,
|
// we never want two regions to listen on the same port as they cannot demultiplex each other's messages,
|
||||||
// leading to a confusing bug.
|
// leading to a confusing bug.
|
||||||
// By default, Windows does not allow two sockets to bind to the same port.
|
// By default, Windows does not allow two sockets to bind to the same port.
|
||||||
m_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false);
|
//
|
||||||
|
// Unfortunately, this also causes a crashed sim to leave the socket in a state
|
||||||
|
// where it appears to be in use but is really just hung from the old process
|
||||||
|
// crashing rather than closing it. While this protects agains misconfiguration,
|
||||||
|
// allowing crashed sims to be started up again right away, rather than having to
|
||||||
|
// wait 2 minutes for the socket to clear is more valuable. Commented 12/13/2016
|
||||||
|
// m_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false);
|
||||||
|
|
||||||
if (recvBufferSize != 0)
|
if (recvBufferSize != 0)
|
||||||
m_udpSocket.ReceiveBufferSize = recvBufferSize;
|
m_udpSocket.ReceiveBufferSize = recvBufferSize;
|
||||||
|
|
||||||
m_udpSocket.Bind(ipep);
|
m_udpSocket.Bind(ipep);
|
||||||
|
|
||||||
|
if (m_udpPort == 0)
|
||||||
|
m_udpPort = ((IPEndPoint)m_udpSocket.LocalEndPoint).Port;
|
||||||
|
|
||||||
IsRunningInbound = true;
|
IsRunningInbound = true;
|
||||||
|
|
||||||
// kick off an async receive. The Start() method will return, the
|
// kick off an async receive. The Start() method will return, the
|
||||||
|
|
|
@ -154,7 +154,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
|
||||||
name = account.FirstName + " " + account.LastName;
|
name = account.FirstName + " " + account.LastName;
|
||||||
created = account.Created;
|
created = account.Created;
|
||||||
}
|
}
|
||||||
Byte[] charterMember = Utils.StringToBytes(name);
|
Byte[] membershipType = Utils.StringToBytes(name);
|
||||||
|
|
||||||
profileUrl = "No profile data";
|
profileUrl = "No profile data";
|
||||||
aboutText = string.Empty;
|
aboutText = string.Empty;
|
||||||
|
@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
|
||||||
remoteClient.SendAvatarProperties(avatarID, aboutText,
|
remoteClient.SendAvatarProperties(avatarID, aboutText,
|
||||||
Util.ToDateTime(created).ToString(
|
Util.ToDateTime(created).ToString(
|
||||||
"M/d/yyyy", CultureInfo.InvariantCulture),
|
"M/d/yyyy", CultureInfo.InvariantCulture),
|
||||||
charterMember, firstLifeAboutText,
|
membershipType, firstLifeAboutText,
|
||||||
(uint)(0 & 0xff),
|
(uint)(0 & 0xff),
|
||||||
firstLifeImage, image, profileUrl, partner);
|
firstLifeImage, image, profileUrl, partner);
|
||||||
|
|
||||||
|
|
|
@ -1009,9 +1009,9 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||||
|
|
||||||
if (p != null && p.isNPC)
|
if (p != null && p.isNPC)
|
||||||
{
|
{
|
||||||
remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, "5/25/1977",
|
remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, ((INPC)(p.ControllingClient)).Born,
|
||||||
Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 16,
|
Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 16,
|
||||||
UUID.Zero, UUID.Zero, "", UUID.Zero);
|
UUID.Zero, ((INPC)(p.ControllingClient)).profileImage, "", UUID.Zero);
|
||||||
remoteClient.SendAvatarInterestsReply(avatarID, 0, "",
|
remoteClient.SendAvatarInterestsReply(avatarID, 0, "",
|
||||||
0, "Getting into trouble", "Droidspeak");
|
0, "Getting into trouble", "Droidspeak");
|
||||||
return;
|
return;
|
||||||
|
@ -1032,7 +1032,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||||
userInfo = new Dictionary<string, object>();
|
userInfo = new Dictionary<string, object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
Byte[] charterMember = new Byte[1];
|
Byte[] membershipType = new Byte[1];
|
||||||
string born = String.Empty;
|
string born = String.Empty;
|
||||||
uint flags = 0x00;
|
uint flags = 0x00;
|
||||||
|
|
||||||
|
@ -1040,11 +1040,11 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||||
{
|
{
|
||||||
if (account.UserTitle == "")
|
if (account.UserTitle == "")
|
||||||
{
|
{
|
||||||
charterMember[0] = (Byte)((account.UserFlags & 0xf00) >> 8);
|
membershipType[0] = (Byte)((account.UserFlags & 0xf00) >> 8);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
charterMember = Utils.StringToBytes(account.UserTitle);
|
membershipType = Utils.StringToBytes(account.UserTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
born = Util.ToDateTime(account.Created).ToString(
|
born = Util.ToDateTime(account.Created).ToString(
|
||||||
|
@ -1057,11 +1057,11 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||||
{
|
{
|
||||||
if ((string)userInfo["user_title"] == "")
|
if ((string)userInfo["user_title"] == "")
|
||||||
{
|
{
|
||||||
charterMember[0] = (Byte)(((Byte)userInfo["user_flags"] & 0xf00) >> 8);
|
membershipType[0] = (Byte)(((Byte)userInfo["user_flags"] & 0xf00) >> 8);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
charterMember = Utils.StringToBytes((string)userInfo["user_title"]);
|
membershipType = Utils.StringToBytes((string)userInfo["user_title"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
int val_born = (int)userInfo["user_created"];
|
int val_born = (int)userInfo["user_created"];
|
||||||
|
@ -1085,7 +1085,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
remoteClient.SendAvatarProperties(props.UserId, props.AboutText, born, charterMember , props.FirstLifeText, flags,
|
remoteClient.SendAvatarProperties(props.UserId, props.AboutText, born, membershipType , props.FirstLifeText, flags,
|
||||||
props.FirstLifeImageId, props.ImageId, props.WebUrl, props.PartnerId);
|
props.FirstLifeImageId, props.ImageId, props.WebUrl, props.PartnerId);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -456,7 +456,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check Default Location (Also See ScenePresence.CompleteMovement)
|
// Check Default Location (Also See ScenePresence.CompleteMovement)
|
||||||
if (position.X == 128f && position.Y == 128f)
|
if (position.X == 128f && position.Y == 128f && position.Z == 22.5f)
|
||||||
position = sp.Scene.RegionInfo.DefaultLandingPoint;
|
position = sp.Scene.RegionInfo.DefaultLandingPoint;
|
||||||
|
|
||||||
// TODO: Get proper AVG Height
|
// TODO: Get proper AVG Height
|
||||||
|
|
|
@ -72,8 +72,6 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
public const int LandUnit = 4;
|
public const int LandUnit = 4;
|
||||||
|
|
||||||
private static readonly string remoteParcelRequestPath = "0009/";
|
|
||||||
|
|
||||||
private LandChannel landChannel;
|
private LandChannel landChannel;
|
||||||
private Scene m_scene;
|
private Scene m_scene;
|
||||||
|
|
||||||
|
@ -1682,12 +1680,13 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
|
|
||||||
private void EventManagerOnRegisterCaps(UUID agentID, Caps caps)
|
private void EventManagerOnRegisterCaps(UUID agentID, Caps caps)
|
||||||
{
|
{
|
||||||
|
//string capsBase = "/CAPS/" + UUID.Random();
|
||||||
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
||||||
caps.RegisterHandler(
|
caps.RegisterHandler(
|
||||||
"RemoteParcelRequest",
|
"RemoteParcelRequest",
|
||||||
new RestStreamHandler(
|
new RestStreamHandler(
|
||||||
"POST",
|
"POST",
|
||||||
capsBase + remoteParcelRequestPath,
|
capsBase,
|
||||||
(request, path, param, httpRequest, httpResponse)
|
(request, path, param, httpRequest, httpResponse)
|
||||||
=> RemoteParcelRequest(request, path, param, agentID, caps),
|
=> RemoteParcelRequest(request, path, param, agentID, caps),
|
||||||
"RemoteParcelRequest",
|
"RemoteParcelRequest",
|
||||||
|
@ -1807,24 +1806,7 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
ArrayList list = (ArrayList)hash["location"];
|
ArrayList list = (ArrayList)hash["location"];
|
||||||
uint x = (uint)(double)list[0];
|
uint x = (uint)(double)list[0];
|
||||||
uint y = (uint)(double)list[1];
|
uint y = (uint)(double)list[1];
|
||||||
if(hash.ContainsKey("region_id"))
|
if (hash.ContainsKey("region_handle"))
|
||||||
{
|
|
||||||
UUID regionID = (UUID)hash["region_id"];
|
|
||||||
if (regionID == m_scene.RegionInfo.RegionID)
|
|
||||||
{
|
|
||||||
// a parcel request for a local parcel => no need to query the grid
|
|
||||||
parcelID = Util.BuildFakeParcelID(m_scene.RegionInfo.RegionHandle, x, y);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// a parcel request for a parcel in another region. Ask the grid about the region
|
|
||||||
GridRegion info = m_scene.GridService.GetRegionByUUID(scope, regionID);
|
|
||||||
if (info != null)
|
|
||||||
parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (hash.ContainsKey("region_handle"))
|
|
||||||
{
|
{
|
||||||
// if you do a "About Landmark" on a landmark a second time, the viewer sends the
|
// if you do a "About Landmark" on a landmark a second time, the viewer sends the
|
||||||
// region_handle it got earlier via RegionHandleRequest
|
// region_handle it got earlier via RegionHandleRequest
|
||||||
|
@ -1847,6 +1829,24 @@ namespace OpenSim.Region.CoreModules.World.Land
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(hash.ContainsKey("region_id"))
|
||||||
|
{
|
||||||
|
UUID regionID = (UUID)hash["region_id"];
|
||||||
|
if (regionID == m_scene.RegionInfo.RegionID)
|
||||||
|
{
|
||||||
|
// a parcel request for a local parcel => no need to query the grid
|
||||||
|
parcelID = Util.BuildFakeParcelID(m_scene.RegionInfo.RegionHandle, x, y);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// a parcel request for a parcel in another region. Ask the grid about the region
|
||||||
|
GridRegion info = m_scene.GridService.GetRegionByUUID(scope, regionID);
|
||||||
|
if (info != null)
|
||||||
|
parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (LLSD.LLSDParseException e)
|
catch (LLSD.LLSDParseException e)
|
||||||
|
|
|
@ -216,7 +216,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||||
// while we don't fix the hard-coded urls
|
// while we don't fix the hard-coded urls
|
||||||
if (flags == 2)
|
if (flags == 2)
|
||||||
{
|
{
|
||||||
if (regionInfos.Count == 0)
|
if (regionInfos == null || regionInfos.Count == 0)
|
||||||
remoteClient.SendAgentAlertMessage("No regions found with that name.", true);
|
remoteClient.SendAgentAlertMessage("No regions found with that name.", true);
|
||||||
// else if (regionInfos.Count == 1)
|
// else if (regionInfos.Count == 1)
|
||||||
// remoteClient.SendAgentAlertMessage("Region found!", false);
|
// remoteClient.SendAgentAlertMessage("Region found!", false);
|
||||||
|
|
|
@ -59,6 +59,8 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
UUID ActiveGroupId { get; set; }
|
UUID ActiveGroupId { get; set; }
|
||||||
UUID Owner { get; }
|
UUID Owner { get; }
|
||||||
string profileAbout { get; set; }
|
string profileAbout { get; set; }
|
||||||
|
UUID profileImage { get; set; }
|
||||||
|
string Born { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface INPCModule
|
public interface INPCModule
|
||||||
|
|
|
@ -2044,7 +2044,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check Default Location (Also See EntityTransferModule.TeleportAgentWithinRegion)
|
// Check Default Location (Also See EntityTransferModule.TeleportAgentWithinRegion)
|
||||||
if (AbsolutePosition.X == 128f && AbsolutePosition.Y == 128f)
|
if (AbsolutePosition.X == 128f && AbsolutePosition.Y == 128f && AbsolutePosition.Z == 22.5f)
|
||||||
AbsolutePosition = Scene.RegionInfo.DefaultLandingPoint;
|
AbsolutePosition = Scene.RegionInfo.DefaultLandingPoint;
|
||||||
|
|
||||||
if (!MakeRootAgent(AbsolutePosition, flying, ref look))
|
if (!MakeRootAgent(AbsolutePosition, flying, ref look))
|
||||||
|
@ -2125,11 +2125,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (!gotCrossUpdate && !isNPC)
|
if (!gotCrossUpdate && !isNPC)
|
||||||
Scene.SendLayerData(ControllingClient);
|
Scene.SendLayerData(ControllingClient);
|
||||||
|
|
||||||
// HG delay
|
// HG
|
||||||
if((m_teleportFlags & TeleportFlags.ViaHGLogin) != 0)
|
bool isHGTP = (m_teleportFlags & TeleportFlags.ViaHGLogin) != 0;
|
||||||
|
if(isHGTP)
|
||||||
{
|
{
|
||||||
Thread.Sleep(500);
|
// ControllingClient.SendNameReply(m_uuid, Firstname, Lastname);
|
||||||
m_log.DebugFormat("[CompleteMovement] HG delay: {0}ms", Util.EnvironmentTickCountSubtract(ts));
|
m_log.DebugFormat("[CompleteMovement] HG");
|
||||||
}
|
}
|
||||||
|
|
||||||
m_previusParcelHide = false;
|
m_previusParcelHide = false;
|
||||||
|
@ -2151,7 +2152,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
cachedbaked = true;
|
cachedbaked = true;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (m_scene.AvatarFactory != null)
|
if (m_scene.AvatarFactory != null && !isHGTP)
|
||||||
cachedbaked = m_scene.AvatarFactory.ValidateBakedTextureCache(this);
|
cachedbaked = m_scene.AvatarFactory.ValidateBakedTextureCache(this);
|
||||||
|
|
||||||
// not sure we need this
|
// not sure we need this
|
||||||
|
|
|
@ -1247,7 +1247,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] charterMember, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID)
|
public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] membershipType, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -268,8 +268,12 @@ namespace OpenSim.Region.DataSnapshot.Providers
|
||||||
{
|
{
|
||||||
XmlNode username = nodeFactory.CreateNode(XmlNodeType.Element, "name", "");
|
XmlNode username = nodeFactory.CreateNode(XmlNodeType.Element, "name", "");
|
||||||
UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, userOwnerUUID);
|
UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, userOwnerUUID);
|
||||||
username.InnerText = account.FirstName + " " + account.LastName;
|
if(account != null)
|
||||||
|
username.InnerText = account.FirstName + " " + account.LastName;
|
||||||
|
else
|
||||||
|
username.InnerText = "UnKnown";
|
||||||
userblock.AppendChild(username);
|
userblock.AppendChild(username);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|
|
@ -70,6 +70,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
private readonly UUID m_ownerID;
|
private readonly UUID m_ownerID;
|
||||||
private UUID m_hostGroupID;
|
private UUID m_hostGroupID;
|
||||||
private string m_profileAbout = "";
|
private string m_profileAbout = "";
|
||||||
|
private UUID m_profileImage = UUID.Zero;
|
||||||
|
private string m_born;
|
||||||
public List<uint> SelectedObjects {get; private set;}
|
public List<uint> SelectedObjects {get; private set;}
|
||||||
|
|
||||||
public NPCAvatar(
|
public NPCAvatar(
|
||||||
|
@ -109,6 +111,13 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
m_profileAbout = value;
|
m_profileAbout = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public UUID profileImage
|
||||||
|
{
|
||||||
|
get { return m_profileImage; }
|
||||||
|
set { m_profileImage = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public IScene Scene
|
public IScene Scene
|
||||||
{
|
{
|
||||||
get { return m_scene; }
|
get { return m_scene; }
|
||||||
|
@ -611,6 +620,12 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
set { }
|
set { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string Born
|
||||||
|
{
|
||||||
|
get { return m_born; }
|
||||||
|
set { m_born = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public bool IsGroupMember(UUID groupID)
|
public bool IsGroupMember(UUID groupID)
|
||||||
{
|
{
|
||||||
return (m_hostGroupID == groupID);
|
return (m_hostGroupID == groupID);
|
||||||
|
@ -974,7 +989,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember,
|
public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] membershipType,
|
||||||
string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
|
string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
|
||||||
UUID partnerID)
|
UUID partnerID)
|
||||||
{
|
{
|
||||||
|
|
|
@ -168,6 +168,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
AvatarAppearance appearance)
|
AvatarAppearance appearance)
|
||||||
{
|
{
|
||||||
NPCAvatar npcAvatar = null;
|
NPCAvatar npcAvatar = null;
|
||||||
|
string born = DateTime.UtcNow.ToString();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -222,6 +223,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||||
ScenePresence sp;
|
ScenePresence sp;
|
||||||
if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp))
|
if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp))
|
||||||
{
|
{
|
||||||
|
npcAvatar.Born = born;
|
||||||
npcAvatar.ActiveGroupId = groupID;
|
npcAvatar.ActiveGroupId = groupID;
|
||||||
sp.CompleteMovement(npcAvatar, false);
|
sp.CompleteMovement(npcAvatar, false);
|
||||||
sp.Grouptitle = groupTitle;
|
sp.Grouptitle = groupTitle;
|
||||||
|
|
|
@ -239,7 +239,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
{
|
{
|
||||||
if (m_scene.haveActor(repData.actor))
|
if (m_scene.haveActor(repData.actor))
|
||||||
{
|
{
|
||||||
if (needsMeshing(repData.pbs)) // no need for pbs now?
|
if (needsMeshing(repData)) // no need for pbs now?
|
||||||
{
|
{
|
||||||
repData.comand = meshWorkerCmnds.changefull;
|
repData.comand = meshWorkerCmnds.changefull;
|
||||||
createqueue.Enqueue(repData);
|
createqueue.Enqueue(repData);
|
||||||
|
@ -284,8 +284,9 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pbs"></param>
|
/// <param name="pbs"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool needsMeshing(PrimitiveBaseShape pbs)
|
public bool needsMeshing(ODEPhysRepData repData)
|
||||||
{
|
{
|
||||||
|
PrimitiveBaseShape pbs = repData.pbs;
|
||||||
// check sculpts or meshs
|
// check sculpts or meshs
|
||||||
if (pbs.SculptEntry)
|
if (pbs.SculptEntry)
|
||||||
{
|
{
|
||||||
|
@ -301,6 +302,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
if (forceSimplePrimMeshing)
|
if (forceSimplePrimMeshing)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// convex shapes have no holes
|
||||||
|
ushort profilehollow = pbs.ProfileHollow;
|
||||||
|
if(repData.shapetype == 2)
|
||||||
|
profilehollow = 0;
|
||||||
|
|
||||||
// if it's a standard box or sphere with no cuts, hollows, twist or top shear, return false since ODE can use an internal representation for the prim
|
// if it's a standard box or sphere with no cuts, hollows, twist or top shear, return false since ODE can use an internal representation for the prim
|
||||||
|
|
||||||
if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight)
|
if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight)
|
||||||
|
@ -309,7 +315,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
{
|
{
|
||||||
|
|
||||||
if (pbs.ProfileBegin == 0 && pbs.ProfileEnd == 0
|
if (pbs.ProfileBegin == 0 && pbs.ProfileEnd == 0
|
||||||
&& pbs.ProfileHollow == 0
|
&& profilehollow == 0
|
||||||
&& pbs.PathTwist == 0 && pbs.PathTwistBegin == 0
|
&& pbs.PathTwist == 0 && pbs.PathTwistBegin == 0
|
||||||
&& pbs.PathBegin == 0 && pbs.PathEnd == 0
|
&& pbs.PathBegin == 0 && pbs.PathEnd == 0
|
||||||
&& pbs.PathTaperX == 0 && pbs.PathTaperY == 0
|
&& pbs.PathTaperX == 0 && pbs.PathTaperY == 0
|
||||||
|
@ -326,7 +332,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
|
|
||||||
int iPropertiesNotSupportedDefault = 0;
|
int iPropertiesNotSupportedDefault = 0;
|
||||||
|
|
||||||
if (pbs.ProfileHollow != 0)
|
if (profilehollow != 0)
|
||||||
iPropertiesNotSupportedDefault++;
|
iPropertiesNotSupportedDefault++;
|
||||||
|
|
||||||
if ((pbs.PathBegin != 0) || pbs.PathEnd != 0)
|
if ((pbs.PathBegin != 0) || pbs.PathEnd != 0)
|
||||||
|
@ -407,7 +413,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
PhysicsActor actor = repData.actor;
|
PhysicsActor actor = repData.actor;
|
||||||
PrimitiveBaseShape pbs = repData.pbs;
|
PrimitiveBaseShape pbs = repData.pbs;
|
||||||
|
|
||||||
if (!needsMeshing(pbs))
|
if (!needsMeshing(repData))
|
||||||
{
|
{
|
||||||
repData.meshState = MeshState.noNeed;
|
repData.meshState = MeshState.noNeed;
|
||||||
repData.hasOBB = false;
|
repData.hasOBB = false;
|
||||||
|
@ -417,17 +423,17 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
IMesh mesh = null;
|
IMesh mesh = null;
|
||||||
|
|
||||||
Vector3 size = repData.size;
|
Vector3 size = repData.size;
|
||||||
byte shapetype = repData.shapetype;
|
|
||||||
|
|
||||||
bool convex;
|
|
||||||
|
|
||||||
int clod = (int)LevelOfDetail.High;
|
int clod = (int)LevelOfDetail.High;
|
||||||
|
bool convex;
|
||||||
|
byte shapetype = repData.shapetype;
|
||||||
if (shapetype == 0)
|
if (shapetype == 0)
|
||||||
convex = false;
|
convex = false;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
convex = true;
|
convex = true;
|
||||||
if (pbs.SculptType != (byte)SculptType.Mesh)
|
// sculpts pseudo convex
|
||||||
|
if (pbs.SculptEntry && pbs.SculptType != (byte)SculptType.Mesh)
|
||||||
clod = (int)LevelOfDetail.Low;
|
clod = (int)LevelOfDetail.Low;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -483,7 +489,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
repData.mesh = null;
|
repData.mesh = null;
|
||||||
repData.hasOBB = false;
|
repData.hasOBB = false;
|
||||||
|
|
||||||
if (!needsMeshing(pbs))
|
if (!needsMeshing(repData))
|
||||||
{
|
{
|
||||||
repData.meshState = MeshState.noNeed;
|
repData.meshState = MeshState.noNeed;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -349,7 +349,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!GenerateCoordsAndFacesFromPrimShapeData(primName, primShape, lod, out coords, out faces))
|
if (!GenerateCoordsAndFacesFromPrimShapeData(primName, primShape, lod, convex, out coords, out faces))
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -942,7 +942,8 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
|
||||||
/// <param name="faces">Faces are added to this list by the method.</param>
|
/// <param name="faces">Faces are added to this list by the method.</param>
|
||||||
/// <returns>true if coords and faces were successfully generated, false if not</returns>
|
/// <returns>true if coords and faces were successfully generated, false if not</returns>
|
||||||
private bool GenerateCoordsAndFacesFromPrimShapeData(
|
private bool GenerateCoordsAndFacesFromPrimShapeData(
|
||||||
string primName, PrimitiveBaseShape primShape, float lod, out List<Coord> coords, out List<Face> faces)
|
string primName, PrimitiveBaseShape primShape, float lod, bool convex,
|
||||||
|
out List<Coord> coords, out List<Face> faces)
|
||||||
{
|
{
|
||||||
PrimMesh primMesh;
|
PrimMesh primMesh;
|
||||||
coords = new List<Coord>();
|
coords = new List<Coord>();
|
||||||
|
@ -970,7 +971,9 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
|
||||||
profileBegin = profileEnd - 0.02f;
|
profileBegin = profileEnd - 0.02f;
|
||||||
|
|
||||||
float profileHollow = (float)primShape.ProfileHollow * 2.0e-5f;
|
float profileHollow = (float)primShape.ProfileHollow * 2.0e-5f;
|
||||||
if (profileHollow > 0.95f)
|
if(convex)
|
||||||
|
profileHollow = 0.0f;
|
||||||
|
else if (profileHollow > 0.95f)
|
||||||
profileHollow = 0.95f;
|
profileHollow = 0.95f;
|
||||||
|
|
||||||
int sides = 4;
|
int sides = 4;
|
||||||
|
|
|
@ -6307,6 +6307,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
return World.RegionInfo.ObjectCapacity.ToString();
|
return World.RegionInfo.ObjectCapacity.ToString();
|
||||||
}
|
}
|
||||||
|
else if (name == "region_object_bonus")
|
||||||
|
{
|
||||||
|
return World.RegionInfo.RegionSettings.ObjectBonus.ToString();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return "";
|
return "";
|
||||||
|
|
|
@ -3001,7 +3001,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
public void osNpcSetProfileAbout(LSL_Key npc, string about)
|
public void osNpcSetProfileAbout(LSL_Key npc, string about)
|
||||||
{
|
{
|
||||||
CheckThreatLevel(ThreatLevel.High, "osNpcCreate");
|
CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileAbout");
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
INPCModule module = World.RequestModuleInterface<INPCModule>();
|
INPCModule module = World.RequestModuleInterface<INPCModule>();
|
||||||
|
@ -3018,6 +3018,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void osNpcSetProfileImage(LSL_Key npc, string image)
|
||||||
|
{
|
||||||
|
CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileImage");
|
||||||
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
INPCModule module = World.RequestModuleInterface<INPCModule>();
|
||||||
|
if (module != null)
|
||||||
|
{
|
||||||
|
UUID npcId = new UUID(npc.m_string);
|
||||||
|
|
||||||
|
if (!module.CheckPermissions(npcId, m_host.OwnerID))
|
||||||
|
return;
|
||||||
|
|
||||||
|
UUID ImageID = new UUID();
|
||||||
|
|
||||||
|
ImageID = ScriptUtils.GetAssetIdFromItemName(m_host, image, (int)AssetType.Texture);
|
||||||
|
|
||||||
|
if (ImageID == null || ImageID == UUID.Zero)
|
||||||
|
{
|
||||||
|
if (!UUID.TryParse(image, out ImageID))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ScenePresence sp = World.GetScenePresence(npcId);
|
||||||
|
if (sp != null)
|
||||||
|
((INPC)(sp.ControllingClient)).profileImage = ImageID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void osNpcSay(LSL_Key npc, string message)
|
public void osNpcSay(LSL_Key npc, string message)
|
||||||
{
|
{
|
||||||
osNpcSay(npc, 0, message);
|
osNpcSay(npc, 0, message);
|
||||||
|
|
|
@ -344,6 +344,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
void osNpcSetRot(LSL_Key npc, rotation rot);
|
void osNpcSetRot(LSL_Key npc, rotation rot);
|
||||||
void osNpcStopMoveToTarget(LSL_Key npc);
|
void osNpcStopMoveToTarget(LSL_Key npc);
|
||||||
void osNpcSetProfileAbout(LSL_Key npc, string about);
|
void osNpcSetProfileAbout(LSL_Key npc, string about);
|
||||||
|
void osNpcSetProfileImage(LSL_Key npc, string image);
|
||||||
void osNpcSay(key npc, string message);
|
void osNpcSay(key npc, string message);
|
||||||
void osNpcSay(key npc, int channel, string message);
|
void osNpcSay(key npc, int channel, string message);
|
||||||
void osNpcShout(key npc, int channel, string message);
|
void osNpcShout(key npc, int channel, string message);
|
||||||
|
|
|
@ -642,6 +642,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
m_OSSL_Functions.osNpcSetProfileAbout(npc, about);
|
m_OSSL_Functions.osNpcSetProfileAbout(npc, about);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void osNpcSetProfileImage(LSL_Key npc, string image)
|
||||||
|
{
|
||||||
|
m_OSSL_Functions.osNpcSetProfileImage(npc, image);
|
||||||
|
}
|
||||||
|
|
||||||
public void osNpcSay(key npc, string message)
|
public void osNpcSay(key npc, string message)
|
||||||
{
|
{
|
||||||
m_OSSL_Functions.osNpcSay(npc, message);
|
m_OSSL_Functions.osNpcSay(npc, message);
|
||||||
|
|
|
@ -125,6 +125,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
|
||||||
hash["hostname"] = regInfo.ExternalHostName;
|
hash["hostname"] = regInfo.ExternalHostName;
|
||||||
hash["http_port"] = regInfo.HttpPort.ToString();
|
hash["http_port"] = regInfo.HttpPort.ToString();
|
||||||
hash["internal_port"] = regInfo.InternalEndPoint.Port.ToString();
|
hash["internal_port"] = regInfo.InternalEndPoint.Port.ToString();
|
||||||
|
hash["server_uri"] = regInfo.ServerURI;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (message != null)
|
if (message != null)
|
||||||
|
|
|
@ -308,11 +308,11 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
about = new OSDMap(0);
|
about = new OSDMap(0);
|
||||||
|
|
||||||
// Check if this user is a grid operator
|
// Check if this user is a grid operator
|
||||||
byte[] charterMember;
|
byte[] membershipType;
|
||||||
if (user["AccessLevel"].AsInteger() >= 200)
|
if (user["AccessLevel"].AsInteger() >= 200)
|
||||||
charterMember = Utils.StringToBytes("Operator");
|
membershipType = Utils.StringToBytes("Operator");
|
||||||
else
|
else
|
||||||
charterMember = Utils.EmptyBytes;
|
membershipType = Utils.EmptyBytes;
|
||||||
|
|
||||||
// Check if the user is online
|
// Check if the user is online
|
||||||
if (client.Scene is Scene)
|
if (client.Scene is Scene)
|
||||||
|
@ -327,7 +327,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
|
||||||
flags |= ProfileFlags.Identified;
|
flags |= ProfileFlags.Identified;
|
||||||
|
|
||||||
client.SendAvatarProperties(avatarID, about["About"].AsString(), user["CreationDate"].AsDate().ToString("M/d/yyyy",
|
client.SendAvatarProperties(avatarID, about["About"].AsString(), user["CreationDate"].AsDate().ToString("M/d/yyyy",
|
||||||
System.Globalization.CultureInfo.InvariantCulture), charterMember, about["FLAbout"].AsString(), (uint)flags,
|
System.Globalization.CultureInfo.InvariantCulture), membershipType, about["FLAbout"].AsString(), (uint)flags,
|
||||||
about["FLImage"].AsUUID(), about["Image"].AsUUID(), about["URL"].AsString(), user["Partner"].AsUUID());
|
about["FLImage"].AsUUID(), about["Image"].AsUUID(), about["URL"].AsString(), user["Partner"].AsUUID());
|
||||||
|
|
||||||
OSDMap interests = null;
|
OSDMap interests = null;
|
||||||
|
|
|
@ -255,11 +255,8 @@ namespace OpenSim.Services.GridService
|
||||||
regionName = parts[2];
|
regionName = parts[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(port == 80)
|
serverURI = "http://"+ host +":"+ port.ToString() + "/";
|
||||||
serverURI = "http://"+ host + "/";
|
}
|
||||||
else
|
|
||||||
serverURI = "http://"+ host +":"+ port.ToString() + "/";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -301,6 +298,10 @@ namespace OpenSim.Services.GridService
|
||||||
if(!string.IsNullOrEmpty(regionName))
|
if(!string.IsNullOrEmpty(regionName))
|
||||||
regionName = regionName.Trim(new char[] { '"', ' ' });
|
regionName = regionName.Trim(new char[] { '"', ' ' });
|
||||||
serverURI = uri.AbsoluteUri;
|
serverURI = uri.AbsoluteUri;
|
||||||
|
if(uri.Port == 80)
|
||||||
|
serverURI = serverURI.Trim(new char[] { '/', ' ' }) +":80/";
|
||||||
|
else if(uri.Port == 443)
|
||||||
|
serverURI = serverURI.Trim(new char[] { '/', ' ' }) +":443/";
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,10 +86,10 @@ namespace OpenSim.Tests.Common
|
||||||
uint port = 0;
|
uint port = 0;
|
||||||
AgentCircuitManager acm = scene.AuthenticateHandler;
|
AgentCircuitManager acm = scene.AuthenticateHandler;
|
||||||
|
|
||||||
TestLLUDPServer udpServer = new TestLLUDPServer(IPAddress.Any, ref port, 0, false, configSource, acm);
|
TestLLUDPServer udpServer = new TestLLUDPServer(IPAddress.Any, ref port, 0, configSource, acm);
|
||||||
udpServer.AddScene(scene);
|
udpServer.AddScene(scene);
|
||||||
|
|
||||||
return udpServer;
|
return udpServer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -990,7 +990,7 @@ namespace OpenSim.Tests.Common
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember,
|
public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] membershipType,
|
||||||
string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
|
string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
|
||||||
UUID partnerID)
|
UUID partnerID)
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,8 +43,8 @@ namespace OpenSim.Tests.Common
|
||||||
{
|
{
|
||||||
public List<Packet> PacketsSent { get; private set; }
|
public List<Packet> PacketsSent { get; private set; }
|
||||||
|
|
||||||
public TestLLUDPServer(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, AgentCircuitManager circuitManager)
|
public TestLLUDPServer(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, IConfigSource configSource, AgentCircuitManager circuitManager)
|
||||||
: base(listenIP, ref port, proxyPortOffsetParm, allow_alternate_port, configSource, circuitManager)
|
: base(listenIP, ref port, proxyPortOffsetParm, configSource, circuitManager)
|
||||||
{
|
{
|
||||||
PacketsSent = new List<Packet>();
|
PacketsSent = new List<Packet>();
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -139,6 +139,8 @@
|
||||||
Allow_osMessageObject = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
|
Allow_osMessageObject = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
|
||||||
Allow_osRegexIsMatch = true
|
Allow_osRegexIsMatch = true
|
||||||
Allow_osGetAvatarHomeURI = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
|
Allow_osGetAvatarHomeURI = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
|
||||||
|
Allow_osNpcSetProfileAbout = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
|
||||||
|
Allow_osNpcSetProfileImage = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
|
||||||
|
|
||||||
; ThreatLevel Moderate
|
; ThreatLevel Moderate
|
||||||
Allow_osDropAttachment = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|
Allow_osDropAttachment = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
|
||||||
|
|
|
@ -1790,6 +1790,7 @@
|
||||||
<Reference name="System.Core"/>
|
<Reference name="System.Core"/>
|
||||||
<Reference name="System.Xml"/>
|
<Reference name="System.Xml"/>
|
||||||
<Reference name="Mono.Addins" path="../../../bin/"/>
|
<Reference name="Mono.Addins" path="../../../bin/"/>
|
||||||
|
<Reference name="Mono.Posix" path="../../../bin/"/>
|
||||||
<Reference name="NDesk.Options" path="../../../bin/"/>
|
<Reference name="NDesk.Options" path="../../../bin/"/>
|
||||||
<Reference name="OpenMetaverseTypes" path="../../../bin/"/>
|
<Reference name="OpenMetaverseTypes" path="../../../bin/"/>
|
||||||
<Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/>
|
<Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/>
|
||||||
|
|
Loading…
Reference in New Issue