aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs38
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs4
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs11
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs20
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs16
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs42
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/INPCModule.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs13
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs2
-rw-r--r--OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs6
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs17
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs26
-rw-r--r--OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs9
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs31
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs5
21 files changed, 188 insertions, 69 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index cf2bf33..3cb999b 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -26,6 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Threading;
29using System.Collections; 30using System.Collections;
30using System.Collections.Generic; 31using System.Collections.Generic;
31using System.Diagnostics; 32using System.Diagnostics;
@@ -74,7 +75,7 @@ namespace OpenSim
74 75
75 private string m_timedScript = "disabled"; 76 private string m_timedScript = "disabled";
76 private int m_timeInterval = 1200; 77 private int m_timeInterval = 1200;
77 private Timer m_scriptTimer; 78 private System.Timers.Timer m_scriptTimer;
78 79
79 public OpenSim(IConfigSource configSource) : base(configSource) 80 public OpenSim(IConfigSource configSource) : base(configSource)
80 { 81 {
@@ -125,6 +126,21 @@ namespace OpenSim
125 m_log.Info("[OPENSIM MAIN]: Using async_call_method " + Util.FireAndForgetMethod); 126 m_log.Info("[OPENSIM MAIN]: Using async_call_method " + Util.FireAndForgetMethod);
126 } 127 }
127 128
129 private static Mono.Unix.UnixSignal[] signals;
130
131
132 private Thread signal_thread = new Thread (delegate ()
133 {
134 while (true)
135 {
136 // Wait for a signal to be delivered
137 int index = Mono.Unix.UnixSignal.WaitAny (signals, -1);
138
139 //Mono.Unix.Native.Signum signal = signals [index].Signum;
140 MainConsole.Instance.RunCommand("shutdown");
141 }
142 });
143
128 /// <summary> 144 /// <summary>
129 /// Performs initialisation of the scene, such as loading configuration from disk. 145 /// Performs initialisation of the scene, such as loading configuration from disk.
130 /// </summary> 146 /// </summary>
@@ -134,6 +150,24 @@ namespace OpenSim
134 m_log.Info("========================= STARTING OPENSIM ========================="); 150 m_log.Info("========================= STARTING OPENSIM =========================");
135 m_log.Info("===================================================================="); 151 m_log.Info("====================================================================");
136 152
153 if(!Util.IsWindows())
154 {
155 try
156 {
157 // linux mac os specifics
158 signals = new Mono.Unix.UnixSignal[]
159 {
160 new Mono.Unix.UnixSignal(Mono.Unix.Native.Signum.SIGTERM)
161 };
162 signal_thread.Start();
163 }
164 catch (Exception e)
165 {
166 m_log.Info("Could not set up UNIX signal handlers. SIGTERM will not");
167 m_log.InfoFormat("shut down gracefully: {0}", e.Message);
168 m_log.Debug("Exception was: ", e);
169 }
170 }
137 //m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString()); 171 //m_log.InfoFormat("[OPENSIM MAIN]: GC Is Server GC: {0}", GCSettings.IsServerGC.ToString());
138 // http://msdn.microsoft.com/en-us/library/bb384202.aspx 172 // http://msdn.microsoft.com/en-us/library/bb384202.aspx
139 //GCSettings.LatencyMode = GCLatencyMode.Batch; 173 //GCSettings.LatencyMode = GCLatencyMode.Batch;
@@ -217,7 +251,7 @@ namespace OpenSim
217 // Start timer script (run a script every xx seconds) 251 // Start timer script (run a script every xx seconds)
218 if (m_timedScript != "disabled") 252 if (m_timedScript != "disabled")
219 { 253 {
220 m_scriptTimer = new Timer(); 254 m_scriptTimer = new System.Timers.Timer();
221 m_scriptTimer.Enabled = true; 255 m_scriptTimer.Enabled = true;
222 m_scriptTimer.Interval = m_timeInterval*1000; 256 m_scriptTimer.Interval = m_timeInterval*1000;
223 m_scriptTimer.Elapsed += RunAutoTimerScript; 257 m_scriptTimer.Elapsed += RunAutoTimerScript;
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index ce7ee98..a69b670 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -2704,7 +2704,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2704 OutPacket(packet, ThrottleOutPacketType.Task); 2704 OutPacket(packet, ThrottleOutPacketType.Task);
2705 } 2705 }
2706 2706
2707 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, 2707 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] membershipType,
2708 string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, 2708 string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
2709 UUID partnerID) 2709 UUID partnerID)
2710 { 2710 {
@@ -2716,7 +2716,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2716 else 2716 else
2717 avatarReply.PropertiesData.AboutText = Utils.EmptyBytes; 2717 avatarReply.PropertiesData.AboutText = Utils.EmptyBytes;
2718 avatarReply.PropertiesData.BornOn = Util.StringToBytes256(bornOn); 2718 avatarReply.PropertiesData.BornOn = Util.StringToBytes256(bornOn);
2719 avatarReply.PropertiesData.CharterMember = charterMember; 2719 avatarReply.PropertiesData.CharterMember = membershipType;
2720 if (flAbout != null) 2720 if (flAbout != null)
2721 avatarReply.PropertiesData.FLAboutText = Util.StringToBytes256(flAbout); 2721 avatarReply.PropertiesData.FLAboutText = Util.StringToBytes256(flAbout);
2722 else 2722 else
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
index a868e3a..cedb9b4 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs
@@ -81,7 +81,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
81 uint port = (uint)scene.RegionInfo.InternalEndPoint.Port; 81 uint port = (uint)scene.RegionInfo.InternalEndPoint.Port;
82 82
83 IPAddress listenIP = scene.RegionInfo.InternalEndPoint.Address; 83 IPAddress listenIP = scene.RegionInfo.InternalEndPoint.Address;
84 Initialise(listenIP, ref port, scene.RegionInfo.ProxyOffset, scene.RegionInfo.m_allow_alternate_ports, m_Config, scene.AuthenticateHandler); 84 Initialise(listenIP, ref port, scene.RegionInfo.ProxyOffset, m_Config, scene.AuthenticateHandler);
85 scene.RegionInfo.InternalEndPoint.Port = (int)port; 85 scene.RegionInfo.InternalEndPoint.Port = (int)port;
86 86
87 AddScene(scene); 87 AddScene(scene);
@@ -98,9 +98,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
98 } 98 }
99 #endregion 99 #endregion
100 100
101 public virtual void Initialise(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, IConfigSource configSource, AgentCircuitManager circuitManager) 101 public virtual void Initialise(IPAddress listenIP, ref uint port, int proxyPortOffsetParm, IConfigSource configSource, AgentCircuitManager circuitManager)
102 { 102 {
103 m_udpServer = new LLUDPServer(listenIP, ref port, proxyPortOffsetParm, allow_alternate_port, configSource, circuitManager); 103 m_udpServer = new LLUDPServer(listenIP, ref port, proxyPortOffsetParm, configSource, circuitManager);
104 } 104 }
105 105
106 public virtual void AddScene(IScene scene) 106 public virtual void AddScene(IScene scene)
@@ -430,12 +430,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
430 public JobEngine OqrEngine { get; protected set; } 430 public JobEngine OqrEngine { get; protected set; }
431 431
432 public LLUDPServer( 432 public LLUDPServer(
433 IPAddress listenIP, ref uint port, int proxyPortOffsetParm, bool allow_alternate_port, 433 IPAddress listenIP, ref uint port, int proxyPortOffsetParm,
434 IConfigSource configSource, AgentCircuitManager circuitManager) 434 IConfigSource configSource, AgentCircuitManager circuitManager)
435 : base(listenIP, (int)port) 435 : base(listenIP, (int)port)
436 { 436 {
437 #region Environment.TickCount Measurement 437 #region Environment.TickCount Measurement
438 438
439 // Update the port with the one we actually got
440 port = (uint)Port;
441
439 // Measure the resolution of Environment.TickCount 442 // Measure the resolution of Environment.TickCount
440 TickCountResolution = 0f; 443 TickCountResolution = 0f;
441 for (int i = 0; i < 10; i++) 444 for (int i = 0; i < 10; i++)
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
index 4d726b4..831381e 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs
@@ -107,6 +107,11 @@ namespace OpenMetaverse
107 /// </summary> 107 /// </summary>
108 public float AverageReceiveTicksForLastSamplePeriod { get; private set; } 108 public float AverageReceiveTicksForLastSamplePeriod { get; private set; }
109 109
110 public int Port
111 {
112 get { return m_udpPort; }
113 }
114
110 #region PacketDropDebugging 115 #region PacketDropDebugging
111 /// <summary> 116 /// <summary>
112 /// For debugging purposes only... random number generator for dropping 117 /// For debugging purposes only... random number generator for dropping
@@ -217,10 +222,6 @@ namespace OpenMetaverse
217 SocketType.Dgram, 222 SocketType.Dgram,
218 ProtocolType.Udp); 223 ProtocolType.Udp);
219 224
220 // OpenSim may need this but in AVN, this messes up automated
221 // sim restarts badly
222 //m_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false);
223
224 try 225 try
225 { 226 {
226 if (m_udpSocket.Ttl < 128) 227 if (m_udpSocket.Ttl < 128)
@@ -248,13 +249,22 @@ namespace OpenMetaverse
248 // we never want two regions to listen on the same port as they cannot demultiplex each other's messages, 249 // we never want two regions to listen on the same port as they cannot demultiplex each other's messages,
249 // leading to a confusing bug. 250 // leading to a confusing bug.
250 // By default, Windows does not allow two sockets to bind to the same port. 251 // By default, Windows does not allow two sockets to bind to the same port.
251 m_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false); 252 //
253 // Unfortunately, this also causes a crashed sim to leave the socket in a state
254 // where it appears to be in use but is really just hung from the old process
255 // crashing rather than closing it. While this protects agains misconfiguration,
256 // allowing crashed sims to be started up again right away, rather than having to
257 // wait 2 minutes for the socket to clear is more valuable. Commented 12/13/2016
258 // m_udpSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, false);
252 259
253 if (recvBufferSize != 0) 260 if (recvBufferSize != 0)
254 m_udpSocket.ReceiveBufferSize = recvBufferSize; 261 m_udpSocket.ReceiveBufferSize = recvBufferSize;
255 262
256 m_udpSocket.Bind(ipep); 263 m_udpSocket.Bind(ipep);
257 264
265 if (m_udpPort == 0)
266 m_udpPort = ((IPEndPoint)m_udpSocket.LocalEndPoint).Port;
267
258 IsRunningInbound = true; 268 IsRunningInbound = true;
259 269
260 // kick off an async receive. The Start() method will return, the 270 // kick off an async receive. The Start() method will return, the
diff --git a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs
index 2bb24ae..0b1dbc7 100644
--- a/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Profile/BasicProfileModule.cs
@@ -154,7 +154,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
154 name = account.FirstName + " " + account.LastName; 154 name = account.FirstName + " " + account.LastName;
155 created = account.Created; 155 created = account.Created;
156 } 156 }
157 Byte[] charterMember = Utils.StringToBytes(name); 157 Byte[] membershipType = Utils.StringToBytes(name);
158 158
159 profileUrl = "No profile data"; 159 profileUrl = "No profile data";
160 aboutText = string.Empty; 160 aboutText = string.Empty;
@@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
166 remoteClient.SendAvatarProperties(avatarID, aboutText, 166 remoteClient.SendAvatarProperties(avatarID, aboutText,
167 Util.ToDateTime(created).ToString( 167 Util.ToDateTime(created).ToString(
168 "M/d/yyyy", CultureInfo.InvariantCulture), 168 "M/d/yyyy", CultureInfo.InvariantCulture),
169 charterMember, firstLifeAboutText, 169 membershipType, firstLifeAboutText,
170 (uint)(0 & 0xff), 170 (uint)(0 & 0xff),
171 firstLifeImage, image, profileUrl, partner); 171 firstLifeImage, image, profileUrl, partner);
172 172
diff --git a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
index 5be8556..5314927 100644
--- a/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/UserProfiles/UserProfileModule.cs
@@ -1009,9 +1009,9 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1009 1009
1010 if (p != null && p.isNPC) 1010 if (p != null && p.isNPC)
1011 { 1011 {
1012 remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, "5/25/1977", 1012 remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, ((INPC)(p.ControllingClient)).Born,
1013 Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 16, 1013 Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 16,
1014 UUID.Zero, UUID.Zero, "", UUID.Zero); 1014 UUID.Zero, ((INPC)(p.ControllingClient)).profileImage, "", UUID.Zero);
1015 remoteClient.SendAvatarInterestsReply(avatarID, 0, "", 1015 remoteClient.SendAvatarInterestsReply(avatarID, 0, "",
1016 0, "Getting into trouble", "Droidspeak"); 1016 0, "Getting into trouble", "Droidspeak");
1017 return; 1017 return;
@@ -1032,7 +1032,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1032 userInfo = new Dictionary<string, object>(); 1032 userInfo = new Dictionary<string, object>();
1033 } 1033 }
1034 1034
1035 Byte[] charterMember = new Byte[1]; 1035 Byte[] membershipType = new Byte[1];
1036 string born = String.Empty; 1036 string born = String.Empty;
1037 uint flags = 0x00; 1037 uint flags = 0x00;
1038 1038
@@ -1040,11 +1040,11 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1040 { 1040 {
1041 if (account.UserTitle == "") 1041 if (account.UserTitle == "")
1042 { 1042 {
1043 charterMember[0] = (Byte)((account.UserFlags & 0xf00) >> 8); 1043 membershipType[0] = (Byte)((account.UserFlags & 0xf00) >> 8);
1044 } 1044 }
1045 else 1045 else
1046 { 1046 {
1047 charterMember = Utils.StringToBytes(account.UserTitle); 1047 membershipType = Utils.StringToBytes(account.UserTitle);
1048 } 1048 }
1049 1049
1050 born = Util.ToDateTime(account.Created).ToString( 1050 born = Util.ToDateTime(account.Created).ToString(
@@ -1057,11 +1057,11 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1057 { 1057 {
1058 if ((string)userInfo["user_title"] == "") 1058 if ((string)userInfo["user_title"] == "")
1059 { 1059 {
1060 charterMember[0] = (Byte)(((Byte)userInfo["user_flags"] & 0xf00) >> 8); 1060 membershipType[0] = (Byte)(((Byte)userInfo["user_flags"] & 0xf00) >> 8);
1061 } 1061 }
1062 else 1062 else
1063 { 1063 {
1064 charterMember = Utils.StringToBytes((string)userInfo["user_title"]); 1064 membershipType = Utils.StringToBytes((string)userInfo["user_title"]);
1065 } 1065 }
1066 1066
1067 int val_born = (int)userInfo["user_created"]; 1067 int val_born = (int)userInfo["user_created"];
@@ -1085,7 +1085,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
1085 return; 1085 return;
1086 } 1086 }
1087 1087
1088 remoteClient.SendAvatarProperties(props.UserId, props.AboutText, born, charterMember , props.FirstLifeText, flags, 1088 remoteClient.SendAvatarProperties(props.UserId, props.AboutText, born, membershipType , props.FirstLifeText, flags,
1089 props.FirstLifeImageId, props.ImageId, props.WebUrl, props.PartnerId); 1089 props.FirstLifeImageId, props.ImageId, props.WebUrl, props.PartnerId);
1090 1090
1091 1091
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index ad094b4..58d6cf2 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -456,7 +456,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
456 } 456 }
457 457
458 // Check Default Location (Also See ScenePresence.CompleteMovement) 458 // Check Default Location (Also See ScenePresence.CompleteMovement)
459 if (position.X == 128f && position.Y == 128f) 459 if (position.X == 128f && position.Y == 128f && position.Z == 22.5f)
460 position = sp.Scene.RegionInfo.DefaultLandingPoint; 460 position = sp.Scene.RegionInfo.DefaultLandingPoint;
461 461
462 // TODO: Get proper AVG Height 462 // TODO: Get proper AVG Height
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
index 98f1f3b..bec5322 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
@@ -72,8 +72,6 @@ namespace OpenSim.Region.CoreModules.World.Land
72 72
73 public const int LandUnit = 4; 73 public const int LandUnit = 4;
74 74
75 private static readonly string remoteParcelRequestPath = "0009/";
76
77 private LandChannel landChannel; 75 private LandChannel landChannel;
78 private Scene m_scene; 76 private Scene m_scene;
79 77
@@ -1682,12 +1680,13 @@ namespace OpenSim.Region.CoreModules.World.Land
1682 1680
1683 private void EventManagerOnRegisterCaps(UUID agentID, Caps caps) 1681 private void EventManagerOnRegisterCaps(UUID agentID, Caps caps)
1684 { 1682 {
1683 //string capsBase = "/CAPS/" + UUID.Random();
1685 string capsBase = "/CAPS/" + caps.CapsObjectPath; 1684 string capsBase = "/CAPS/" + caps.CapsObjectPath;
1686 caps.RegisterHandler( 1685 caps.RegisterHandler(
1687 "RemoteParcelRequest", 1686 "RemoteParcelRequest",
1688 new RestStreamHandler( 1687 new RestStreamHandler(
1689 "POST", 1688 "POST",
1690 capsBase + remoteParcelRequestPath, 1689 capsBase,
1691 (request, path, param, httpRequest, httpResponse) 1690 (request, path, param, httpRequest, httpResponse)
1692 => RemoteParcelRequest(request, path, param, agentID, caps), 1691 => RemoteParcelRequest(request, path, param, agentID, caps),
1693 "RemoteParcelRequest", 1692 "RemoteParcelRequest",
@@ -1807,24 +1806,7 @@ namespace OpenSim.Region.CoreModules.World.Land
1807 ArrayList list = (ArrayList)hash["location"]; 1806 ArrayList list = (ArrayList)hash["location"];
1808 uint x = (uint)(double)list[0]; 1807 uint x = (uint)(double)list[0];
1809 uint y = (uint)(double)list[1]; 1808 uint y = (uint)(double)list[1];
1810 if(hash.ContainsKey("region_id")) 1809 if (hash.ContainsKey("region_handle"))
1811 {
1812 UUID regionID = (UUID)hash["region_id"];
1813 if (regionID == m_scene.RegionInfo.RegionID)
1814 {
1815 // a parcel request for a local parcel => no need to query the grid
1816 parcelID = Util.BuildFakeParcelID(m_scene.RegionInfo.RegionHandle, x, y);
1817 }
1818 else
1819 {
1820 // a parcel request for a parcel in another region. Ask the grid about the region
1821 GridRegion info = m_scene.GridService.GetRegionByUUID(scope, regionID);
1822 if (info != null)
1823 parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y);
1824 }
1825 }
1826
1827 else if (hash.ContainsKey("region_handle"))
1828 { 1810 {
1829 // if you do a "About Landmark" on a landmark a second time, the viewer sends the 1811 // if you do a "About Landmark" on a landmark a second time, the viewer sends the
1830 // region_handle it got earlier via RegionHandleRequest 1812 // region_handle it got earlier via RegionHandleRequest
@@ -1847,6 +1829,24 @@ namespace OpenSim.Region.CoreModules.World.Land
1847 } 1829 }
1848 } 1830 }
1849 } 1831 }
1832 else if(hash.ContainsKey("region_id"))
1833 {
1834 UUID regionID = (UUID)hash["region_id"];
1835 if (regionID == m_scene.RegionInfo.RegionID)
1836 {
1837 // a parcel request for a local parcel => no need to query the grid
1838 parcelID = Util.BuildFakeParcelID(m_scene.RegionInfo.RegionHandle, x, y);
1839 }
1840 else
1841 {
1842 // a parcel request for a parcel in another region. Ask the grid about the region
1843 GridRegion info = m_scene.GridService.GetRegionByUUID(scope, regionID);
1844 if (info != null)
1845 parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y);
1846 }
1847 }
1848
1849
1850 } 1850 }
1851 } 1851 }
1852 catch (LLSD.LLSDParseException e) 1852 catch (LLSD.LLSDParseException e)
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
index d1fe3c7..fb63c6a 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
@@ -216,7 +216,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
216 // while we don't fix the hard-coded urls 216 // while we don't fix the hard-coded urls
217 if (flags == 2) 217 if (flags == 2)
218 { 218 {
219 if (regionInfos.Count == 0) 219 if (regionInfos == null || regionInfos.Count == 0)
220 remoteClient.SendAgentAlertMessage("No regions found with that name.", true); 220 remoteClient.SendAgentAlertMessage("No regions found with that name.", true);
221 // else if (regionInfos.Count == 1) 221 // else if (regionInfos.Count == 1)
222 // remoteClient.SendAgentAlertMessage("Region found!", false); 222 // remoteClient.SendAgentAlertMessage("Region found!", false);
diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
index 1310358..813be4f 100644
--- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
@@ -59,6 +59,8 @@ namespace OpenSim.Region.Framework.Interfaces
59 UUID ActiveGroupId { get; set; } 59 UUID ActiveGroupId { get; set; }
60 UUID Owner { get; } 60 UUID Owner { get; }
61 string profileAbout { get; set; } 61 string profileAbout { get; set; }
62 UUID profileImage { get; set; }
63 string Born { get; set; }
62 } 64 }
63 65
64 public interface INPCModule 66 public interface INPCModule
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 2cf0e9d..463f6c8 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2044,7 +2044,7 @@ namespace OpenSim.Region.Framework.Scenes
2044 } 2044 }
2045 2045
2046 // Check Default Location (Also See EntityTransferModule.TeleportAgentWithinRegion) 2046 // Check Default Location (Also See EntityTransferModule.TeleportAgentWithinRegion)
2047 if (AbsolutePosition.X == 128f && AbsolutePosition.Y == 128f) 2047 if (AbsolutePosition.X == 128f && AbsolutePosition.Y == 128f && AbsolutePosition.Z == 22.5f)
2048 AbsolutePosition = Scene.RegionInfo.DefaultLandingPoint; 2048 AbsolutePosition = Scene.RegionInfo.DefaultLandingPoint;
2049 2049
2050 if (!MakeRootAgent(AbsolutePosition, flying, ref look)) 2050 if (!MakeRootAgent(AbsolutePosition, flying, ref look))
@@ -2125,11 +2125,12 @@ namespace OpenSim.Region.Framework.Scenes
2125 if (!gotCrossUpdate && !isNPC) 2125 if (!gotCrossUpdate && !isNPC)
2126 Scene.SendLayerData(ControllingClient); 2126 Scene.SendLayerData(ControllingClient);
2127 2127
2128 // HG delay 2128 // HG
2129 if((m_teleportFlags & TeleportFlags.ViaHGLogin) != 0) 2129 bool isHGTP = (m_teleportFlags & TeleportFlags.ViaHGLogin) != 0;
2130 if(isHGTP)
2130 { 2131 {
2131 Thread.Sleep(500); 2132// ControllingClient.SendNameReply(m_uuid, Firstname, Lastname);
2132 m_log.DebugFormat("[CompleteMovement] HG delay: {0}ms", Util.EnvironmentTickCountSubtract(ts)); 2133 m_log.DebugFormat("[CompleteMovement] HG");
2133 } 2134 }
2134 2135
2135 m_previusParcelHide = false; 2136 m_previusParcelHide = false;
@@ -2151,7 +2152,7 @@ namespace OpenSim.Region.Framework.Scenes
2151 cachedbaked = true; 2152 cachedbaked = true;
2152 else 2153 else
2153 { 2154 {
2154 if (m_scene.AvatarFactory != null) 2155 if (m_scene.AvatarFactory != null && !isHGTP)
2155 cachedbaked = m_scene.AvatarFactory.ValidateBakedTextureCache(this); 2156 cachedbaked = m_scene.AvatarFactory.ValidateBakedTextureCache(this);
2156 2157
2157 // not sure we need this 2158 // not sure we need this
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 15d31bd..8b8ebe0 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -1247,7 +1247,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
1247 1247
1248 } 1248 }
1249 1249
1250 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] charterMember, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID) 1250 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] membershipType, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID)
1251 { 1251 {
1252 1252
1253 } 1253 }
diff --git a/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs
index 5c791e6..eb2867d 100644
--- a/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs
+++ b/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs
@@ -268,8 +268,12 @@ namespace OpenSim.Region.DataSnapshot.Providers
268 { 268 {
269 XmlNode username = nodeFactory.CreateNode(XmlNodeType.Element, "name", ""); 269 XmlNode username = nodeFactory.CreateNode(XmlNodeType.Element, "name", "");
270 UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, userOwnerUUID); 270 UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, userOwnerUUID);
271 username.InnerText = account.FirstName + " " + account.LastName; 271 if(account != null)
272 username.InnerText = account.FirstName + " " + account.LastName;
273 else
274 username.InnerText = "UnKnown";
272 userblock.AppendChild(username); 275 userblock.AppendChild(username);
276
273 } 277 }
274 catch (Exception) 278 catch (Exception)
275 { 279 {
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 1096eae..0cabe47 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -70,6 +70,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC
70 private readonly UUID m_ownerID; 70 private readonly UUID m_ownerID;
71 private UUID m_hostGroupID; 71 private UUID m_hostGroupID;
72 private string m_profileAbout = ""; 72 private string m_profileAbout = "";
73 private UUID m_profileImage = UUID.Zero;
74 private string m_born;
73 public List<uint> SelectedObjects {get; private set;} 75 public List<uint> SelectedObjects {get; private set;}
74 76
75 public NPCAvatar( 77 public NPCAvatar(
@@ -109,6 +111,13 @@ namespace OpenSim.Region.OptionalModules.World.NPC
109 m_profileAbout = value; 111 m_profileAbout = value;
110 } 112 }
111 } 113 }
114
115 public UUID profileImage
116 {
117 get { return m_profileImage; }
118 set { m_profileImage = value; }
119 }
120
112 public IScene Scene 121 public IScene Scene
113 { 122 {
114 get { return m_scene; } 123 get { return m_scene; }
@@ -611,6 +620,12 @@ namespace OpenSim.Region.OptionalModules.World.NPC
611 set { } 620 set { }
612 } 621 }
613 622
623 public string Born
624 {
625 get { return m_born; }
626 set { m_born = value; }
627 }
628
614 public bool IsGroupMember(UUID groupID) 629 public bool IsGroupMember(UUID groupID)
615 { 630 {
616 return (m_hostGroupID == groupID); 631 return (m_hostGroupID == groupID);
@@ -974,7 +989,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
974 { 989 {
975 } 990 }
976 991
977 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, 992 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] membershipType,
978 string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, 993 string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
979 UUID partnerID) 994 UUID partnerID)
980 { 995 {
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 8462661..ced82e6 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -168,6 +168,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
168 AvatarAppearance appearance) 168 AvatarAppearance appearance)
169 { 169 {
170 NPCAvatar npcAvatar = null; 170 NPCAvatar npcAvatar = null;
171 string born = DateTime.UtcNow.ToString();
171 172
172 try 173 try
173 { 174 {
@@ -222,6 +223,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
222 ScenePresence sp; 223 ScenePresence sp;
223 if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) 224 if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp))
224 { 225 {
226 npcAvatar.Born = born;
225 npcAvatar.ActiveGroupId = groupID; 227 npcAvatar.ActiveGroupId = groupID;
226 sp.CompleteMovement(npcAvatar, false); 228 sp.CompleteMovement(npcAvatar, false);
227 sp.Grouptitle = groupTitle; 229 sp.Grouptitle = groupTitle;
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs
index a977473..bb661e5 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs
@@ -239,7 +239,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
239 { 239 {
240 if (m_scene.haveActor(repData.actor)) 240 if (m_scene.haveActor(repData.actor))
241 { 241 {
242 if (needsMeshing(repData.pbs)) // no need for pbs now? 242 if (needsMeshing(repData)) // no need for pbs now?
243 { 243 {
244 repData.comand = meshWorkerCmnds.changefull; 244 repData.comand = meshWorkerCmnds.changefull;
245 createqueue.Enqueue(repData); 245 createqueue.Enqueue(repData);
@@ -284,8 +284,9 @@ namespace OpenSim.Region.PhysicsModule.ubOde
284 /// </summary> 284 /// </summary>
285 /// <param name="pbs"></param> 285 /// <param name="pbs"></param>
286 /// <returns></returns> 286 /// <returns></returns>
287 public bool needsMeshing(PrimitiveBaseShape pbs) 287 public bool needsMeshing(ODEPhysRepData repData)
288 { 288 {
289 PrimitiveBaseShape pbs = repData.pbs;
289 // check sculpts or meshs 290 // check sculpts or meshs
290 if (pbs.SculptEntry) 291 if (pbs.SculptEntry)
291 { 292 {
@@ -301,6 +302,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde
301 if (forceSimplePrimMeshing) 302 if (forceSimplePrimMeshing)
302 return true; 303 return true;
303 304
305 // convex shapes have no holes
306 ushort profilehollow = pbs.ProfileHollow;
307 if(repData.shapetype == 2)
308 profilehollow = 0;
309
304 // 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 310 // 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
305 311
306 if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight) 312 if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight)
@@ -309,7 +315,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
309 { 315 {
310 316
311 if (pbs.ProfileBegin == 0 && pbs.ProfileEnd == 0 317 if (pbs.ProfileBegin == 0 && pbs.ProfileEnd == 0
312 && pbs.ProfileHollow == 0 318 && profilehollow == 0
313 && pbs.PathTwist == 0 && pbs.PathTwistBegin == 0 319 && pbs.PathTwist == 0 && pbs.PathTwistBegin == 0
314 && pbs.PathBegin == 0 && pbs.PathEnd == 0 320 && pbs.PathBegin == 0 && pbs.PathEnd == 0
315 && pbs.PathTaperX == 0 && pbs.PathTaperY == 0 321 && pbs.PathTaperX == 0 && pbs.PathTaperY == 0
@@ -326,7 +332,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
326 332
327 int iPropertiesNotSupportedDefault = 0; 333 int iPropertiesNotSupportedDefault = 0;
328 334
329 if (pbs.ProfileHollow != 0) 335 if (profilehollow != 0)
330 iPropertiesNotSupportedDefault++; 336 iPropertiesNotSupportedDefault++;
331 337
332 if ((pbs.PathBegin != 0) || pbs.PathEnd != 0) 338 if ((pbs.PathBegin != 0) || pbs.PathEnd != 0)
@@ -407,7 +413,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
407 PhysicsActor actor = repData.actor; 413 PhysicsActor actor = repData.actor;
408 PrimitiveBaseShape pbs = repData.pbs; 414 PrimitiveBaseShape pbs = repData.pbs;
409 415
410 if (!needsMeshing(pbs)) 416 if (!needsMeshing(repData))
411 { 417 {
412 repData.meshState = MeshState.noNeed; 418 repData.meshState = MeshState.noNeed;
413 repData.hasOBB = false; 419 repData.hasOBB = false;
@@ -417,17 +423,17 @@ namespace OpenSim.Region.PhysicsModule.ubOde
417 IMesh mesh = null; 423 IMesh mesh = null;
418 424
419 Vector3 size = repData.size; 425 Vector3 size = repData.size;
420 byte shapetype = repData.shapetype;
421
422 bool convex;
423 426
424 int clod = (int)LevelOfDetail.High; 427 int clod = (int)LevelOfDetail.High;
428 bool convex;
429 byte shapetype = repData.shapetype;
425 if (shapetype == 0) 430 if (shapetype == 0)
426 convex = false; 431 convex = false;
427 else 432 else
428 { 433 {
429 convex = true; 434 convex = true;
430 if (pbs.SculptType != (byte)SculptType.Mesh) 435 // sculpts pseudo convex
436 if (pbs.SculptEntry && pbs.SculptType != (byte)SculptType.Mesh)
431 clod = (int)LevelOfDetail.Low; 437 clod = (int)LevelOfDetail.Low;
432 } 438 }
433 439
@@ -483,7 +489,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
483 repData.mesh = null; 489 repData.mesh = null;
484 repData.hasOBB = false; 490 repData.hasOBB = false;
485 491
486 if (!needsMeshing(pbs)) 492 if (!needsMeshing(repData))
487 { 493 {
488 repData.meshState = MeshState.noNeed; 494 repData.meshState = MeshState.noNeed;
489 return; 495 return;
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
index 2ae0881..7f0713a 100644
--- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
+++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
@@ -349,7 +349,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
349 } 349 }
350 else 350 else
351 { 351 {
352 if (!GenerateCoordsAndFacesFromPrimShapeData(primName, primShape, lod, out coords, out faces)) 352 if (!GenerateCoordsAndFacesFromPrimShapeData(primName, primShape, lod, convex, out coords, out faces))
353 return null; 353 return null;
354 } 354 }
355 355
@@ -942,7 +942,8 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
942 /// <param name="faces">Faces are added to this list by the method.</param> 942 /// <param name="faces">Faces are added to this list by the method.</param>
943 /// <returns>true if coords and faces were successfully generated, false if not</returns> 943 /// <returns>true if coords and faces were successfully generated, false if not</returns>
944 private bool GenerateCoordsAndFacesFromPrimShapeData( 944 private bool GenerateCoordsAndFacesFromPrimShapeData(
945 string primName, PrimitiveBaseShape primShape, float lod, out List<Coord> coords, out List<Face> faces) 945 string primName, PrimitiveBaseShape primShape, float lod, bool convex,
946 out List<Coord> coords, out List<Face> faces)
946 { 947 {
947 PrimMesh primMesh; 948 PrimMesh primMesh;
948 coords = new List<Coord>(); 949 coords = new List<Coord>();
@@ -970,7 +971,9 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
970 profileBegin = profileEnd - 0.02f; 971 profileBegin = profileEnd - 0.02f;
971 972
972 float profileHollow = (float)primShape.ProfileHollow * 2.0e-5f; 973 float profileHollow = (float)primShape.ProfileHollow * 2.0e-5f;
973 if (profileHollow > 0.95f) 974 if(convex)
975 profileHollow = 0.0f;
976 else if (profileHollow > 0.95f)
974 profileHollow = 0.95f; 977 profileHollow = 0.95f;
975 978
976 int sides = 4; 979 int sides = 4;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 71e8ca9..7efdc62 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6307,6 +6307,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6307 { 6307 {
6308 return World.RegionInfo.ObjectCapacity.ToString(); 6308 return World.RegionInfo.ObjectCapacity.ToString();
6309 } 6309 }
6310 else if (name == "region_object_bonus")
6311 {
6312 return World.RegionInfo.RegionSettings.ObjectBonus.ToString();
6313 }
6310 else 6314 else
6311 { 6315 {
6312 return ""; 6316 return "";
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index b101cf9..9742119 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -3001,7 +3001,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3001 3001
3002 public void osNpcSetProfileAbout(LSL_Key npc, string about) 3002 public void osNpcSetProfileAbout(LSL_Key npc, string about)
3003 { 3003 {
3004 CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); 3004 CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileAbout");
3005 m_host.AddScriptLPS(1); 3005 m_host.AddScriptLPS(1);
3006 3006
3007 INPCModule module = World.RequestModuleInterface<INPCModule>(); 3007 INPCModule module = World.RequestModuleInterface<INPCModule>();
@@ -3018,6 +3018,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3018 } 3018 }
3019 } 3019 }
3020 3020
3021 public void osNpcSetProfileImage(LSL_Key npc, string image)
3022 {
3023 CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileImage");
3024 m_host.AddScriptLPS(1);
3025
3026 INPCModule module = World.RequestModuleInterface<INPCModule>();
3027 if (module != null)
3028 {
3029 UUID npcId = new UUID(npc.m_string);
3030
3031 if (!module.CheckPermissions(npcId, m_host.OwnerID))
3032 return;
3033
3034 UUID ImageID = new UUID();
3035
3036 ImageID = ScriptUtils.GetAssetIdFromItemName(m_host, image, (int)AssetType.Texture);
3037
3038 if (ImageID == null || ImageID == UUID.Zero)
3039 {
3040 if (!UUID.TryParse(image, out ImageID))
3041 return;
3042 }
3043
3044 ScenePresence sp = World.GetScenePresence(npcId);
3045 if (sp != null)
3046 ((INPC)(sp.ControllingClient)).profileImage = ImageID;
3047 }
3048 }
3049
3021 public void osNpcSay(LSL_Key npc, string message) 3050 public void osNpcSay(LSL_Key npc, string message)
3022 { 3051 {
3023 osNpcSay(npc, 0, message); 3052 osNpcSay(npc, 0, message);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index 87b0967..cf3e6df 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -344,6 +344,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
344 void osNpcSetRot(LSL_Key npc, rotation rot); 344 void osNpcSetRot(LSL_Key npc, rotation rot);
345 void osNpcStopMoveToTarget(LSL_Key npc); 345 void osNpcStopMoveToTarget(LSL_Key npc);
346 void osNpcSetProfileAbout(LSL_Key npc, string about); 346 void osNpcSetProfileAbout(LSL_Key npc, string about);
347 void osNpcSetProfileImage(LSL_Key npc, string image);
347 void osNpcSay(key npc, string message); 348 void osNpcSay(key npc, string message);
348 void osNpcSay(key npc, int channel, string message); 349 void osNpcSay(key npc, int channel, string message);
349 void osNpcShout(key npc, int channel, string message); 350 void osNpcShout(key npc, int channel, string message);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 5bc998e..2e8a76c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -642,6 +642,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
642 m_OSSL_Functions.osNpcSetProfileAbout(npc, about); 642 m_OSSL_Functions.osNpcSetProfileAbout(npc, about);
643 } 643 }
644 644
645 public void osNpcSetProfileImage(LSL_Key npc, string image)
646 {
647 m_OSSL_Functions.osNpcSetProfileImage(npc, image);
648 }
649
645 public void osNpcSay(key npc, string message) 650 public void osNpcSay(key npc, string message)
646 { 651 {
647 m_OSSL_Functions.osNpcSay(npc, message); 652 m_OSSL_Functions.osNpcSay(npc, message);