aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs227
1 files changed, 148 insertions, 79 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 3a4f52e..0a8edf9 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -62,7 +62,8 @@ namespace OpenSim.Region.Framework.Scenes
62 TELEPORT = 512, 62 TELEPORT = 512,
63 REGION_RESTART = 1024, 63 REGION_RESTART = 1024,
64 MEDIA = 2048, 64 MEDIA = 2048,
65 ANIMATION = 16384 65 ANIMATION = 16384,
66 POSITION = 32768
66 } 67 }
67 68
68 // I don't really know where to put this except here. 69 // I don't really know where to put this except here.
@@ -177,6 +178,15 @@ namespace OpenSim.Region.Framework.Scenes
177 178
178 public UUID FromFolderID; 179 public UUID FromFolderID;
179 180
181 // The following two are to hold the attachment data
182 // while an object is inworld
183 [XmlIgnore]
184 public byte AttachPoint = 0;
185
186 [XmlIgnore]
187 public Vector3 AttachOffset = Vector3.Zero;
188
189 [XmlIgnore]
180 public int STATUS_ROTATE_X; 190 public int STATUS_ROTATE_X;
181 191
182 public int STATUS_ROTATE_Y; 192 public int STATUS_ROTATE_Y;
@@ -246,6 +256,7 @@ namespace OpenSim.Region.Framework.Scenes
246 private Quaternion m_sitTargetOrientation = Quaternion.Identity; 256 private Quaternion m_sitTargetOrientation = Quaternion.Identity;
247 private Vector3 m_sitTargetPosition; 257 private Vector3 m_sitTargetPosition;
248 private string m_sitAnimation = "SIT"; 258 private string m_sitAnimation = "SIT";
259 private bool m_occupied; // KF if any av is sitting on this prim
249 private string m_text = String.Empty; 260 private string m_text = String.Empty;
250 private string m_touchName = String.Empty; 261 private string m_touchName = String.Empty;
251 private readonly Stack<UndoState> m_undo = new Stack<UndoState>(5); 262 private readonly Stack<UndoState> m_undo = new Stack<UndoState>(5);
@@ -289,6 +300,7 @@ namespace OpenSim.Region.Framework.Scenes
289 protected Vector3 m_lastAcceleration; 300 protected Vector3 m_lastAcceleration;
290 protected Vector3 m_lastAngularVelocity; 301 protected Vector3 m_lastAngularVelocity;
291 protected int m_lastTerseSent; 302 protected int m_lastTerseSent;
303 protected float m_buoyancy = 0.0f;
292 304
293 /// <summary> 305 /// <summary>
294 /// Stores media texture data 306 /// Stores media texture data
@@ -341,7 +353,7 @@ namespace OpenSim.Region.Framework.Scenes
341 UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition, 353 UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition,
342 Quaternion rotationOffset, Vector3 offsetPosition) 354 Quaternion rotationOffset, Vector3 offsetPosition)
343 { 355 {
344 m_name = "Primitive"; 356 m_name = "Object";
345 357
346 Rezzed = DateTime.UtcNow; 358 Rezzed = DateTime.UtcNow;
347 _creationDate = (int)Utils.DateTimeToUnixTime(Rezzed); 359 _creationDate = (int)Utils.DateTimeToUnixTime(Rezzed);
@@ -396,7 +408,7 @@ namespace OpenSim.Region.Framework.Scenes
396 private uint _ownerMask = (uint)PermissionMask.All; 408 private uint _ownerMask = (uint)PermissionMask.All;
397 private uint _groupMask = (uint)PermissionMask.None; 409 private uint _groupMask = (uint)PermissionMask.None;
398 private uint _everyoneMask = (uint)PermissionMask.None; 410 private uint _everyoneMask = (uint)PermissionMask.None;
399 private uint _nextOwnerMask = (uint)PermissionMask.All; 411 private uint _nextOwnerMask = (uint)(PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer);
400 private PrimFlags _flags = PrimFlags.None; 412 private PrimFlags _flags = PrimFlags.None;
401 private DateTime m_expires; 413 private DateTime m_expires;
402 private DateTime m_rezzed; 414 private DateTime m_rezzed;
@@ -495,12 +507,16 @@ namespace OpenSim.Region.Framework.Scenes
495 } 507 }
496 508
497 /// <value> 509 /// <value>
498 /// Access should be via Inventory directly - this property temporarily remains for xml serialization purposes 510 /// Get the inventory list
499 /// </value> 511 /// </value>
500 public TaskInventoryDictionary TaskInventory 512 public TaskInventoryDictionary TaskInventory
501 { 513 {
502 get { return m_inventory.Items; } 514 get {
503 set { m_inventory.Items = value; } 515 return m_inventory.Items;
516 }
517 set {
518 m_inventory.Items = value;
519 }
504 } 520 }
505 521
506 /// <summary> 522 /// <summary>
@@ -641,14 +657,12 @@ namespace OpenSim.Region.Framework.Scenes
641 set { m_LoopSoundSlavePrims = value; } 657 set { m_LoopSoundSlavePrims = value; }
642 } 658 }
643 659
644
645 public Byte[] TextureAnimation 660 public Byte[] TextureAnimation
646 { 661 {
647 get { return m_TextureAnimation; } 662 get { return m_TextureAnimation; }
648 set { m_TextureAnimation = value; } 663 set { m_TextureAnimation = value; }
649 } 664 }
650 665
651
652 public Byte[] ParticleSystem 666 public Byte[] ParticleSystem
653 { 667 {
654 get { return m_particleSystem; } 668 get { return m_particleSystem; }
@@ -685,9 +699,11 @@ namespace OpenSim.Region.Framework.Scenes
685 { 699 {
686 // If this is a linkset, we don't want the physics engine mucking up our group position here. 700 // If this is a linkset, we don't want the physics engine mucking up our group position here.
687 PhysicsActor actor = PhysActor; 701 PhysicsActor actor = PhysActor;
688 if (actor != null && _parentID == 0) 702 if (_parentID == 0)
689 { 703 {
690 m_groupPosition = actor.Position; 704 if (actor != null)
705 m_groupPosition = actor.Position;
706 return m_groupPosition;
691 } 707 }
692 708
693 if (m_parentGroup.IsAttachment) 709 if (m_parentGroup.IsAttachment)
@@ -697,12 +713,14 @@ namespace OpenSim.Region.Framework.Scenes
697 return sp.AbsolutePosition; 713 return sp.AbsolutePosition;
698 } 714 }
699 715
716 // use root prim's group position. Physics may have updated it
717 if (ParentGroup.RootPart != this)
718 m_groupPosition = ParentGroup.RootPart.GroupPosition;
700 return m_groupPosition; 719 return m_groupPosition;
701 } 720 }
702 set 721 set
703 { 722 {
704 m_groupPosition = value; 723 m_groupPosition = value;
705
706 PhysicsActor actor = PhysActor; 724 PhysicsActor actor = PhysActor;
707 if (actor != null) 725 if (actor != null)
708 { 726 {
@@ -722,22 +740,13 @@ namespace OpenSim.Region.Framework.Scenes
722 740
723 // Tell the physics engines that this prim changed. 741 // Tell the physics engines that this prim changed.
724 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); 742 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
743
725 } 744 }
726 catch (Exception e) 745 catch (Exception e)
727 { 746 {
728 m_log.Error("[SCENEOBJECTPART]: GROUP POSITION. " + e.Message); 747 m_log.Error("[SCENEOBJECTPART]: GROUP POSITION. " + e.Message);
729 } 748 }
730 } 749 }
731
732 // TODO if we decide to do sitting in a more SL compatible way (multiple avatars per prim), this has to be fixed, too
733 if (m_sitTargetAvatar != UUID.Zero)
734 {
735 ScenePresence avatar;
736 if (m_parentGroup.Scene.TryGetScenePresence(m_sitTargetAvatar, out avatar))
737 {
738 avatar.ParentPosition = GetWorldPosition();
739 }
740 }
741 } 750 }
742 } 751 }
743 752
@@ -746,7 +755,7 @@ namespace OpenSim.Region.Framework.Scenes
746 get { return m_offsetPosition; } 755 get { return m_offsetPosition; }
747 set 756 set
748 { 757 {
749// StoreUndoState(); 758 Vector3 oldpos = m_offsetPosition;
750 m_offsetPosition = value; 759 m_offsetPosition = value;
751 760
752 if (ParentGroup != null && !ParentGroup.IsDeleted) 761 if (ParentGroup != null && !ParentGroup.IsDeleted)
@@ -761,7 +770,22 @@ namespace OpenSim.Region.Framework.Scenes
761 if (m_parentGroup.Scene != null) 770 if (m_parentGroup.Scene != null)
762 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); 771 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
763 } 772 }
773
774 if (!m_parentGroup.m_dupeInProgress)
775 {
776 List<ScenePresence> avs = ParentGroup.GetLinkedAvatars();
777 foreach (ScenePresence av in avs)
778 {
779 if (av.ParentID == m_localId)
780 {
781 Vector3 offset = (m_offsetPosition - oldpos);
782 av.AbsolutePosition += offset;
783 av.SendAvatarDataToAllAgents();
784 }
785 }
786 }
764 } 787 }
788 TriggerScriptChangedEvent(Changed.POSITION);
765 } 789 }
766 } 790 }
767 791
@@ -888,7 +912,16 @@ namespace OpenSim.Region.Framework.Scenes
888 /// <summary></summary> 912 /// <summary></summary>
889 public Vector3 Acceleration 913 public Vector3 Acceleration
890 { 914 {
891 get { return m_acceleration; } 915 get
916 {
917 PhysicsActor actor = PhysActor;
918 if (actor != null)
919 {
920 m_acceleration = actor.Acceleration;
921 }
922 return m_acceleration;
923 }
924
892 set { m_acceleration = value; } 925 set { m_acceleration = value; }
893 } 926 }
894 927
@@ -1219,6 +1252,13 @@ namespace OpenSim.Region.Framework.Scenes
1219 _flags = value; 1252 _flags = value;
1220 } 1253 }
1221 } 1254 }
1255
1256 [XmlIgnore]
1257 public bool IsOccupied // KF If an av is sittingon this prim
1258 {
1259 get { return m_occupied; }
1260 set { m_occupied = value; }
1261 }
1222 1262
1223 /// <summary> 1263 /// <summary>
1224 /// ID of the avatar that is sat on us. If there is no such avatar then is UUID.Zero 1264 /// ID of the avatar that is sat on us. If there is no such avatar then is UUID.Zero
@@ -1278,6 +1318,19 @@ namespace OpenSim.Region.Framework.Scenes
1278 set { m_collisionSoundVolume = value; } 1318 set { m_collisionSoundVolume = value; }
1279 } 1319 }
1280 1320
1321 public float Buoyancy
1322 {
1323 get { return m_buoyancy; }
1324 set
1325 {
1326 m_buoyancy = value;
1327 if (PhysActor != null)
1328 {
1329 PhysActor.Buoyancy = value;
1330 }
1331 }
1332 }
1333
1281 #endregion Public Properties with only Get 1334 #endregion Public Properties with only Get
1282 1335
1283 private uint ApplyMask(uint val, bool set, uint mask) 1336 private uint ApplyMask(uint val, bool set, uint mask)
@@ -1649,6 +1702,9 @@ namespace OpenSim.Region.Framework.Scenes
1649 1702
1650 // Move afterwards ResetIDs as it clears the localID 1703 // Move afterwards ResetIDs as it clears the localID
1651 dupe.LocalId = localID; 1704 dupe.LocalId = localID;
1705 if(dupe.PhysActor != null)
1706 dupe.PhysActor.LocalID = localID;
1707
1652 // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated. 1708 // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated.
1653 dupe._lastOwnerID = OwnerID; 1709 dupe._lastOwnerID = OwnerID;
1654 1710
@@ -2010,19 +2066,17 @@ namespace OpenSim.Region.Framework.Scenes
2010 public Vector3 GetWorldPosition() 2066 public Vector3 GetWorldPosition()
2011 { 2067 {
2012 Quaternion parentRot = ParentGroup.RootPart.RotationOffset; 2068 Quaternion parentRot = ParentGroup.RootPart.RotationOffset;
2013
2014 Vector3 axPos = OffsetPosition; 2069 Vector3 axPos = OffsetPosition;
2015
2016 axPos *= parentRot; 2070 axPos *= parentRot;
2017 Vector3 translationOffsetPosition = axPos; 2071 Vector3 translationOffsetPosition = axPos;
2018 2072 if(_parentID == 0)
2019// m_log.DebugFormat("[SCENE OBJECT PART]: Found group pos {0} for part {1}", GroupPosition, Name); 2073 {
2020 2074 return GroupPosition;
2021 Vector3 worldPos = GroupPosition + translationOffsetPosition; 2075 }
2022 2076 else
2023// m_log.DebugFormat("[SCENE OBJECT PART]: Found world pos {0} for part {1}", worldPos, Name); 2077 {
2024 2078 return ParentGroup.AbsolutePosition + translationOffsetPosition; //KF: Fix child prim position
2025 return worldPos; 2079 }
2026 } 2080 }
2027 2081
2028 /// <summary> 2082 /// <summary>
@@ -2662,17 +2716,18 @@ namespace OpenSim.Region.Framework.Scenes
2662 //Trys to fetch sound id from prim's inventory. 2716 //Trys to fetch sound id from prim's inventory.
2663 //Prim's inventory doesn't support non script items yet 2717 //Prim's inventory doesn't support non script items yet
2664 2718
2665 lock (TaskInventory) 2719 TaskInventory.LockItemsForRead(true);
2720
2721 foreach (KeyValuePair<UUID, TaskInventoryItem> item in TaskInventory)
2666 { 2722 {
2667 foreach (KeyValuePair<UUID, TaskInventoryItem> item in TaskInventory) 2723 if (item.Value.Name == sound)
2668 { 2724 {
2669 if (item.Value.Name == sound) 2725 soundID = item.Value.ItemID;
2670 { 2726 break;
2671 soundID = item.Value.ItemID;
2672 break;
2673 }
2674 } 2727 }
2675 } 2728 }
2729
2730 TaskInventory.LockItemsForRead(false);
2676 } 2731 }
2677 2732
2678 m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp) 2733 m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp)
@@ -2755,7 +2810,7 @@ namespace OpenSim.Region.Framework.Scenes
2755 2810
2756 public void RotLookAt(Quaternion target, float strength, float damping) 2811 public void RotLookAt(Quaternion target, float strength, float damping)
2757 { 2812 {
2758 rotLookAt(target, strength, damping); 2813 m_parentGroup.rotLookAt(target, strength, damping); // This calls method in SceneObjectGroup.
2759 } 2814 }
2760 2815
2761 public void rotLookAt(Quaternion target, float strength, float damping) 2816 public void rotLookAt(Quaternion target, float strength, float damping)
@@ -3001,8 +3056,8 @@ namespace OpenSim.Region.Framework.Scenes
3001 { 3056 {
3002 const float ROTATION_TOLERANCE = 0.01f; 3057 const float ROTATION_TOLERANCE = 0.01f;
3003 const float VELOCITY_TOLERANCE = 0.001f; 3058 const float VELOCITY_TOLERANCE = 0.001f;
3004 const float POSITION_TOLERANCE = 0.05f; 3059 const float POSITION_TOLERANCE = 0.05f; // I don't like this, but I suppose it's necessary
3005 const int TIME_MS_TOLERANCE = 3000; 3060 const int TIME_MS_TOLERANCE = 200; //llSetPos has a 200ms delay. This should NOT be 3 seconds.
3006 3061
3007 if (m_updateFlag == 1) 3062 if (m_updateFlag == 1)
3008 { 3063 {
@@ -3016,7 +3071,7 @@ namespace OpenSim.Region.Framework.Scenes
3016 Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) 3071 Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
3017 { 3072 {
3018 AddTerseUpdateToAllAvatars(); 3073 AddTerseUpdateToAllAvatars();
3019 ClearUpdateSchedule(); 3074
3020 3075
3021 // This causes the Scene to 'poll' physical objects every couple of frames 3076 // This causes the Scene to 'poll' physical objects every couple of frames
3022 // bad, so it's been replaced by an event driven method. 3077 // bad, so it's been replaced by an event driven method.
@@ -3034,16 +3089,18 @@ namespace OpenSim.Region.Framework.Scenes
3034 m_lastAngularVelocity = AngularVelocity; 3089 m_lastAngularVelocity = AngularVelocity;
3035 m_lastTerseSent = Environment.TickCount; 3090 m_lastTerseSent = Environment.TickCount;
3036 } 3091 }
3092 //Moved this outside of the if clause so updates don't get blocked.. *sigh*
3093 m_updateFlag = 0; //Why were we calling a function to do this? Inefficient! *screams*
3037 } 3094 }
3038 else 3095 else
3039 { 3096 {
3040 if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes 3097 if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes
3041 { 3098 {
3042 AddFullUpdateToAllAvatars(); 3099 AddFullUpdateToAllAvatars();
3043 ClearUpdateSchedule(); 3100 m_updateFlag = 0; //Same here
3044 } 3101 }
3045 } 3102 }
3046 ClearUpdateSchedule(); 3103 m_updateFlag = 0;
3047 } 3104 }
3048 3105
3049 /// <summary> 3106 /// <summary>
@@ -3071,17 +3128,16 @@ namespace OpenSim.Region.Framework.Scenes
3071 if (!UUID.TryParse(sound, out soundID)) 3128 if (!UUID.TryParse(sound, out soundID))
3072 { 3129 {
3073 // search sound file from inventory 3130 // search sound file from inventory
3074 lock (TaskInventory) 3131 TaskInventory.LockItemsForRead(true);
3132 foreach (KeyValuePair<UUID, TaskInventoryItem> item in TaskInventory)
3075 { 3133 {
3076 foreach (KeyValuePair<UUID, TaskInventoryItem> item in TaskInventory) 3134 if (item.Value.Name == sound && item.Value.Type == (int)AssetType.Sound)
3077 { 3135 {
3078 if (item.Value.Name == sound && item.Value.Type == (int)AssetType.Sound) 3136 soundID = item.Value.ItemID;
3079 { 3137 break;
3080 soundID = item.Value.ItemID;
3081 break;
3082 }
3083 } 3138 }
3084 } 3139 }
3140 TaskInventory.LockItemsForRead(false);
3085 } 3141 }
3086 3142
3087 if (soundID == UUID.Zero) 3143 if (soundID == UUID.Zero)
@@ -3492,7 +3548,7 @@ namespace OpenSim.Region.Framework.Scenes
3492 3548
3493 public void StopLookAt() 3549 public void StopLookAt()
3494 { 3550 {
3495 m_parentGroup.stopLookAt(); 3551 m_parentGroup.stopLookAt(); // This calls method in SceneObjectGroup.
3496 3552
3497 m_parentGroup.ScheduleGroupForTerseUpdate(); 3553 m_parentGroup.ScheduleGroupForTerseUpdate();
3498 } 3554 }
@@ -3543,45 +3599,45 @@ namespace OpenSim.Region.Framework.Scenes
3543 // TODO: May need to fix for group comparison 3599 // TODO: May need to fix for group comparison
3544 if (last.Compare(this)) 3600 if (last.Compare(this))
3545 { 3601 {
3546 // m_log.DebugFormat( 3602 // m_log.DebugFormat(
3547 // "[SCENE OBJECT PART]: Not storing undo for {0} {1} since current state is same as last undo state, initial stack size {2}", 3603 // "[SCENE OBJECT PART]: Not storing undo for {0} {1} since current state is same as last undo state, initial stack size {2}",
3548 // Name, LocalId, m_undo.Count); 3604 // Name, LocalId, m_undo.Count);
3549 3605
3550 return; 3606 return;
3551 } 3607 }
3552 } 3608 }
3553 } 3609 }
3554 3610
3555 // m_log.DebugFormat( 3611 // m_log.DebugFormat(
3556 // "[SCENE OBJECT PART]: Storing undo state for {0} {1}, forGroup {2}, initial stack size {3}", 3612 // "[SCENE OBJECT PART]: Storing undo state for {0} {1}, forGroup {2}, initial stack size {3}",
3557 // Name, LocalId, forGroup, m_undo.Count); 3613 // Name, LocalId, forGroup, m_undo.Count);
3558 3614
3559 if (m_parentGroup.GetSceneMaxUndo() > 0) 3615 if (m_parentGroup.GetSceneMaxUndo() > 0)
3560 { 3616 {
3561 UndoState nUndo = new UndoState(this, forGroup); 3617 UndoState nUndo = new UndoState(this, forGroup);
3562 3618
3563 m_undo.Push(nUndo); 3619 m_undo.Push(nUndo);
3564 3620
3565 if (m_redo.Count > 0) 3621 if (m_redo.Count > 0)
3566 m_redo.Clear(); 3622 m_redo.Clear();
3567 3623
3568 // m_log.DebugFormat( 3624 // m_log.DebugFormat(
3569 // "[SCENE OBJECT PART]: Stored undo state for {0} {1}, forGroup {2}, stack size now {3}", 3625 // "[SCENE OBJECT PART]: Stored undo state for {0} {1}, forGroup {2}, stack size now {3}",
3570 // Name, LocalId, forGroup, m_undo.Count); 3626 // Name, LocalId, forGroup, m_undo.Count);
3571 } 3627 }
3572 } 3628 }
3573 } 3629 }
3574 } 3630 }
3575// else 3631 // else
3576// { 3632 // {
3577// m_log.DebugFormat("[SCENE OBJECT PART]: Ignoring undo store for {0} {1}", Name, LocalId); 3633 // m_log.DebugFormat("[SCENE OBJECT PART]: Ignoring undo store for {0} {1}", Name, LocalId);
3578// } 3634 // }
3579 } 3635 }
3580// else 3636 // else
3581// { 3637 // {
3582// m_log.DebugFormat( 3638 // m_log.DebugFormat(
3583// "[SCENE OBJECT PART]: Ignoring undo store for {0} {1} since already undoing", Name, LocalId); 3639 // "[SCENE OBJECT PART]: Ignoring undo store for {0} {1} since already undoing", Name, LocalId);
3584// } 3640 // }
3585 } 3641 }
3586 3642
3587 /// <summary> 3643 /// <summary>
@@ -4628,8 +4684,9 @@ namespace OpenSim.Region.Framework.Scenes
4628 { 4684 {
4629 m_shape.TextureEntry = textureEntry; 4685 m_shape.TextureEntry = textureEntry;
4630 TriggerScriptChangedEvent(Changed.TEXTURE); 4686 TriggerScriptChangedEvent(Changed.TEXTURE);
4631 4687 m_updateFlag = 1;
4632 ParentGroup.HasGroupChanged = true; 4688 ParentGroup.HasGroupChanged = true;
4689
4633 //This is madness.. 4690 //This is madness..
4634 //ParentGroup.ScheduleGroupForFullUpdate(); 4691 //ParentGroup.ScheduleGroupForFullUpdate();
4635 //This is sparta 4692 //This is sparta
@@ -4826,5 +4883,17 @@ namespace OpenSim.Region.Framework.Scenes
4826 Color color = Color; 4883 Color color = Color;
4827 return new Color4(color.R, color.G, color.B, (byte)(0xFF - color.A)); 4884 return new Color4(color.R, color.G, color.B, (byte)(0xFF - color.A));
4828 } 4885 }
4886
4887 public void ResetOwnerChangeFlag()
4888 {
4889 List<UUID> inv = Inventory.GetInventoryList();
4890
4891 foreach (UUID itemID in inv)
4892 {
4893 TaskInventoryItem item = Inventory.GetInventoryItem(itemID);
4894 item.OwnerChanged = false;
4895 Inventory.UpdateInventoryItem(item, false, false);
4896 }
4897 }
4829 } 4898 }
4830} 4899}