aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-05-05 00:29:14 +0100
committerJustin Clark-Casey (justincc)2012-05-05 00:29:14 +0100
commit01b00ad0d57d828028379875a382965b44073497 (patch)
tree084b520e6963092331ce4f2bfd6d8b50a7dc3360
parentUse the more efficient HashSet instead of List for FlotasmAssetCache.m_Curren... (diff)
downloadopensim-SC_OLD-01b00ad0d57d828028379875a382965b44073497.zip
opensim-SC_OLD-01b00ad0d57d828028379875a382965b44073497.tar.gz
opensim-SC_OLD-01b00ad0d57d828028379875a382965b44073497.tar.bz2
opensim-SC_OLD-01b00ad0d57d828028379875a382965b44073497.tar.xz
Fire the scripting changed event with CHANGED_OWNER when an object that has changed owners is rezzed.
This needs to occur after the script is resumed rather than before, when the event is just dropped. Addresses http://opensimulator.org/mantis/view.php?id=5890 and http://opensimulator.org/mantis/view.php?id=5952
-rw-r--r--OpenSim/Framework/TaskInventoryItem.cs16
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs18
-rw-r--r--OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs10
4 files changed, 30 insertions, 15 deletions
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs
index d4bbbfb..362d365 100644
--- a/OpenSim/Framework/TaskInventoryItem.cs
+++ b/OpenSim/Framework/TaskInventoryItem.cs
@@ -26,6 +26,8 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Reflection;
30using log4net;
29using OpenMetaverse; 31using OpenMetaverse;
30 32
31namespace OpenSim.Framework 33namespace OpenSim.Framework
@@ -35,6 +37,8 @@ namespace OpenSim.Framework
35 /// </summary> 37 /// </summary>
36 public class TaskInventoryItem : ICloneable 38 public class TaskInventoryItem : ICloneable
37 { 39 {
40// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41
38 /// <summary> 42 /// <summary>
39 /// XXX This should really be factored out into some constants class. 43 /// XXX This should really be factored out into some constants class.
40 /// </summary> 44 /// </summary>
@@ -331,12 +335,18 @@ namespace OpenSim.Framework
331 } 335 }
332 } 336 }
333 337
334 public bool OwnerChanged { 338 public bool OwnerChanged
335 get { 339 {
340 get
341 {
336 return _ownerChanged; 342 return _ownerChanged;
337 } 343 }
338 set { 344 set
345 {
339 _ownerChanged = value; 346 _ownerChanged = value;
347// m_log.DebugFormat(
348// "[TASK INVENTORY ITEM]: Owner changed set {0} for {1} {2} owned by {3}",
349// _ownerChanged, Name, ItemID, OwnerID);
340 } 350 }
341 } 351 }
342 352
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 7200c4b..2e1948d 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -527,9 +527,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
527 private void AttachToAgent( 527 private void AttachToAgent(
528 IScenePresence sp, SceneObjectGroup so, uint attachmentpoint, Vector3 attachOffset, bool silent) 528 IScenePresence sp, SceneObjectGroup so, uint attachmentpoint, Vector3 attachOffset, bool silent)
529 { 529 {
530 // m_log.DebugFormat( 530// m_log.DebugFormat(
531 // "[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}", 531// "[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}",
532 // so.Name, avatar.Name, attachmentpoint, attachOffset, so.RootPart.AttachedPos); 532// so.Name, sp.Name, attachmentpoint, attachOffset, so.RootPart.AttachedPos);
533 533
534 so.DetachFromBackup(); 534 so.DetachFromBackup();
535 535
@@ -788,9 +788,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
788 /// <param name="att"></param> 788 /// <param name="att"></param>
789 private void ShowAttachInUserInventory(IScenePresence sp, uint AttachmentPt, UUID itemID, SceneObjectGroup att) 789 private void ShowAttachInUserInventory(IScenePresence sp, uint AttachmentPt, UUID itemID, SceneObjectGroup att)
790 { 790 {
791 // m_log.DebugFormat( 791// m_log.DebugFormat(
792 // "[USER INVENTORY]: Updating attachment {0} for {1} at {2} using item ID {3}", 792// "[USER INVENTORY]: Updating attachment {0} for {1} at {2} using item ID {3}",
793 // att.Name, sp.Name, AttachmentPt, itemID); 793// att.Name, sp.Name, AttachmentPt, itemID);
794 794
795 if (UUID.Zero == itemID) 795 if (UUID.Zero == itemID)
796 { 796 {
@@ -853,9 +853,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
853 853
854 private void Client_OnObjectAttach(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent) 854 private void Client_OnObjectAttach(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent)
855 { 855 {
856 // m_log.DebugFormat( 856// m_log.DebugFormat(
857 // "[ATTACHMENTS MODULE]: Attaching object local id {0} to {1} point {2} from ground (silent = {3})", 857// "[ATTACHMENTS MODULE]: Attaching object local id {0} to {1} point {2} from ground (silent = {3})",
858 // objectLocalID, remoteClient.Name, AttachmentPt, silent); 858// objectLocalID, remoteClient.Name, AttachmentPt, silent);
859 859
860 if (!Enabled) 860 if (!Enabled)
861 return; 861 return;
diff --git a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
index efede5c..b2f71d1 100644
--- a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
+++ b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs
@@ -126,7 +126,6 @@ namespace OpenSim.Region.CoreModules.World.Land
126// m_log.DebugFormat( 126// m_log.DebugFormat(
127// "[PRIM COUNT MODULE]: Ignoring OnParcelPrimCountAdd() for {0} on {1} since count is tainted", 127// "[PRIM COUNT MODULE]: Ignoring OnParcelPrimCountAdd() for {0} on {1} since count is tainted",
128// obj.Name, m_Scene.RegionInfo.RegionName); 128// obj.Name, m_Scene.RegionInfo.RegionName);
129
130 } 129 }
131 } 130 }
132 131
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index aacad98..3734e03 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -1219,13 +1219,19 @@ namespace OpenSim.Region.Framework.Scenes
1219 { 1219 {
1220 if (engine != null) 1220 if (engine != null)
1221 { 1221 {
1222// m_log.DebugFormat(
1223// "[PRIM INVENTORY]: Resuming script {0} {1} for {2}, OwnerChanged {3}",
1224// item.Name, item.ItemID, item.OwnerID, item.OwnerChanged);
1225
1226 engine.ResumeScript(item.ItemID);
1227
1222 if (item.OwnerChanged) 1228 if (item.OwnerChanged)
1223 engine.PostScriptEvent(item.ItemID, "changed", new Object[] { (int)Changed.OWNER }); 1229 engine.PostScriptEvent(item.ItemID, "changed", new Object[] { (int)Changed.OWNER });
1230
1224 item.OwnerChanged = false; 1231 item.OwnerChanged = false;
1225 engine.ResumeScript(item.ItemID);
1226 } 1232 }
1227 } 1233 }
1228 } 1234 }
1229 } 1235 }
1230 } 1236 }
1231} 1237} \ No newline at end of file