aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Interfaces/ICloudModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEmailModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEntityInventory.cs12
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEstateModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/ISunModule.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IWindModule.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs8
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs17
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs18
12 files changed, 70 insertions, 21 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/ICloudModule.cs b/OpenSim/Region/Framework/Interfaces/ICloudModule.cs
index f8a5bad..879114b 100644
--- a/OpenSim/Region/Framework/Interfaces/ICloudModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/ICloudModule.cs
@@ -28,7 +28,7 @@
28 28
29namespace OpenSim.Region.Framework.Interfaces 29namespace OpenSim.Region.Framework.Interfaces
30{ 30{
31 public interface ICloudModule : IRegionModule 31 public interface ICloudModule : INonSharedRegionModule
32 { 32 {
33 /// <summary> 33 /// <summary>
34 /// Retrieves the cloud density at the given region coordinates 34 /// Retrieves the cloud density at the given region coordinates
diff --git a/OpenSim/Region/Framework/Interfaces/IEmailModule.cs b/OpenSim/Region/Framework/Interfaces/IEmailModule.cs
index 3a2c423..bdad0b4 100644
--- a/OpenSim/Region/Framework/Interfaces/IEmailModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEmailModule.cs
@@ -38,7 +38,7 @@ namespace OpenSim.Region.Framework.Interfaces
38 public int numLeft; 38 public int numLeft;
39 } 39 }
40 40
41 public interface IEmailModule : IRegionModule 41 public interface IEmailModule : ISharedRegionModule
42 { 42 {
43 void SendEmail(UUID objectID, string address, string subject, string body); 43 void SendEmail(UUID objectID, string address, string subject, string body);
44 Email GetNextEmail(UUID objectID, string sender, string subject); 44 Email GetNextEmail(UUID objectID, string sender, string subject);
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
index 67395fa..eeb5102 100644
--- a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
@@ -77,7 +77,11 @@ namespace OpenSim.Region.Framework.Interfaces
77 /// <summary> 77 /// <summary>
78 /// Stop all the scripts in this entity. 78 /// Stop all the scripts in this entity.
79 /// </summary> 79 /// </summary>
80 void RemoveScriptInstances(); 80 /// <param name="sceneObjectBeingDeleted">
81 /// Should be true if these scripts are being removed because the scene
82 /// object is being deleted. This will prevent spurious updates to the client.
83 /// </param>
84 void RemoveScriptInstances(bool sceneObjectBeingDeleted);
81 85
82 /// <summary> 86 /// <summary>
83 /// Start a script which is in this entity's inventory. 87 /// Start a script which is in this entity's inventory.
@@ -103,7 +107,11 @@ namespace OpenSim.Region.Framework.Interfaces
103 /// Stop a script which is in this prim's inventory. 107 /// Stop a script which is in this prim's inventory.
104 /// </summary> 108 /// </summary>
105 /// <param name="itemId"></param> 109 /// <param name="itemId"></param>
106 void RemoveScriptInstance(UUID itemId); 110 /// <param name="sceneObjectBeingDeleted">
111 /// Should be true if these scripts are being removed because the scene
112 /// object is being deleted. This will prevent spurious updates to the client.
113 /// </param>
114 void RemoveScriptInstance(UUID itemId, bool sceneObjectBeingDeleted);
107 115
108 /// <summary> 116 /// <summary>
109 /// Add an item to this entity's inventory. If an item with the same name already exists, then an alternative 117 /// Add an item to this entity's inventory. If an item with the same name already exists, then an alternative
diff --git a/OpenSim/Region/Framework/Interfaces/IEstateModule.cs b/OpenSim/Region/Framework/Interfaces/IEstateModule.cs
index 890fa31..347818c 100644
--- a/OpenSim/Region/Framework/Interfaces/IEstateModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEstateModule.cs
@@ -29,7 +29,7 @@ using OpenMetaverse;
29 29
30namespace OpenSim.Region.Framework.Interfaces 30namespace OpenSim.Region.Framework.Interfaces
31{ 31{
32 public interface IEstateModule : IRegionModule 32 public interface IEstateModule : INonSharedRegionModule
33 { 33 {
34 uint GetRegionFlags(); 34 uint GetRegionFlags();
35 bool IsManager(UUID avatarID); 35 bool IsManager(UUID avatarID);
diff --git a/OpenSim/Region/Framework/Interfaces/ISunModule.cs b/OpenSim/Region/Framework/Interfaces/ISunModule.cs
index 819ae11..8231716 100644
--- a/OpenSim/Region/Framework/Interfaces/ISunModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/ISunModule.cs
@@ -29,7 +29,7 @@ using OpenMetaverse;
29 29
30namespace OpenSim.Region.Framework.Interfaces 30namespace OpenSim.Region.Framework.Interfaces
31{ 31{
32 public interface ISunModule : IRegionModule 32 public interface ISunModule : INonSharedRegionModule
33 { 33 {
34 double GetSunParameter(string param); 34 double GetSunParameter(string param);
35 35
diff --git a/OpenSim/Region/Framework/Interfaces/IWindModule.cs b/OpenSim/Region/Framework/Interfaces/IWindModule.cs
index 10ecc32..4a26a71 100644
--- a/OpenSim/Region/Framework/Interfaces/IWindModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IWindModule.cs
@@ -29,7 +29,7 @@ using OpenMetaverse;
29 29
30namespace OpenSim.Region.Framework.Interfaces 30namespace OpenSim.Region.Framework.Interfaces
31{ 31{
32 public interface IWindModule : IRegionModule 32 public interface IWindModule : INonSharedRegionModule
33 { 33 {
34 34
35 /// <summary> 35 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index dd4c14b..a18bf76 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -256,7 +256,7 @@ namespace OpenSim.Region.Framework.Scenes
256 256
257 if (isScriptRunning) 257 if (isScriptRunning)
258 { 258 {
259 part.Inventory.RemoveScriptInstance(item.ItemID); 259 part.Inventory.RemoveScriptInstance(item.ItemID, false);
260 } 260 }
261 261
262 // Update item with new asset 262 // Update item with new asset
@@ -859,8 +859,10 @@ namespace OpenSim.Region.Framework.Scenes
859 859
860 if (item.Type == 10) 860 if (item.Type == 10)
861 { 861 {
862 part.RemoveScriptEvents(itemID);
862 EventManager.TriggerRemoveScript(localID, itemID); 863 EventManager.TriggerRemoveScript(localID, itemID);
863 } 864 }
865
864 group.RemoveInventoryItem(localID, itemID); 866 group.RemoveInventoryItem(localID, itemID);
865 part.GetProperties(remoteClient); 867 part.GetProperties(remoteClient);
866 } 868 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index db21bf9..23db482 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1023,7 +1023,7 @@ namespace OpenSim.Region.Framework.Scenes
1023 { 1023 {
1024 if (ent is SceneObjectGroup) 1024 if (ent is SceneObjectGroup)
1025 { 1025 {
1026 ((SceneObjectGroup) ent).RemoveScriptInstances(); 1026 ((SceneObjectGroup) ent).RemoveScriptInstances(false);
1027 } 1027 }
1028 } 1028 }
1029 } 1029 }
@@ -1911,13 +1911,15 @@ namespace OpenSim.Region.Framework.Scenes
1911 /// <param name="silent">Suppress broadcasting changes to other clients.</param> 1911 /// <param name="silent">Suppress broadcasting changes to other clients.</param>
1912 public void DeleteSceneObject(SceneObjectGroup group, bool silent) 1912 public void DeleteSceneObject(SceneObjectGroup group, bool silent)
1913 { 1913 {
1914// m_log.DebugFormat("[SCENE]: Deleting scene object {0} {1}", group.Name, group.UUID);
1915
1914 //SceneObjectPart rootPart = group.GetChildPart(group.UUID); 1916 //SceneObjectPart rootPart = group.GetChildPart(group.UUID);
1915 1917
1916 // Serialise calls to RemoveScriptInstances to avoid 1918 // Serialise calls to RemoveScriptInstances to avoid
1917 // deadlocking on m_parts inside SceneObjectGroup 1919 // deadlocking on m_parts inside SceneObjectGroup
1918 lock (m_deleting_scene_object) 1920 lock (m_deleting_scene_object)
1919 { 1921 {
1920 group.RemoveScriptInstances(); 1922 group.RemoveScriptInstances(true);
1921 } 1923 }
1922 1924
1923 foreach (SceneObjectPart part in group.Children.Values) 1925 foreach (SceneObjectPart part in group.Children.Values)
@@ -1945,6 +1947,8 @@ namespace OpenSim.Region.Framework.Scenes
1945 } 1947 }
1946 1948
1947 group.DeleteGroup(silent); 1949 group.DeleteGroup(silent);
1950
1951// m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID);
1948 } 1952 }
1949 1953
1950 /// <summary> 1954 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
index 65ce13a..aea005e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
@@ -46,8 +46,8 @@ namespace OpenSim.Region.Framework.Scenes
46 /// </summary> 46 /// </summary>
47 public void ForceInventoryPersistence() 47 public void ForceInventoryPersistence()
48 { 48 {
49 lockPartsForRead(true); 49 lockPartsForRead(true);
50 List<SceneObjectPart> values = new List<SceneObjectPart>(m_parts.Values); 50 List<SceneObjectPart> values = new List<SceneObjectPart>(m_parts.Values);
51 lockPartsForRead(false); 51 lockPartsForRead(false);
52 foreach (SceneObjectPart part in values) 52 foreach (SceneObjectPart part in values)
53 { 53 {
@@ -75,9 +75,9 @@ namespace OpenSim.Region.Framework.Scenes
75 /// Stop the scripts contained in all the prims in this group 75 /// Stop the scripts contained in all the prims in this group
76 /// </summary> 76 /// </summary>
77 public void RemoveScriptInstances() 77 public void RemoveScriptInstances()
78 { 78 {
79 lockPartsForRead(true); 79 lockPartsForRead(true);
80 List<SceneObjectPart> values = new List<SceneObjectPart>(m_parts.Values); 80 List<SceneObjectPart> values = new List<SceneObjectPart>(m_parts.Values);
81 lockPartsForRead(false); 81 lockPartsForRead(false);
82 82
83 foreach (SceneObjectPart part in values) 83 foreach (SceneObjectPart part in values)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 04be9fc..da7ec44 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2489,7 +2489,7 @@ namespace OpenSim.Region.Framework.Scenes
2489 //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString()); 2489 //m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString());
2490 //ScheduleFullUpdate(); 2490 //ScheduleFullUpdate();
2491 } 2491 }
2492 2492
2493 public void RemoveScriptEvents(UUID scriptid) 2493 public void RemoveScriptEvents(UUID scriptid)
2494 { 2494 {
2495 lock (m_scriptEvents) 2495 lock (m_scriptEvents)
@@ -2543,6 +2543,8 @@ namespace OpenSim.Region.Framework.Scenes
2543 /// </summary> 2543 /// </summary>
2544 public void ScheduleFullUpdate() 2544 public void ScheduleFullUpdate()
2545 { 2545 {
2546// m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId);
2547
2546 if (m_parentGroup != null) 2548 if (m_parentGroup != null)
2547 { 2549 {
2548 m_parentGroup.QueueForUpdateCheck(); 2550 m_parentGroup.QueueForUpdateCheck();
@@ -4069,6 +4071,8 @@ namespace OpenSim.Region.Framework.Scenes
4069 4071
4070 if (m_parentGroup == null) 4072 if (m_parentGroup == null)
4071 { 4073 {
4074// m_log.DebugFormat(
4075// "[SCENE OBJECT PART]: Scheduling part {0} {1} for full update in aggregateScriptEvents() since m_parentGroup == null", Name, LocalId);
4072 ScheduleFullUpdate(); 4076 ScheduleFullUpdate();
4073 return; 4077 return;
4074 } 4078 }
@@ -4085,9 +4089,15 @@ namespace OpenSim.Region.Framework.Scenes
4085 LocalFlags=(PrimFlags)objectflagupdate; 4089 LocalFlags=(PrimFlags)objectflagupdate;
4086 4090
4087 if (m_parentGroup != null && m_parentGroup.RootPart == this) 4091 if (m_parentGroup != null && m_parentGroup.RootPart == this)
4092 {
4088 m_parentGroup.aggregateScriptEvents(); 4093 m_parentGroup.aggregateScriptEvents();
4094 }
4089 else 4095 else
4096 {
4097// m_log.DebugFormat(
4098// "[SCENE OBJECT PART]: Scheduling part {0} {1} for full update in aggregateScriptEvents()", Name, LocalId);
4090 ScheduleFullUpdate(); 4099 ScheduleFullUpdate();
4100 }
4091 } 4101 }
4092 4102
4093 public int registerTargetWaypoint(Vector3 target, float tolerance) 4103 public int registerTargetWaypoint(Vector3 target, float tolerance)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index c3c6342..1de0092 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -235,7 +235,11 @@ namespace OpenSim.Region.Framework.Scenes
235 /// <summary> 235 /// <summary>
236 /// Stop all the scripts in this prim. 236 /// Stop all the scripts in this prim.
237 /// </summary> 237 /// </summary>
238 public void RemoveScriptInstances() 238 /// <param name="sceneObjectBeingDeleted">
239 /// Should be true if these scripts are being removed because the scene
240 /// object is being deleted. This will prevent spurious updates to the client.
241 /// </param>
242 public void RemoveScriptInstances(bool sceneObjectBeingDeleted)
239 { 243 {
240 Items.LockItemsForRead(true); 244 Items.LockItemsForRead(true);
241 IList<TaskInventoryItem> items = new List<TaskInventoryItem>(Items.Values); 245 IList<TaskInventoryItem> items = new List<TaskInventoryItem>(Items.Values);
@@ -412,10 +416,17 @@ namespace OpenSim.Region.Framework.Scenes
412 /// Stop a script which is in this prim's inventory. 416 /// Stop a script which is in this prim's inventory.
413 /// </summary> 417 /// </summary>
414 /// <param name="itemId"></param> 418 /// <param name="itemId"></param>
415 public void RemoveScriptInstance(UUID itemId) 419 /// <param name="sceneObjectBeingDeleted">
420 /// Should be true if this script is being removed because the scene
421 /// object is being deleted. This will prevent spurious updates to the client.
422 /// </param>
423 public void RemoveScriptInstance(UUID itemId, bool sceneObjectBeingDeleted)
416 { 424 {
417 if (m_items.ContainsKey(itemId)) 425 if (m_items.ContainsKey(itemId))
418 { 426 {
427 if (!sceneObjectBeingDeleted)
428 m_part.RemoveScriptEvents(itemId);
429
419 m_part.ParentGroup.Scene.EventManager.TriggerRemoveScript(m_part.LocalId, itemId); 430 m_part.ParentGroup.Scene.EventManager.TriggerRemoveScript(m_part.LocalId, itemId);
420 m_part.ParentGroup.AddActiveScriptCount(-1); 431 m_part.ParentGroup.AddActiveScriptCount(-1);
421 } 432 }
@@ -496,7 +507,7 @@ namespace OpenSim.Region.Framework.Scenes
496 if (i.Name == item.Name) 507 if (i.Name == item.Name)
497 { 508 {
498 if (i.InvType == (int)InventoryType.LSL) 509 if (i.InvType == (int)InventoryType.LSL)
499 RemoveScriptInstance(i.ItemID); 510 RemoveScriptInstance(i.ItemID, false);
500 511
501 RemoveInventoryItem(i.ItemID); 512 RemoveInventoryItem(i.ItemID);
502 break; 513 break;
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 64bfaba..27df3b2 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1319,6 +1319,12 @@ namespace OpenSim.Region.Framework.Scenes
1319 1319
1320 if (m_allowMovement) 1320 if (m_allowMovement)
1321 { 1321 {
1322 if (agentData.UseClientAgentPosition)
1323 {
1324 m_moveToPositionInProgress = (agentData.ClientAgentPosition - AbsolutePosition).Length() > 0.2f;
1325 m_moveToPositionTarget = agentData.ClientAgentPosition;
1326 }
1327
1322 int i = 0; 1328 int i = 0;
1323 1329
1324 bool update_rotation = false; 1330 bool update_rotation = false;
@@ -1421,7 +1427,7 @@ namespace OpenSim.Region.Framework.Scenes
1421 if (bAllowUpdateMoveToPosition && (m_moveToPositionInProgress && !m_autopilotMoving)) 1427 if (bAllowUpdateMoveToPosition && (m_moveToPositionInProgress && !m_autopilotMoving))
1422 { 1428 {
1423 //Check the error term of the current position in relation to the target position 1429 //Check the error term of the current position in relation to the target position
1424 if (Util.GetDistanceTo(AbsolutePosition, m_moveToPositionTarget) <= 1.5f) 1430 if (Util.GetDistanceTo(AbsolutePosition, m_moveToPositionTarget) <= 0.5f)
1425 { 1431 {
1426 // we are close enough to the target 1432 // we are close enough to the target
1427 m_moveToPositionTarget = Vector3.Zero; 1433 m_moveToPositionTarget = Vector3.Zero;
@@ -2969,7 +2975,15 @@ namespace OpenSim.Region.Framework.Scenes
2969 protected void CrossToNewRegion() 2975 protected void CrossToNewRegion()
2970 { 2976 {
2971 InTransit(); 2977 InTransit();
2972 m_scene.CrossAgentToNewRegion(this, m_physicsActor.Flying); 2978 try
2979 {
2980 m_scene.CrossAgentToNewRegion(this, m_physicsActor.Flying);
2981 }
2982 catch(Exception ex)
2983 {
2984 m_scene.CrossAgentToNewRegion(this, false);
2985 }
2986
2973 } 2987 }
2974 2988
2975 public void InTransit() 2989 public void InTransit()