aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-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
4 files changed, 46 insertions, 21 deletions
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)