aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJonathan Freedman2010-11-05 19:10:02 -0700
committerJonathan Freedman2010-11-05 19:10:02 -0700
commit4f40374464899dad82abdb9c36ea863ceac0d83f (patch)
treea9b116ccca55fb07b8c79ab7f6fdfafc8466d740
parentMerge branch 'master' into mantis5110 (diff)
parentMerge branch 'master' of /var/git/opensim/ (diff)
downloadopensim-SC_OLD-4f40374464899dad82abdb9c36ea863ceac0d83f.zip
opensim-SC_OLD-4f40374464899dad82abdb9c36ea863ceac0d83f.tar.gz
opensim-SC_OLD-4f40374464899dad82abdb9c36ea863ceac0d83f.tar.bz2
opensim-SC_OLD-4f40374464899dad82abdb9c36ea863ceac0d83f.tar.xz
Merge git://github.com/opensim/opensim into mantis5110
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs4
-rw-r--r--OpenSim/Data/MSSQL/MSSQLSimulationData.cs3
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs16
-rw-r--r--OpenSim/Data/Null/NullSimulationData.cs3
-rw-r--r--OpenSim/Data/SQLite/SQLiteSimulationData.cs3
-rw-r--r--OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs3
-rw-r--r--OpenSim/Framework/AvatarAppearance.cs2
-rw-r--r--OpenSim/Framework/AvatarWearable.cs3
-rw-r--r--OpenSim/Framework/Console/RemoteConsole.cs31
-rw-r--r--OpenSim/Framework/MainServer.cs9
-rw-r--r--OpenSim/Framework/RegionInfo.cs1
-rw-r--r--OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs4
-rw-r--r--OpenSim/Region/Application/OpenSim.cs5
-rw-r--r--OpenSim/Region/CoreModules/LightShare/LightShareModule.cs3
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs64
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs7
-rw-r--r--OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs19
-rw-r--r--OpenSim/Region/CoreModules/World/Sound/SoundModule.cs35
-rw-r--r--OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs1
-rw-r--r--OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs63
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs20
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs18
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILS_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LS_Stub.cs4
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationDataService.cs4
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs29
-rw-r--r--OpenSim/Services/PresenceService/PresenceService.cs13
-rw-r--r--OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs10
-rw-r--r--bin/OpenSimDefaults.ini3
-rw-r--r--bin/Robust.ini.example3
32 files changed, 295 insertions, 91 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 72ac303..854307c 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -116,7 +116,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
116 int port = m_config.GetInt("port", 0); 116 int port = m_config.GetInt("port", 0);
117 117
118 m_application = openSim; 118 m_application = openSim;
119 m_httpServer = MainServer.GetHttpServer((uint)port); 119 string bind_ip_address = m_config.GetString("bind_ip_address", "0.0.0.0");
120 IPAddress ipaddr = IPAddress.Parse( bind_ip_address );
121 m_httpServer = MainServer.GetHttpServer((uint)port,ipaddr);
120 122
121 Dictionary<string, XmlRpcMethod> availableMethods = new Dictionary<string, XmlRpcMethod>(); 123 Dictionary<string, XmlRpcMethod> availableMethods = new Dictionary<string, XmlRpcMethod>();
122 availableMethods["admin_create_region"] = XmlRpcCreateRegionMethod; 124 availableMethods["admin_create_region"] = XmlRpcCreateRegionMethod;
diff --git a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs
index 1da52b4..80ec65e 100644
--- a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs
@@ -705,6 +705,9 @@ VALUES
705 //Return default LL windlight settings 705 //Return default LL windlight settings
706 return new RegionLightShareData(); 706 return new RegionLightShareData();
707 } 707 }
708 public void RemoveRegionWindlightSettings(UUID regionID)
709 {
710 }
708 public void StoreRegionWindlightSettings(RegionLightShareData wl) 711 public void StoreRegionWindlightSettings(RegionLightShareData wl)
709 { 712 {
710 //This connector doesn't support the windlight module yet 713 //This connector doesn't support the windlight module yet
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index e2b6953..ae78814 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -817,6 +817,7 @@ namespace OpenSim.Data.MySQL
817 nWP.cloudScrollY = Convert.ToSingle(result["cloud_scroll_y"]); 817 nWP.cloudScrollY = Convert.ToSingle(result["cloud_scroll_y"]);
818 nWP.cloudScrollYLock = Convert.ToBoolean(result["cloud_scroll_y_lock"]); 818 nWP.cloudScrollYLock = Convert.ToBoolean(result["cloud_scroll_y_lock"]);
819 nWP.drawClassicClouds = Convert.ToBoolean(result["draw_classic_clouds"]); 819 nWP.drawClassicClouds = Convert.ToBoolean(result["draw_classic_clouds"]);
820 nWP.valid = true;
820 } 821 }
821 } 822 }
822 } 823 }
@@ -964,6 +965,21 @@ namespace OpenSim.Data.MySQL
964 } 965 }
965 } 966 }
966 967
968 public void RemoveRegionWindlightSettings(UUID regionID)
969 {
970 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
971 {
972 dbcon.Open();
973
974 using (MySqlCommand cmd = dbcon.CreateCommand())
975 {
976 cmd.CommandText = "delete from `regionwindlight` where `region_id`=?regionID";
977 cmd.Parameters.AddWithValue("?regionID", regionID.ToString());
978 ExecuteNonQuery(cmd);
979 }
980 }
981 }
982
967 public void StoreRegionSettings(RegionSettings rs) 983 public void StoreRegionSettings(RegionSettings rs)
968 { 984 {
969 lock (m_dbLock) 985 lock (m_dbLock)
diff --git a/OpenSim/Data/Null/NullSimulationData.cs b/OpenSim/Data/Null/NullSimulationData.cs
index 34d3a4e..eb4e313 100644
--- a/OpenSim/Data/Null/NullSimulationData.cs
+++ b/OpenSim/Data/Null/NullSimulationData.cs
@@ -56,6 +56,9 @@ namespace OpenSim.Data.Null
56 //Return default LL windlight settings 56 //Return default LL windlight settings
57 return new RegionLightShareData(); 57 return new RegionLightShareData();
58 } 58 }
59 public void RemoveRegionWindlightSettings(UUID regionID)
60 {
61 }
59 public void StoreRegionWindlightSettings(RegionLightShareData wl) 62 public void StoreRegionWindlightSettings(RegionLightShareData wl)
60 { 63 {
61 //This connector doesn't support the windlight module yet 64 //This connector doesn't support the windlight module yet
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index 9d49fb6..bade0a1 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -323,6 +323,9 @@ namespace OpenSim.Data.SQLite
323 //Return default LL windlight settings 323 //Return default LL windlight settings
324 return new RegionLightShareData(); 324 return new RegionLightShareData();
325 } 325 }
326 public void RemoveRegionWindlightSettings(UUID regionID)
327 {
328 }
326 public void StoreRegionWindlightSettings(RegionLightShareData wl) 329 public void StoreRegionWindlightSettings(RegionLightShareData wl)
327 { 330 {
328 //This connector doesn't support the windlight module yet 331 //This connector doesn't support the windlight module yet
diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs
index ce18a42..4952cdf 100644
--- a/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLiteLegacy/SQLiteSimulationData.cs
@@ -286,6 +286,9 @@ namespace OpenSim.Data.SQLiteLegacy
286 //Return default LL windlight settings 286 //Return default LL windlight settings
287 return new RegionLightShareData(); 287 return new RegionLightShareData();
288 } 288 }
289 public void RemoveRegionWindlightSettings(UUID regionID)
290 {
291 }
289 public void StoreRegionWindlightSettings(RegionLightShareData wl) 292 public void StoreRegionWindlightSettings(RegionLightShareData wl)
290 { 293 {
291 //This connector doesn't support the windlight module yet 294 //This connector doesn't support the windlight module yet
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs
index d0a22b2..69e1ae6 100644
--- a/OpenSim/Framework/AvatarAppearance.cs
+++ b/OpenSim/Framework/AvatarAppearance.cs
@@ -231,7 +231,7 @@ namespace OpenSim.Framework
231 231
232 protected virtual void SetDefaultParams() 232 protected virtual void SetDefaultParams()
233 { 233 {
234 m_visualparams = new byte[] { 56,23,66,0,0,25,0,124,107,0,0,91,137,36,180,79,78,20,32,255,0,63,137,137,63,122,0,71,127,94,63,0,150,150,150,17,0,0,0,0,0,127,0,0,255,127,114,127,99,63,127,140,127,127,0,0,0,191,0,78,0,0,0,0,0,0,0,0,0,145,216,133,0,0,0,219,107,150,150,165,135,0,150,150,150,63,112,155,150,150,150,150,150,150,150,150,150,150,150,0,0,0,0,188,255,91,219,124,0,150,127,165,127,127,127,127,59,63,107,71,68,89,33,79,114,178,127,2,141,66,0,0,127,127,0,0,0,0,127,0,159,0,0,178,127,0,85,131,117,127,147,163,104,0,140,18,0,107,130,0,150,150,198,0,0,40,38,91,165,209,198,127,127,153,204,51,51,150,150,255,204,0,150,150,150,150,150,150,150,150,150,150,150,0,150,150,150,150,150,0,127,22,150,150,150,150,150,150,150,150,0,0,150,51,132,150,150,150 }; 234 m_visualparams = new byte[] { 33,61,85,23,58,127,63,85,63,42,0,85,63,36,85,95,153,63,34,0,63,109,88,132,63,136,81,85,103,136,127,0,150,150,150,127,0,0,0,0,0,127,0,0,255,127,114,127,99,63,127,140,127,127,0,0,0,191,0,104,0,0,0,0,0,0,0,0,0,145,216,133,0,127,0,127,170,0,0,127,127,109,85,127,127,63,85,42,150,150,150,150,150,150,150,25,150,150,150,0,127,0,0,144,85,127,132,127,85,0,127,127,127,127,127,127,59,127,85,127,127,106,47,79,127,127,204,2,141,66,0,0,127,127,0,0,0,0,127,0,159,0,0,178,127,36,85,131,127,127,127,153,95,0,140,75,27,127,127,0,150,150,198,0,0,63,30,127,165,209,198,127,127,153,204,51,51,255,255,255,204,0,255,150,150,150,150,150,150,150,150,150,150,0,150,150,150,150,150,0,127,127,150,150,150,150,150,150,150,150,0,0,150,51,132,150,150,150 };
235// for (int i = 0; i < VISUALPARAM_COUNT; i++) 235// for (int i = 0; i < VISUALPARAM_COUNT; i++)
236// { 236// {
237// m_visualparams[i] = 150; 237// m_visualparams[i] = 150;
diff --git a/OpenSim/Framework/AvatarWearable.cs b/OpenSim/Framework/AvatarWearable.cs
index efec50b..0809ab6 100644
--- a/OpenSim/Framework/AvatarWearable.cs
+++ b/OpenSim/Framework/AvatarWearable.cs
@@ -221,9 +221,6 @@ namespace OpenSim.Framework
221 { 221 {
222 get 222 get
223 { 223 {
224 if (defaultWearables != null)
225 return defaultWearables;
226
227 defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these 224 defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these
228 for (int i = 0; i < MAX_WEARABLES; i++) 225 for (int i = 0; i < MAX_WEARABLES; i++)
229 { 226 {
diff --git a/OpenSim/Framework/Console/RemoteConsole.cs b/OpenSim/Framework/Console/RemoteConsole.cs
index 7eb289b..07de27a 100644
--- a/OpenSim/Framework/Console/RemoteConsole.cs
+++ b/OpenSim/Framework/Console/RemoteConsole.cs
@@ -32,6 +32,7 @@ using System.Collections.Generic;
32using System.Diagnostics; 32using System.Diagnostics;
33using System.Reflection; 33using System.Reflection;
34using System.Text; 34using System.Text;
35using System.Text.RegularExpressions;
35using System.Threading; 36using System.Threading;
36using OpenMetaverse; 37using OpenMetaverse;
37using Nini.Config; 38using Nini.Config;
@@ -62,6 +63,7 @@ namespace OpenSim.Framework.Console
62 new Dictionary<UUID, ConsoleConnection>(); 63 new Dictionary<UUID, ConsoleConnection>();
63 private string m_UserName = String.Empty; 64 private string m_UserName = String.Empty;
64 private string m_Password = String.Empty; 65 private string m_Password = String.Empty;
66 private string m_AllowedOrigin = String.Empty;
65 67
66 public RemoteConsole(string defaultPrompt) : base(defaultPrompt) 68 public RemoteConsole(string defaultPrompt) : base(defaultPrompt)
67 { 69 {
@@ -77,6 +79,7 @@ namespace OpenSim.Framework.Console
77 79
78 m_UserName = netConfig.GetString("ConsoleUser", String.Empty); 80 m_UserName = netConfig.GetString("ConsoleUser", String.Empty);
79 m_Password = netConfig.GetString("ConsolePass", String.Empty); 81 m_Password = netConfig.GetString("ConsolePass", String.Empty);
82 m_AllowedOrigin = netConfig.GetString("ConsoleAllowedOrigin", String.Empty);
80 } 83 }
81 84
82 public void SetServer(IHttpServer server) 85 public void SetServer(IHttpServer server)
@@ -150,6 +153,29 @@ namespace OpenSim.Framework.Console
150 return cmdinput; 153 return cmdinput;
151 } 154 }
152 155
156 private Hashtable CheckOrigin(Hashtable result)
157 {
158 if (!string.IsNullOrEmpty(m_AllowedOrigin))
159 result["access_control_allow_origin"] = m_AllowedOrigin;
160 return result;
161 }
162 /* TODO: Figure out how PollServiceHTTPHandler can access the request headers
163 * in order to use m_AllowedOrigin as a regular expression
164 private Hashtable CheckOrigin(Hashtable headers, Hashtable result)
165 {
166 if (!string.IsNullOrEmpty(m_AllowedOrigin))
167 {
168 if (headers.ContainsKey("origin"))
169 {
170 string origin = headers["origin"].ToString();
171 if (Regex.IsMatch(origin, m_AllowedOrigin))
172 result["access_control_allow_origin"] = origin;
173 }
174 }
175 return result;
176 }
177 */
178
153 private void DoExpire() 179 private void DoExpire()
154 { 180 {
155 List<UUID> expired = new List<UUID>(); 181 List<UUID> expired = new List<UUID>();
@@ -235,6 +261,7 @@ namespace OpenSim.Framework.Console
235 reply["str_response_string"] = xmldoc.InnerXml; 261 reply["str_response_string"] = xmldoc.InnerXml;
236 reply["int_response_code"] = 200; 262 reply["int_response_code"] = 200;
237 reply["content_type"] = "text/xml"; 263 reply["content_type"] = "text/xml";
264 reply = CheckOrigin(reply);
238 265
239 return reply; 266 return reply;
240 } 267 }
@@ -289,6 +316,7 @@ namespace OpenSim.Framework.Console
289 reply["str_response_string"] = xmldoc.InnerXml; 316 reply["str_response_string"] = xmldoc.InnerXml;
290 reply["int_response_code"] = 200; 317 reply["int_response_code"] = 200;
291 reply["content_type"] = "text/xml"; 318 reply["content_type"] = "text/xml";
319 reply = CheckOrigin(reply);
292 320
293 return reply; 321 return reply;
294 } 322 }
@@ -344,6 +372,7 @@ namespace OpenSim.Framework.Console
344 reply["str_response_string"] = xmldoc.InnerXml; 372 reply["str_response_string"] = xmldoc.InnerXml;
345 reply["int_response_code"] = 200; 373 reply["int_response_code"] = 200;
346 reply["content_type"] = "text/xml"; 374 reply["content_type"] = "text/xml";
375 reply = CheckOrigin(reply);
347 376
348 return reply; 377 return reply;
349 } 378 }
@@ -457,6 +486,7 @@ namespace OpenSim.Framework.Console
457 result["content_type"] = "application/xml"; 486 result["content_type"] = "application/xml";
458 result["keepalive"] = false; 487 result["keepalive"] = false;
459 result["reusecontext"] = false; 488 result["reusecontext"] = false;
489 result = CheckOrigin(result);
460 490
461 return result; 491 return result;
462 } 492 }
@@ -480,6 +510,7 @@ namespace OpenSim.Framework.Console
480 result["content_type"] = "text/xml"; 510 result["content_type"] = "text/xml";
481 result["keepalive"] = false; 511 result["keepalive"] = false;
482 result["reusecontext"] = false; 512 result["reusecontext"] = false;
513 result = CheckOrigin(result);
483 514
484 return result; 515 return result;
485 } 516 }
diff --git a/OpenSim/Framework/MainServer.cs b/OpenSim/Framework/MainServer.cs
index 1f5f208..8ccabec 100644
--- a/OpenSim/Framework/MainServer.cs
+++ b/OpenSim/Framework/MainServer.cs
@@ -27,6 +27,7 @@
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Reflection; 29using System.Reflection;
30using System.Net;
30using log4net; 31using log4net;
31using OpenSim.Framework.Servers.HttpServer; 32using OpenSim.Framework.Servers.HttpServer;
32 33
@@ -48,6 +49,11 @@ namespace OpenSim.Framework
48 49
49 public static IHttpServer GetHttpServer(uint port) 50 public static IHttpServer GetHttpServer(uint port)
50 { 51 {
52 return GetHttpServer(port,null);
53 }
54
55 public static IHttpServer GetHttpServer(uint port, IPAddress ipaddr)
56 {
51 if (port == 0) 57 if (port == 0)
52 return Instance; 58 return Instance;
53 if (instance != null && port == Instance.Port) 59 if (instance != null && port == Instance.Port)
@@ -58,6 +64,9 @@ namespace OpenSim.Framework
58 64
59 m_Servers[port] = new BaseHttpServer(port); 65 m_Servers[port] = new BaseHttpServer(port);
60 66
67 if (ipaddr != null )
68 m_Servers[port].ListenIPAddress = ipaddr;
69
61 m_log.InfoFormat("[MAIN HTTP SERVER]: Starting main http server on port {0}", port); 70 m_log.InfoFormat("[MAIN HTTP SERVER]: Starting main http server on port {0}", port);
62 m_Servers[port].Start(); 71 m_Servers[port].Start();
63 72
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 73b8bd0..680e702 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -42,6 +42,7 @@ namespace OpenSim.Framework
42{ 42{
43 public class RegionLightShareData : ICloneable 43 public class RegionLightShareData : ICloneable
44 { 44 {
45 public bool valid = false;
45 public UUID regionID = UUID.Zero; 46 public UUID regionID = UUID.Zero;
46 public Vector3 waterColor = new Vector3(4.0f,38.0f,64.0f); 47 public Vector3 waterColor = new Vector3(4.0f,38.0f,64.0f);
47 public float waterFogDensityExponent = 4.0f; 48 public float waterFogDensityExponent = 4.0f;
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
index 0c1e5e0..3c58a7d 100644
--- a/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -1450,6 +1450,10 @@ namespace OpenSim.Framework.Servers.HttpServer
1450 if (responsedata.ContainsKey("reusecontext")) 1450 if (responsedata.ContainsKey("reusecontext"))
1451 response.ReuseContext = (bool) responsedata["reusecontext"]; 1451 response.ReuseContext = (bool) responsedata["reusecontext"];
1452 1452
1453 // Cross-Origin Resource Sharing with simple requests
1454 if (responsedata.ContainsKey("access_control_allow_origin"))
1455 response.AddHeader("Access-Control-Allow-Origin", (string)responsedata["access_control_allow_origin"]);
1456
1453 //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this 1457 //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this
1454 //and should check for NullReferenceExceptions 1458 //and should check for NullReferenceExceptions
1455 1459
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 7a0142f..f80cb34 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -264,9 +264,10 @@ namespace OpenSim
264 LoadOar); 264 LoadOar);
265 265
266 m_console.Commands.AddCommand("region", false, "save oar", 266 m_console.Commands.AddCommand("region", false, "save oar",
267 "save oar [<OAR path>]", 267 "save oar [-v|version=N] [<OAR path>]",
268 "Save a region's data to an OAR archive.", 268 "Save a region's data to an OAR archive.",
269 "The OAR path must be a filesystem path." 269 "-v|version=N generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine
270 + "The OAR path must be a filesystem path."
270 + " If this is not given then the oar is saved to region.oar in the current directory.", 271 + " If this is not given then the oar is saved to region.oar in the current directory.",
271 SaveOar); 272 SaveOar);
272 273
diff --git a/OpenSim/Region/CoreModules/LightShare/LightShareModule.cs b/OpenSim/Region/CoreModules/LightShare/LightShareModule.cs
index 412dbb6..88f392d 100644
--- a/OpenSim/Region/CoreModules/LightShare/LightShareModule.cs
+++ b/OpenSim/Region/CoreModules/LightShare/LightShareModule.cs
@@ -194,7 +194,8 @@ namespace OpenSim.Region.CoreModules.World.LightShare
194 } 194 }
195 private void EventManager_OnSaveNewWindlightProfile() 195 private void EventManager_OnSaveNewWindlightProfile()
196 { 196 {
197 m_scene.ForEachScenePresence(SendProfileToClient); 197 if (m_scene.RegionInfo.WindlightSettings.valid)
198 m_scene.ForEachScenePresence(SendProfileToClient);
198 } 199 }
199 200
200 public void PostInitialise() 201 public void PostInitialise()
diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
index c23cea5..ed3e516 100644
--- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs
@@ -176,44 +176,44 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
176 stream = response.GetResponseStream(); 176 stream = response.GetResponseStream();
177 if (stream != null) 177 if (stream != null)
178 { 178 {
179 Bitmap image = new Bitmap(stream);
180 Size newsize;
181
182 // TODO: make this a bit less hard coded
183 if ((image.Height < 64) && (image.Width < 64))
184 {
185 newsize = new Size(32, 32);
186 }
187 else if ((image.Height < 128) && (image.Width < 128))
188 {
189 newsize = new Size(64, 64);
190 }
191 else if ((image.Height < 256) && (image.Width < 256))
192 {
193 newsize = new Size(128, 128);
194 }
195 else if ((image.Height < 512 && image.Width < 512))
196 {
197 newsize = new Size(256, 256);
198 }
199 else if ((image.Height < 1024 && image.Width < 1024))
200 {
201 newsize = new Size(512, 512);
202 }
203 else
204 {
205 newsize = new Size(1024, 1024);
206 }
207
208 Bitmap resize = new Bitmap(image, newsize);
209
210 try 179 try
211 { 180 {
181 Bitmap image = new Bitmap(stream);
182 Size newsize;
183
184 // TODO: make this a bit less hard coded
185 if ((image.Height < 64) && (image.Width < 64))
186 {
187 newsize = new Size(32, 32);
188 }
189 else if ((image.Height < 128) && (image.Width < 128))
190 {
191 newsize = new Size(64, 64);
192 }
193 else if ((image.Height < 256) && (image.Width < 256))
194 {
195 newsize = new Size(128, 128);
196 }
197 else if ((image.Height < 512 && image.Width < 512))
198 {
199 newsize = new Size(256, 256);
200 }
201 else if ((image.Height < 1024 && image.Width < 1024))
202 {
203 newsize = new Size(512, 512);
204 }
205 else
206 {
207 newsize = new Size(1024, 1024);
208 }
209
210 Bitmap resize = new Bitmap(image, newsize);
211
212 imageJ2000 = OpenJPEG.EncodeFromImage(resize, true); 212 imageJ2000 = OpenJPEG.EncodeFromImage(resize, true);
213 } 213 }
214 catch (Exception) 214 catch (Exception)
215 { 215 {
216 m_log.Error("[LOADIMAGEURLMODULE]: OpenJpeg Encode Failed. Empty byte data returned!"); 216 m_log.Error("[LOADIMAGEURLMODULE]: OpenJpeg Conversion Failed. Empty byte data returned!");
217 } 217 }
218 } 218 }
219 else 219 else
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
index c062833..f8a599a 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestExecution.cs
@@ -137,16 +137,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver
137 137
138 m_log.InfoFormat("[ARCHIVER]: Added terrain information to archive."); 138 m_log.InfoFormat("[ARCHIVER]: Added terrain information to archive.");
139 139
140 Dictionary<string, object> serializationOptions = new Dictionary<string, object>(); 140
141// if (m_options.ContainsKey("version") && (string)m_options["version"] == "0")
142// serializationOptions["old-guids"] = true;
143
144 // Write out scene object metadata 141 // Write out scene object metadata
145 foreach (SceneObjectGroup sceneObject in m_sceneObjects) 142 foreach (SceneObjectGroup sceneObject in m_sceneObjects)
146 { 143 {
147 //m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType()); 144 //m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType());
148 145
149 string serializedObject = m_serialiser.SerializeGroupToXml2(sceneObject, serializationOptions); 146 string serializedObject = m_serialiser.SerializeGroupToXml2(sceneObject, m_options);
150 m_archiveWriter.WriteFile(ArchiveHelpers.CreateObjectPath(sceneObject), serializedObject); 147 m_archiveWriter.WriteFile(ArchiveHelpers.CreateObjectPath(sceneObject), serializedObject);
151 } 148 }
152 149
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
index 3182079..0567a82 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs
@@ -187,20 +187,17 @@ namespace OpenSim.Region.CoreModules.World.Archiver
187 /// <returns></returns> 187 /// <returns></returns>
188 public static string Create0p2ControlFile(Dictionary<string, object> options) 188 public static string Create0p2ControlFile(Dictionary<string, object> options)
189 { 189 {
190 int majorVersion = 0, minorVersion = 4; 190 int majorVersion = 0, minorVersion = 5;
191 191
192 /* 192 if (options.ContainsKey("version"))
193 if (options.ContainsKey("version") && (string)options["version"] == "0")
194 {
195 majorVersion = 0;
196 minorVersion = 3;
197 }
198 else
199 { 193 {
200 majorVersion = 1;
201 minorVersion = 0; 194 minorVersion = 0;
195 string[] parts = options["version"].ToString().Split('.');
196 if (parts.Length >= 1)
197 majorVersion = Int32.Parse(parts[0]);
198 if (parts.Length >= 2)
199 minorVersion = Int32.Parse(parts[1]);
202 } 200 }
203 */
204 201
205 m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion); 202 m_log.InfoFormat("[ARCHIVER]: Creating version {0}.{1} OAR", majorVersion, minorVersion);
206// if (majorVersion == 1) 203// if (majorVersion == 1)
diff --git a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
index a52fea4..8df645d 100644
--- a/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
+++ b/OpenSim/Region/CoreModules/World/Sound/SoundModule.cs
@@ -31,12 +31,14 @@ using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Framework.Interfaces; 32using OpenSim.Region.Framework.Interfaces;
33using OpenSim.Region.Framework.Scenes; 33using OpenSim.Region.Framework.Scenes;
34using System.Reflection;
35using log4net;
34 36
35namespace OpenSim.Region.CoreModules.World.Sound 37namespace OpenSim.Region.CoreModules.World.Sound
36{ 38{
37 public class SoundModule : IRegionModule, ISoundModule 39 public class SoundModule : IRegionModule, ISoundModule
38 { 40 {
39 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 41 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
40 42
41 protected Scene m_scene; 43 protected Scene m_scene;
42 44
@@ -62,6 +64,12 @@ namespace OpenSim.Region.CoreModules.World.Sound
62 public virtual void PlayAttachedSound( 64 public virtual void PlayAttachedSound(
63 UUID soundID, UUID ownerID, UUID objectID, double gain, Vector3 position, byte flags, float radius) 65 UUID soundID, UUID ownerID, UUID objectID, double gain, Vector3 position, byte flags, float radius)
64 { 66 {
67 SceneObjectPart part = m_scene.GetSceneObjectPart(objectID);
68 if (part == null)
69 return;
70
71 SceneObjectGroup grp = part.ParentGroup;
72
65 m_scene.ForEachScenePresence(delegate(ScenePresence sp) 73 m_scene.ForEachScenePresence(delegate(ScenePresence sp)
66 { 74 {
67 if (sp.IsChildAgent) 75 if (sp.IsChildAgent)
@@ -71,12 +79,25 @@ namespace OpenSim.Region.CoreModules.World.Sound
71 if (dis > 100.0) // Max audio distance 79 if (dis > 100.0) // Max audio distance
72 return; 80 return;
73 81
82 if (grp.IsAttachment)
83 {
84 if (grp.GetAttachmentPoint() > 30) // HUD
85 {
86 if (sp.ControllingClient.AgentId != grp.OwnerID)
87 return;
88 }
89
90 if (sp.ControllingClient.AgentId == grp.OwnerID)
91 dis = 0;
92 }
93
74 // Scale by distance 94 // Scale by distance
75 if (radius == 0) 95 if (radius == 0)
76 gain = (float)((double)gain * ((100.0 - dis) / 100.0)); 96 gain = (float)((double)gain * ((100.0 - dis) / 100.0));
77 else 97 else
78 gain = (float)((double)gain * ((radius - dis) / radius)); 98 gain = (float)((double)gain * ((radius - dis) / radius));
79 99
100 m_log.DebugFormat("Play sound, gain {0}", gain);
80 sp.ControllingClient.SendPlayAttachedSound(soundID, objectID, ownerID, (float)gain, flags); 101 sp.ControllingClient.SendPlayAttachedSound(soundID, objectID, ownerID, (float)gain, flags);
81 }); 102 });
82 } 103 }
@@ -84,6 +105,18 @@ namespace OpenSim.Region.CoreModules.World.Sound
84 public virtual void TriggerSound( 105 public virtual void TriggerSound(
85 UUID soundId, UUID ownerID, UUID objectID, UUID parentID, double gain, Vector3 position, UInt64 handle, float radius) 106 UUID soundId, UUID ownerID, UUID objectID, UUID parentID, double gain, Vector3 position, UInt64 handle, float radius)
86 { 107 {
108 SceneObjectPart part = m_scene.GetSceneObjectPart(objectID);
109 if (part == null)
110 return;
111
112 SceneObjectGroup grp = part.ParentGroup;
113
114 if (grp.IsAttachment && grp.GetAttachmentPoint() > 30)
115 {
116 objectID = ownerID;
117 parentID = ownerID;
118 }
119
87 m_scene.ForEachScenePresence(delegate(ScenePresence sp) 120 m_scene.ForEachScenePresence(delegate(ScenePresence sp)
88 { 121 {
89 if (sp.IsChildAgent) 122 if (sp.IsChildAgent)
diff --git a/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs b/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs
index edaa07c..5295a72 100644
--- a/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISimulationDataService.cs
@@ -94,5 +94,6 @@ namespace OpenSim.Region.Framework.Interfaces
94 RegionSettings LoadRegionSettings(UUID regionUUID); 94 RegionSettings LoadRegionSettings(UUID regionUUID);
95 RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID); 95 RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID);
96 void StoreRegionWindlightSettings(RegionLightShareData wl); 96 void StoreRegionWindlightSettings(RegionLightShareData wl);
97 void RemoveRegionWindlightSettings(UUID regionID);
97 } 98 }
98} 99}
diff --git a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
index 0a4d531..615f377 100644
--- a/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISimulationDataStore.cs
@@ -105,6 +105,7 @@ namespace OpenSim.Region.Framework.Interfaces
105 RegionSettings LoadRegionSettings(UUID regionUUID); 105 RegionSettings LoadRegionSettings(UUID regionUUID);
106 RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID); 106 RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID);
107 void StoreRegionWindlightSettings(RegionLightShareData wl); 107 void StoreRegionWindlightSettings(RegionLightShareData wl);
108 void RemoveRegionWindlightSettings(UUID regionID);
108 109
109 void Shutdown(); 110 void Shutdown();
110 } 111 }
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 7a6449d..f164201 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -3100,6 +3100,7 @@ namespace OpenSim.Region.Framework.Scenes
3100 UUID ownerID = _ownerID; 3100 UUID ownerID = _ownerID;
3101 UUID objectID = ParentGroup.RootPart.UUID; 3101 UUID objectID = ParentGroup.RootPart.UUID;
3102 UUID parentID = GetRootPartUUID(); 3102 UUID parentID = GetRootPartUUID();
3103
3103 UUID soundID = UUID.Zero; 3104 UUID soundID = UUID.Zero;
3104 Vector3 position = AbsolutePosition; // region local 3105 Vector3 position = AbsolutePosition; // region local
3105 ulong regionHandle = m_parentGroup.Scene.RegionInfo.RegionHandle; 3106 ulong regionHandle = m_parentGroup.Scene.RegionInfo.RegionHandle;
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 0390414..fe9dc56 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -171,9 +171,6 @@ namespace OpenSim.Region.Framework.Scenes
171 171
172 private float m_health = 100f; 172 private float m_health = 100f;
173 173
174 // Default AV Height
175 private float m_avHeight = 127.0f;
176
177 protected RegionInfo m_regionInfo; 174 protected RegionInfo m_regionInfo;
178 protected ulong crossingFromRegion; 175 protected ulong crossingFromRegion;
179 176
@@ -841,9 +838,10 @@ namespace OpenSim.Region.Framework.Scenes
841 } 838 }
842 839
843 float localAVHeight = 1.56f; 840 float localAVHeight = 1.56f;
844 if (m_avHeight != 127.0f) 841 if (m_appearance != null)
845 { 842 {
846 localAVHeight = m_avHeight; 843 if (m_appearance.AvatarHeight > 0)
844 localAVHeight = m_appearance.AvatarHeight;
847 } 845 }
848 846
849 float posZLimit = 0; 847 float posZLimit = 0;
@@ -872,6 +870,12 @@ namespace OpenSim.Region.Framework.Scenes
872 870
873 AddToPhysicalScene(isFlying); 871 AddToPhysicalScene(isFlying);
874 872
873 if (m_appearance != null)
874 {
875 if (m_appearance.AvatarHeight > 0)
876 SetHeight(m_appearance.AvatarHeight);
877 }
878
875 if (m_forceFly) 879 if (m_forceFly)
876 { 880 {
877 m_physicsActor.Flying = true; 881 m_physicsActor.Flying = true;
@@ -1060,10 +1064,9 @@ namespace OpenSim.Region.Framework.Scenes
1060 /// </summary> 1064 /// </summary>
1061 public void SetHeight(float height) 1065 public void SetHeight(float height)
1062 { 1066 {
1063 m_avHeight = height;
1064 if (PhysicsActor != null && !IsChildAgent) 1067 if (PhysicsActor != null && !IsChildAgent)
1065 { 1068 {
1066 Vector3 SetSize = new Vector3(0.45f, 0.6f, m_avHeight); 1069 Vector3 SetSize = new Vector3(0.45f, 0.6f, height);
1067 PhysicsActor.Size = SetSize; 1070 PhysicsActor.Size = SetSize;
1068 } 1071 }
1069 } 1072 }
@@ -1687,9 +1690,10 @@ namespace OpenSim.Region.Framework.Scenes
1687 m_parentID = 0; 1690 m_parentID = 0;
1688 SendFullUpdateToAllClients(); 1691 SendFullUpdateToAllClients();
1689 m_requestedSitTargetID = 0; 1692 m_requestedSitTargetID = 0;
1690 if ((m_physicsActor != null) && (m_avHeight > 0)) 1693 if (m_physicsActor != null && m_appearance != null)
1691 { 1694 {
1692 SetHeight(m_avHeight); 1695 if (m_appearance.AvatarHeight > 0)
1696 SetHeight(m_appearance.AvatarHeight);
1693 } 1697 }
1694 } 1698 }
1695 1699
@@ -2391,11 +2395,14 @@ namespace OpenSim.Region.Framework.Scenes
2391 if (m_appearance.Texture == null) 2395 if (m_appearance.Texture == null)
2392 return; 2396 return;
2393 2397
2394 if (LocalId == remoteAvatar.LocalId) 2398// MT: This is needed for sit. It's legal to send it to oneself, and the name
2395 { 2399// of the method is a misnomer
2396 m_log.WarnFormat("[SCENEPRESENCE]: An agent is attempting to send avatar data to itself; {0}", UUID); 2400//
2397 return; 2401// if (LocalId == remoteAvatar.LocalId)
2398 } 2402// {
2403// m_log.WarnFormat("[SCENEPRESENCE]: An agent is attempting to send avatar data to itself; {0}", UUID);
2404// return;
2405// }
2399 2406
2400 if (IsChildAgent) 2407 if (IsChildAgent)
2401 { 2408 {
@@ -2576,7 +2583,7 @@ namespace OpenSim.Region.Framework.Scenes
2576 cadu.ActiveGroupID = UUID.Zero.Guid; 2583 cadu.ActiveGroupID = UUID.Zero.Guid;
2577 cadu.AgentID = UUID.Guid; 2584 cadu.AgentID = UUID.Guid;
2578 cadu.alwaysrun = m_setAlwaysRun; 2585 cadu.alwaysrun = m_setAlwaysRun;
2579 cadu.AVHeight = m_avHeight; 2586 cadu.AVHeight = m_appearance.AvatarHeight;
2580 Vector3 tempCameraCenter = m_CameraCenter; 2587 Vector3 tempCameraCenter = m_CameraCenter;
2581 cadu.cameraPosition = tempCameraCenter; 2588 cadu.cameraPosition = tempCameraCenter;
2582 cadu.drawdistance = m_DrawDistance; 2589 cadu.drawdistance = m_DrawDistance;
@@ -2912,7 +2919,6 @@ namespace OpenSim.Region.Framework.Scenes
2912 2919
2913 m_CameraCenter = cAgentData.Center + offset; 2920 m_CameraCenter = cAgentData.Center + offset;
2914 2921
2915 m_avHeight = cAgentData.Size.Z;
2916 //SetHeight(cAgentData.AVHeight); 2922 //SetHeight(cAgentData.AVHeight);
2917 2923
2918 if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0) 2924 if ((cAgentData.Throttles != null) && cAgentData.Throttles.Length > 0)
@@ -2937,8 +2943,6 @@ namespace OpenSim.Region.Framework.Scenes
2937 cAgent.Position = AbsolutePosition; 2943 cAgent.Position = AbsolutePosition;
2938 cAgent.Velocity = m_velocity; 2944 cAgent.Velocity = m_velocity;
2939 cAgent.Center = m_CameraCenter; 2945 cAgent.Center = m_CameraCenter;
2940 // Don't copy the size; it is inferred from apearance parameters
2941 //cAgent.Size = new Vector3(0, 0, m_avHeight);
2942 cAgent.AtAxis = m_CameraAtAxis; 2946 cAgent.AtAxis = m_CameraAtAxis;
2943 cAgent.LeftAxis = m_CameraLeftAxis; 2947 cAgent.LeftAxis = m_CameraLeftAxis;
2944 cAgent.UpAxis = m_CameraUpAxis; 2948 cAgent.UpAxis = m_CameraUpAxis;
@@ -3056,7 +3060,6 @@ namespace OpenSim.Region.Framework.Scenes
3056 m_pos = cAgent.Position; 3060 m_pos = cAgent.Position;
3057 m_velocity = cAgent.Velocity; 3061 m_velocity = cAgent.Velocity;
3058 m_CameraCenter = cAgent.Center; 3062 m_CameraCenter = cAgent.Center;
3059 //m_avHeight = cAgent.Size.Z;
3060 m_CameraAtAxis = cAgent.AtAxis; 3063 m_CameraAtAxis = cAgent.AtAxis;
3061 m_CameraLeftAxis = cAgent.LeftAxis; 3064 m_CameraLeftAxis = cAgent.LeftAxis;
3062 m_CameraUpAxis = cAgent.UpAxis; 3065 m_CameraUpAxis = cAgent.UpAxis;
@@ -3075,6 +3078,12 @@ namespace OpenSim.Region.Framework.Scenes
3075 m_setAlwaysRun = cAgent.AlwaysRun; 3078 m_setAlwaysRun = cAgent.AlwaysRun;
3076 3079
3077 m_appearance = new AvatarAppearance(cAgent.Appearance); 3080 m_appearance = new AvatarAppearance(cAgent.Appearance);
3081 if (m_physicsActor != null)
3082 {
3083 bool isFlying = m_physicsActor.Flying;
3084 RemoveFromPhysicalScene();
3085 AddToPhysicalScene(isFlying);
3086 }
3078 3087
3079/* 3088/*
3080 uint i = 0; 3089 uint i = 0;
@@ -3184,21 +3193,17 @@ namespace OpenSim.Region.Framework.Scenes
3184 /// </summary> 3193 /// </summary>
3185 public void AddToPhysicalScene(bool isFlying) 3194 public void AddToPhysicalScene(bool isFlying)
3186 { 3195 {
3196 if (m_appearance.AvatarHeight == 0)
3197 m_appearance.SetHeight();
3198
3187 PhysicsScene scene = m_scene.PhysicsScene; 3199 PhysicsScene scene = m_scene.PhysicsScene;
3188 3200
3189 Vector3 pVec = AbsolutePosition; 3201 Vector3 pVec = AbsolutePosition;
3190 3202
3191 // Old bug where the height was in centimeters instead of meters 3203 // Old bug where the height was in centimeters instead of meters
3192 if (m_avHeight == 127.0f) 3204 m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec,
3193 { 3205 new Vector3(0f, 0f, m_appearance.AvatarHeight), isFlying);
3194 m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec, new Vector3(0f, 0f, 1.56f), 3206
3195 isFlying);
3196 }
3197 else
3198 {
3199 m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec,
3200 new Vector3(0f, 0f, m_avHeight), isFlying);
3201 }
3202 scene.AddPhysicsActorTaint(m_physicsActor); 3207 scene.AddPhysicsActorTaint(m_physicsActor);
3203 //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; 3208 //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
3204 m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; 3209 m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index e661ca9..7f37878 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -1135,7 +1135,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1135 writer.WriteElementString("GroupMask", sop.GroupMask.ToString()); 1135 writer.WriteElementString("GroupMask", sop.GroupMask.ToString());
1136 writer.WriteElementString("EveryoneMask", sop.EveryoneMask.ToString()); 1136 writer.WriteElementString("EveryoneMask", sop.EveryoneMask.ToString());
1137 writer.WriteElementString("NextOwnerMask", sop.NextOwnerMask.ToString()); 1137 writer.WriteElementString("NextOwnerMask", sop.NextOwnerMask.ToString());
1138 writer.WriteElementString("Flags", sop.Flags.ToString()); 1138 WriteFlags(writer, "Flags", sop.Flags.ToString(), options);
1139 WriteUUID(writer, "CollisionSound", sop.CollisionSound, options); 1139 WriteUUID(writer, "CollisionSound", sop.CollisionSound, options);
1140 writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString()); 1140 writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString());
1141 if (sop.MediaUrl != null) 1141 if (sop.MediaUrl != null)
@@ -1188,6 +1188,20 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1188 1188
1189 } 1189 }
1190 1190
1191 static void WriteFlags(XmlTextWriter writer, string name, string flagsStr, Dictionary<string, object> options)
1192 {
1193 // Older versions of serialization can't cope with commas
1194 if (options.ContainsKey("version"))
1195 {
1196 float version = 0.5F;
1197 float.TryParse(options["version"].ToString(), out version);
1198 if (version < 0.5)
1199 flagsStr = flagsStr.Replace(",", "");
1200 }
1201
1202 writer.WriteElementString(name, flagsStr);
1203 }
1204
1191 static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options) 1205 static void WriteTaskInventory(XmlTextWriter writer, TaskInventoryDictionary tinv, Dictionary<string, object> options)
1192 { 1206 {
1193 if (tinv.Count > 0) // otherwise skip this 1207 if (tinv.Count > 0) // otherwise skip this
@@ -1275,8 +1289,8 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1275 writer.WriteElementString("ProfileHollow", shp.ProfileHollow.ToString()); 1289 writer.WriteElementString("ProfileHollow", shp.ProfileHollow.ToString());
1276 writer.WriteElementString("State", shp.State.ToString()); 1290 writer.WriteElementString("State", shp.State.ToString());
1277 1291
1278 writer.WriteElementString("ProfileShape", shp.ProfileShape.ToString()); 1292 WriteFlags(writer, "ProfileShape", shp.ProfileShape.ToString(), options);
1279 writer.WriteElementString("HollowShape", shp.HollowShape.ToString()); 1293 WriteFlags(writer, "HollowShape", shp.HollowShape.ToString(), options);
1280 1294
1281 WriteUUID(writer, "SculptTexture", shp.SculptTexture, options); 1295 WriteUUID(writer, "SculptTexture", shp.SculptTexture, options);
1282 writer.WriteElementString("SculptType", shp.SculptType.ToString()); 1296 writer.WriteElementString("SculptType", shp.SculptType.ToString());
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs
index 665b39f..645566e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs
@@ -455,6 +455,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
455 if (LightShareModule.EnableWindlight) 455 if (LightShareModule.EnableWindlight)
456 { 456 {
457 RegionLightShareData wl = getWindlightProfileFromRules(rules); 457 RegionLightShareData wl = getWindlightProfileFromRules(rules);
458 wl.valid = true;
458 m_host.ParentGroup.Scene.StoreWindlightProfile(wl); 459 m_host.ParentGroup.Scene.StoreWindlightProfile(wl);
459 success = 1; 460 success = 1;
460 } 461 }
@@ -465,6 +466,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
465 } 466 }
466 return success; 467 return success;
467 } 468 }
469 public void lsClearWindlightScene()
470 {
471 if (!m_LSFunctionsEnabled)
472 {
473 LSShoutError("LightShare functions are not enabled.");
474 return;
475 }
476 if (!World.RegionInfo.EstateSettings.IsEstateManager(m_host.OwnerID) && World.GetScenePresence(m_host.OwnerID).GodLevel < 200)
477 {
478 LSShoutError("lsSetWindlightScene can only be used by estate managers or owners.");
479 return;
480 }
481
482 m_host.ParentGroup.Scene.RegionInfo.WindlightSettings.valid = false;
483 if (m_host.ParentGroup.Scene.SimulationDataService != null)
484 m_host.ParentGroup.Scene.SimulationDataService.RemoveRegionWindlightSettings(m_host.ParentGroup.Scene.RegionInfo.RegionID);
485 }
468 /// <summary> 486 /// <summary>
469 /// Set the current Windlight scene to a target avatar 487 /// Set the current Windlight scene to a target avatar
470 /// </summary> 488 /// </summary>
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILS_Api.cs
index 9aa437b..f2df094 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILS_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILS_Api.cs
@@ -44,5 +44,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
44 LSL_List lsGetWindlightScene(LSL_List rules); 44 LSL_List lsGetWindlightScene(LSL_List rules);
45 int lsSetWindlightScene(LSL_List rules); 45 int lsSetWindlightScene(LSL_List rules);
46 int lsSetWindlightSceneTargeted(LSL_List rules, key target); 46 int lsSetWindlightSceneTargeted(LSL_List rules, key target);
47 void lsClearWindlightScene();
47 } 48 }
48} 49}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LS_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LS_Stub.cs
index f8dbe03..143b497 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LS_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LS_Stub.cs
@@ -72,5 +72,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
72 { 72 {
73 return m_LS_Functions.lsSetWindlightSceneTargeted(rules, target); 73 return m_LS_Functions.lsSetWindlightSceneTargeted(rules, target);
74 } 74 }
75 public void lsClearWindlightScene()
76 {
77 m_LS_Functions.lsClearWindlightScene();
78 }
75 } 79 }
76} 80}
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs
index c8ecb18..0df9380 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs
@@ -144,5 +144,9 @@ namespace OpenSim.Services.Connectors
144 { 144 {
145 m_database.StoreRegionWindlightSettings(wl); 145 m_database.StoreRegionWindlightSettings(wl);
146 } 146 }
147 public void RemoveRegionWindlightSettings(UUID regionID)
148 {
149 m_database.RemoveRegionWindlightSettings(regionID);
150 }
147 } 151 }
148} 152}
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index 6d3bff7..a34f0be 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -97,7 +97,7 @@ namespace OpenSim.Services.Interfaces
97 int GetRegionFlags(UUID scopeID, UUID regionID); 97 int GetRegionFlags(UUID scopeID, UUID regionID);
98 } 98 }
99 99
100 public class GridRegion 100 public class GridRegion : Object
101 { 101 {
102 102
103 /// <summary> 103 /// <summary>
@@ -238,6 +238,33 @@ namespace OpenSim.Services.Interfaces
238 EstateOwner = ConvertFrom.EstateOwner; 238 EstateOwner = ConvertFrom.EstateOwner;
239 } 239 }
240 240
241 # region Definition of equality
242
243 /// <summary>
244 /// Define equality as two regions having the same, non-zero UUID.
245 /// </summary>
246 public bool Equals(GridRegion region)
247 {
248 if ((object)region == null)
249 return false;
250 // Return true if the non-zero UUIDs are equal:
251 return (RegionID != UUID.Zero) && RegionID.Equals(region.RegionID);
252 }
253
254 public override bool Equals(Object obj)
255 {
256 if (obj == null)
257 return false;
258 return Equals(obj as GridRegion);
259 }
260
261 public override int GetHashCode()
262 {
263 return RegionID.GetHashCode() ^ TerrainImage.GetHashCode();
264 }
265
266 #endregion
267
241 /// <value> 268 /// <value>
242 /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw. 269 /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw.
243 /// 270 ///
diff --git a/OpenSim/Services/PresenceService/PresenceService.cs b/OpenSim/Services/PresenceService/PresenceService.cs
index 09c31c3..c8ac38e 100644
--- a/OpenSim/Services/PresenceService/PresenceService.cs
+++ b/OpenSim/Services/PresenceService/PresenceService.cs
@@ -45,10 +45,20 @@ namespace OpenSim.Services.PresenceService
45 LogManager.GetLogger( 45 LogManager.GetLogger(
46 MethodBase.GetCurrentMethod().DeclaringType); 46 MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 protected bool m_allowDuplicatePresences = false;
49
48 public PresenceService(IConfigSource config) 50 public PresenceService(IConfigSource config)
49 : base(config) 51 : base(config)
50 { 52 {
51 m_log.Debug("[PRESENCE SERVICE]: Starting presence service"); 53 m_log.Debug("[PRESENCE SERVICE]: Starting presence service");
54
55 IConfig presenceConfig = config.Configs["PresenceService"];
56 if (presenceConfig != null)
57 {
58 m_allowDuplicatePresences =
59 presenceConfig.GetBoolean("AllowDuplicatePresences",
60 m_allowDuplicatePresences);
61 }
52 } 62 }
53 63
54 public bool LoginAgent(string userID, UUID sessionID, 64 public bool LoginAgent(string userID, UUID sessionID,
@@ -57,6 +67,9 @@ namespace OpenSim.Services.PresenceService
57 //PresenceData[] d = m_Database.Get("UserID", userID); 67 //PresenceData[] d = m_Database.Get("UserID", userID);
58 //m_Database.Get("UserID", userID); 68 //m_Database.Get("UserID", userID);
59 69
70 if (!m_allowDuplicatePresences)
71 m_Database.Delete("UserID", userID.ToString());
72
60 PresenceData data = new PresenceData(); 73 PresenceData data = new PresenceData();
61 74
62 data.UserID = userID; 75 data.UserID = userID;
diff --git a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
index 2e5020b..2ea36da 100644
--- a/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
+++ b/OpenSim/Tests/Common/Mock/MockRegionDataPlugin.cs
@@ -104,6 +104,10 @@ namespace OpenSim.Data.Null
104 return m_store.LoadRegionWindlightSettings(regionUUID); 104 return m_store.LoadRegionWindlightSettings(regionUUID);
105 } 105 }
106 106
107 public void RemoveRegionWindlightSettings(UUID regionID)
108 {
109 }
110
107 public void StoreRegionWindlightSettings(RegionLightShareData wl) 111 public void StoreRegionWindlightSettings(RegionLightShareData wl)
108 { 112 {
109 m_store.StoreRegionWindlightSettings(wl); 113 m_store.StoreRegionWindlightSettings(wl);
@@ -146,6 +150,10 @@ namespace OpenSim.Data.Null
146 return new RegionLightShareData(); 150 return new RegionLightShareData();
147 } 151 }
148 152
153 public void RemoveRegionWindlightSettings(UUID regionID)
154 {
155 }
156
149 public void StoreRegionWindlightSettings(RegionLightShareData wl) 157 public void StoreRegionWindlightSettings(RegionLightShareData wl)
150 { 158 {
151 //This connector doesn't support the windlight module yet 159 //This connector doesn't support the windlight module yet
@@ -274,4 +282,4 @@ namespace OpenSim.Data.Null
274 { 282 {
275 } 283 }
276 } 284 }
277} \ No newline at end of file 285}
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index de7c44c..f98689b 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -624,6 +624,9 @@
624 ; Set this to a nonzero value to have remote admin use a different port 624 ; Set this to a nonzero value to have remote admin use a different port
625 port = 0 625 port = 0
626 626
627 ; Set this to the ip address that you want the admin server to bind to
628 bind_ip_address = "0.0.0.0"
629
627 ; This password is required to make any XMLRPC call (should be set as the "password" parameter) 630 ; This password is required to make any XMLRPC call (should be set as the "password" parameter)
628 access_password = unknown 631 access_password = unknown
629 632
diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example
index 10edccd..bc87ac2 100644
--- a/bin/Robust.ini.example
+++ b/bin/Robust.ini.example
@@ -107,6 +107,9 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
107[PresenceService] 107[PresenceService]
108 ; for the server connector 108 ; for the server connector
109 LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService" 109 LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService"
110 ; Set this to true to allow the use of advanced web services and multiple
111 ; bots using one account
112 AllowDuplicatePresences = false;
110 113
111[AvatarService] 114[AvatarService]
112 ; for the server connector 115 ; for the server connector