aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/RegionInfo.cs45
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs24
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs30
5 files changed, 71 insertions, 41 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index 169b951..0889d92 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -447,14 +447,18 @@ namespace OpenSim.Framework
447 447
448 public string GetOtherSetting(string key) 448 public string GetOtherSetting(string key)
449 { 449 {
450 string val; 450 string val;
451 m_otherSettings.TryGetValue(key, out val); 451 string keylower = key.ToLower();
452 return val; 452 if (m_otherSettings.TryGetValue(keylower, out val))
453 return val;
454 m_log.DebugFormat("[RegionInfo] Could not locate value for parameter {0}", key);
455 return null;
453 } 456 }
454 457
455 public void SetOtherSetting(string key, string value) 458 public void SetOtherSetting(string key, string value)
456 { 459 {
457 m_otherSettings[key] = value; 460 string keylower = key.ToLower();
461 m_otherSettings[keylower] = value;
458 } 462 }
459 463
460 private void ReadNiniConfig(IConfigSource source, string name) 464 private void ReadNiniConfig(IConfigSource source, string name)
@@ -496,12 +500,12 @@ namespace OpenSim.Framework
496 HashSet<String> allKeys = new HashSet<String>(); 500 HashSet<String> allKeys = new HashSet<String>();
497 foreach (string s in config.GetKeys()) 501 foreach (string s in config.GetKeys())
498 { 502 {
499 allKeys.Add(s.ToLower()); 503 allKeys.Add(s);
500 } 504 }
501 505
502 // RegionUUID 506 // RegionUUID
503 // 507 //
504 allKeys.Remove(("RegionUUID").ToLower()); 508 allKeys.Remove("RegionUUID");
505 string regionUUID = config.GetString("RegionUUID", string.Empty); 509 string regionUUID = config.GetString("RegionUUID", string.Empty);
506 if (regionUUID == String.Empty) 510 if (regionUUID == String.Empty)
507 { 511 {
@@ -516,7 +520,7 @@ namespace OpenSim.Framework
516 520
517 // Location 521 // Location
518 // 522 //
519 allKeys.Remove(("Location").ToLower()); 523 allKeys.Remove("Location");
520 string location = config.GetString("Location", String.Empty); 524 string location = config.GetString("Location", String.Empty);
521 if (location == String.Empty) 525 if (location == String.Empty)
522 { 526 {
@@ -532,7 +536,7 @@ namespace OpenSim.Framework
532 // InternalAddress 536 // InternalAddress
533 // 537 //
534 IPAddress address; 538 IPAddress address;
535 allKeys.Remove(("InternalAddress").ToLower()); 539 allKeys.Remove("InternalAddress");
536 if (config.Contains("InternalAddress")) 540 if (config.Contains("InternalAddress"))
537 { 541 {
538 address = IPAddress.Parse(config.GetString("InternalAddress", String.Empty)); 542 address = IPAddress.Parse(config.GetString("InternalAddress", String.Empty));
@@ -546,7 +550,7 @@ namespace OpenSim.Framework
546 // InternalPort 550 // InternalPort
547 // 551 //
548 int port; 552 int port;
549 allKeys.Remove(("InternalPort").ToLower()); 553 allKeys.Remove("InternalPort");
550 if (config.Contains("InternalPort")) 554 if (config.Contains("InternalPort"))
551 { 555 {
552 port = config.GetInt("InternalPort", 9000); 556 port = config.GetInt("InternalPort", 9000);
@@ -560,7 +564,7 @@ namespace OpenSim.Framework
560 564
561 // AllowAlternatePorts 565 // AllowAlternatePorts
562 // 566 //
563 allKeys.Remove(("AllowAlternatePorts").ToLower()); 567 allKeys.Remove("AllowAlternatePorts");
564 if (config.Contains("AllowAlternatePorts")) 568 if (config.Contains("AllowAlternatePorts"))
565 { 569 {
566 m_allow_alternate_ports = config.GetBoolean("AllowAlternatePorts", true); 570 m_allow_alternate_ports = config.GetBoolean("AllowAlternatePorts", true);
@@ -574,7 +578,7 @@ namespace OpenSim.Framework
574 578
575 // ExternalHostName 579 // ExternalHostName
576 // 580 //
577 allKeys.Remove(("ExternalHostName").ToLower()); 581 allKeys.Remove("ExternalHostName");
578 string externalName; 582 string externalName;
579 if (config.Contains("ExternalHostName")) 583 if (config.Contains("ExternalHostName"))
580 { 584 {
@@ -599,29 +603,30 @@ namespace OpenSim.Framework
599 603
600 // RegionType 604 // RegionType
601 m_regionType = config.GetString("RegionType", String.Empty); 605 m_regionType = config.GetString("RegionType", String.Empty);
602 allKeys.Remove(("RegionType").ToLower()); 606 allKeys.Remove("RegionType");
603 607
604 // Prim stuff 608 // Prim stuff
605 // 609 //
606 m_nonphysPrimMax = config.GetInt("NonphysicalPrimMax", 256); 610 m_nonphysPrimMax = config.GetInt("NonphysicalPrimMax", 256);
607 allKeys.Remove(("NonphysicalPrimMax").ToLower()); 611 allKeys.Remove("NonphysicalPrimMax");
608 m_physPrimMax = config.GetInt("PhysicalPrimMax", 10); 612 m_physPrimMax = config.GetInt("PhysicalPrimMax", 10);
609 allKeys.Remove(("PhysicalPrimMax").ToLower()); 613 allKeys.Remove("PhysicalPrimMax");
610 m_clampPrimSize = config.GetBoolean("ClampPrimSize", false); 614 m_clampPrimSize = config.GetBoolean("ClampPrimSize", false);
611 allKeys.Remove(("ClampPrimSize").ToLower()); 615 allKeys.Remove("ClampPrimSize");
612 m_objectCapacity = config.GetInt("MaxPrims", 15000); 616 m_objectCapacity = config.GetInt("MaxPrims", 15000);
613 allKeys.Remove(("MaxPrims").ToLower()); 617 allKeys.Remove("MaxPrims");
614 m_agentCapacity = config.GetInt("MaxAgents", 100); 618 m_agentCapacity = config.GetInt("MaxAgents", 100);
615 allKeys.Remove(("MaxAgents").ToLower()); 619 allKeys.Remove("MaxAgents");
616 620
617 // Multi-tenancy 621 // Multi-tenancy
618 // 622 //
619 ScopeID = new UUID(config.GetString("ScopeID", UUID.Zero.ToString())); 623 ScopeID = new UUID(config.GetString("ScopeID", UUID.Zero.ToString()));
620 allKeys.Remove(("ScopeID").ToLower()); 624 allKeys.Remove("ScopeID");
621 625
622 foreach (String s in allKeys) 626 foreach (String s in allKeys)
623 { 627 {
624 m_otherSettings.Add(s, config.GetString(s)); 628 string val = config.GetString(s);
629 SetOtherSetting(s, config.GetString(s));
625 } 630 }
626 } 631 }
627 632
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index fd35c62..3d96f40 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -398,6 +398,9 @@ namespace OpenSim.Region.Framework.Scenes
398 public event SceneObjectPartCopyDelegate OnSceneObjectPartCopy; 398 public event SceneObjectPartCopyDelegate OnSceneObjectPartCopy;
399 public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed); 399 public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed);
400 400
401 public delegate void SceneObjectPartUpdated(SceneObjectPart sop);
402 public event SceneObjectPartUpdated OnSceneObjectPartUpdated;
403
401 public delegate void RegionUp(GridRegion region); 404 public delegate void RegionUp(GridRegion region);
402 public event RegionUp OnRegionUp; 405 public event RegionUp OnRegionUp;
403 406
@@ -2203,6 +2206,27 @@ namespace OpenSim.Region.Framework.Scenes
2203 } 2206 }
2204 } 2207 }
2205 2208
2209 public void TriggerSceneObjectPartUpdated(SceneObjectPart sop)
2210 {
2211 SceneObjectPartUpdated handler = OnSceneObjectPartUpdated;
2212 if (handler != null)
2213 {
2214 foreach (SceneObjectPartUpdated d in handler.GetInvocationList())
2215 {
2216 try
2217 {
2218 d(sop);
2219 }
2220 catch (Exception e)
2221 {
2222 m_log.ErrorFormat(
2223 "[EVENT MANAGER]: Delegate for TriggerSceneObjectPartUpdated failed - continuing. {0} {1}",
2224 e.Message, e.StackTrace);
2225 }
2226 }
2227 }
2228 }
2229
2206 public void TriggerOnParcelPropertiesUpdateRequest(LandUpdateArgs args, 2230 public void TriggerOnParcelPropertiesUpdateRequest(LandUpdateArgs args,
2207 int local_id, IClientAPI remote_client) 2231 int local_id, IClientAPI remote_client)
2208 { 2232 {
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 23fee4e..bfe8d2c 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4290,6 +4290,16 @@ namespace OpenSim.Region.Framework.Scenes
4290 public SceneObjectGroup GetGroupByPrim(uint localID) 4290 public SceneObjectGroup GetGroupByPrim(uint localID)
4291 { 4291 {
4292 return m_sceneGraph.GetGroupByPrim(localID); 4292 return m_sceneGraph.GetGroupByPrim(localID);
4293 }
4294
4295 /// <summary>
4296 /// Get a scene object group that contains the prim with the given uuid
4297 /// </summary>
4298 /// <param name="fullID"></param>
4299 /// <returns>null if no scene object group containing that prim is found</returns>
4300 public SceneObjectGroup GetGroupByPrim(UUID fullID)
4301 {
4302 return m_sceneGraph.GetGroupByPrim(fullID);
4293 } 4303 }
4294 4304
4295 public override bool TryGetScenePresence(UUID agentID, out ScenePresence sp) 4305 public override bool TryGetScenePresence(UUID agentID, out ScenePresence sp)
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 06de72f..1487fac 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -301,6 +301,7 @@ namespace OpenSim.Region.Framework.Scenes
301 /// </summary> 301 /// </summary>
302 /// 302 ///
303 /// This method does not send updates to the client - callers need to handle this themselves. 303 /// This method does not send updates to the client - callers need to handle this themselves.
304 /// Caller should also trigger EventManager.TriggerObjectAddedToScene
304 /// <param name="sceneObject"></param> 305 /// <param name="sceneObject"></param>
305 /// <param name="attachToBackup"></param> 306 /// <param name="attachToBackup"></param>
306 /// <param name="pos">Position of the object. If null then the position stored in the object is used.</param> 307 /// <param name="pos">Position of the object. If null then the position stored in the object is used.</param>
@@ -921,7 +922,7 @@ namespace OpenSim.Region.Framework.Scenes
921 /// </summary> 922 /// </summary>
922 /// <param name="fullID"></param> 923 /// <param name="fullID"></param>
923 /// <returns>null if no scene object group containing that prim is found</returns> 924 /// <returns>null if no scene object group containing that prim is found</returns>
924 private SceneObjectGroup GetGroupByPrim(UUID fullID) 925 public SceneObjectGroup GetGroupByPrim(UUID fullID)
925 { 926 {
926 SceneObjectGroup sog; 927 SceneObjectGroup sog;
927 lock (SceneObjectGroupsByFullPartID) 928 lock (SceneObjectGroupsByFullPartID)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 36d3588..9b660b6 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -235,7 +235,7 @@ namespace OpenSim.Region.Framework.Scenes
235 235
236 public bool IgnoreUndoUpdate = false; 236 public bool IgnoreUndoUpdate = false;
237 237
238 private PrimFlags LocalFlags; 238 public PrimFlags LocalFlags;
239 239
240 private float m_damage = -1.0f; 240 private float m_damage = -1.0f;
241 private byte[] m_TextureAnimation; 241 private byte[] m_TextureAnimation;
@@ -902,32 +902,18 @@ namespace OpenSim.Region.Framework.Scenes
902 public Color Color 902 public Color Color
903 { 903 {
904 get { return m_color; } 904 get { return m_color; }
905 set 905 set { m_color = value; }
906 {
907 m_color = value;
908
909 /* ScheduleFullUpdate() need not be called b/c after
910 * setting the color, the text will be set, so then
911 * ScheduleFullUpdate() will be called. */
912 //ScheduleFullUpdate();
913 }
914 } 906 }
915 907
916 public string Text 908 public string Text
917 { 909 {
918 get 910 get
919 { 911 {
920 string returnstr = m_text; 912 if (m_text.Length > 255)
921 if (returnstr.Length > 255) 913 return m_text.Substring(0, 254);
922 { 914 return m_text;
923 returnstr = returnstr.Substring(0, 254);
924 }
925 return returnstr;
926 }
927 set
928 {
929 m_text = value;
930 } 915 }
916 set { m_text = value; }
931 } 917 }
932 918
933 919
@@ -2743,6 +2729,8 @@ namespace OpenSim.Region.Framework.Scenes
2743 if (ParentGroup == null) 2729 if (ParentGroup == null)
2744 return; 2730 return;
2745 2731
2732 ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this);
2733
2746 ParentGroup.QueueForUpdateCheck(); 2734 ParentGroup.QueueForUpdateCheck();
2747 2735
2748 int timeNow = Util.UnixTimeSinceEpoch(); 2736 int timeNow = Util.UnixTimeSinceEpoch();
@@ -2775,6 +2763,8 @@ namespace OpenSim.Region.Framework.Scenes
2775 if (ParentGroup == null) 2763 if (ParentGroup == null)
2776 return; 2764 return;
2777 2765
2766 ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this);
2767
2778 // This was pulled from SceneViewer. Attachments always receive full updates. 2768 // This was pulled from SceneViewer. Attachments always receive full updates.
2779 // I could not verify if this is a requirement but this maintains existing behavior 2769 // I could not verify if this is a requirement but this maintains existing behavior
2780 if (ParentGroup.IsAttachment) 2770 if (ParentGroup.IsAttachment)