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.cs211
1 files changed, 114 insertions, 97 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 13e4b56..f8ae321 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -147,7 +147,7 @@ namespace OpenSim.Region.Framework.Scenes
147 147
148 // TODO: This needs to be persisted in next XML version update! 148 // TODO: This needs to be persisted in next XML version update!
149 [XmlIgnore] 149 [XmlIgnore]
150 public readonly int[] PayPrice = {-2,-2,-2,-2,-2}; 150 public int[] PayPrice = {-2,-2,-2,-2,-2};
151 [XmlIgnore] 151 [XmlIgnore]
152 public PhysicsActor PhysActor; 152 public PhysicsActor PhysActor;
153 153
@@ -277,6 +277,7 @@ namespace OpenSim.Region.Framework.Scenes
277 private Quaternion m_sitTargetOrientation = Quaternion.Identity; 277 private Quaternion m_sitTargetOrientation = Quaternion.Identity;
278 private Vector3 m_sitTargetPosition; 278 private Vector3 m_sitTargetPosition;
279 private string m_sitAnimation = "SIT"; 279 private string m_sitAnimation = "SIT";
280 private bool m_occupied; // KF if any av is sitting on this prim
280 private string m_text = String.Empty; 281 private string m_text = String.Empty;
281 private string m_touchName = String.Empty; 282 private string m_touchName = String.Empty;
282 private readonly UndoStack<UndoState> m_undo = new UndoStack<UndoState>(5); 283 private readonly UndoStack<UndoState> m_undo = new UndoStack<UndoState>(5);
@@ -360,7 +361,7 @@ namespace OpenSim.Region.Framework.Scenes
360 UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition, 361 UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition,
361 Quaternion rotationOffset, Vector3 offsetPosition) 362 Quaternion rotationOffset, Vector3 offsetPosition)
362 { 363 {
363 m_name = "Primitive"; 364 m_name = "Object";
364 365
365 Rezzed = DateTime.UtcNow; 366 Rezzed = DateTime.UtcNow;
366 _creationDate = (int)Utils.DateTimeToUnixTime(Rezzed); 367 _creationDate = (int)Utils.DateTimeToUnixTime(Rezzed);
@@ -456,12 +457,16 @@ namespace OpenSim.Region.Framework.Scenes
456 } 457 }
457 458
458 /// <value> 459 /// <value>
459 /// Access should be via Inventory directly - this property temporarily remains for xml serialization purposes 460 /// Get the inventory list
460 /// </value> 461 /// </value>
461 public TaskInventoryDictionary TaskInventory 462 public TaskInventoryDictionary TaskInventory
462 { 463 {
463 get { return m_inventory.Items; } 464 get {
464 set { m_inventory.Items = value; } 465 return m_inventory.Items;
466 }
467 set {
468 m_inventory.Items = value;
469 }
465 } 470 }
466 471
467 public uint ObjectFlags 472 public uint ObjectFlags
@@ -590,14 +595,12 @@ namespace OpenSim.Region.Framework.Scenes
590 set { m_LoopSoundSlavePrims = value; } 595 set { m_LoopSoundSlavePrims = value; }
591 } 596 }
592 597
593 [XmlIgnore]
594 public Byte[] TextureAnimation 598 public Byte[] TextureAnimation
595 { 599 {
596 get { return m_TextureAnimation; } 600 get { return m_TextureAnimation; }
597 set { m_TextureAnimation = value; } 601 set { m_TextureAnimation = value; }
598 } 602 }
599 603
600 [XmlIgnore]
601 public Byte[] ParticleSystem 604 public Byte[] ParticleSystem
602 { 605 {
603 get { return m_particleSystem; } 606 get { return m_particleSystem; }
@@ -651,7 +654,6 @@ namespace OpenSim.Region.Framework.Scenes
651 set 654 set
652 { 655 {
653 m_groupPosition = value; 656 m_groupPosition = value;
654
655 PhysicsActor actor = PhysActor; 657 PhysicsActor actor = PhysActor;
656 if (actor != null) 658 if (actor != null)
657 { 659 {
@@ -698,7 +700,7 @@ namespace OpenSim.Region.Framework.Scenes
698 get { return m_offsetPosition; } 700 get { return m_offsetPosition; }
699 set 701 set
700 { 702 {
701 StoreUndoState(); 703 StoreUndoState(UndoType.STATE_PRIM_POSITION);
702 m_offsetPosition = value; 704 m_offsetPosition = value;
703 705
704 if (ParentGroup != null && !ParentGroup.IsDeleted) 706 if (ParentGroup != null && !ParentGroup.IsDeleted)
@@ -712,6 +714,12 @@ namespace OpenSim.Region.Framework.Scenes
712 // Tell the physics engines that this prim changed. 714 // Tell the physics engines that this prim changed.
713 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); 715 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
714 } 716 }
717
718 List<ScenePresence> avs = ParentGroup.GetLinkedAvatars();
719 foreach (ScenePresence av in avs)
720 {
721 av.SendFullUpdateToAllClients();
722 }
715 } 723 }
716 } 724 }
717 } 725 }
@@ -754,7 +762,7 @@ namespace OpenSim.Region.Framework.Scenes
754 762
755 set 763 set
756 { 764 {
757 StoreUndoState(); 765 StoreUndoState(UndoType.STATE_PRIM_ROTATION);
758 m_rotationOffset = value; 766 m_rotationOffset = value;
759 767
760 PhysicsActor actor = PhysActor; 768 PhysicsActor actor = PhysActor;
@@ -838,7 +846,16 @@ namespace OpenSim.Region.Framework.Scenes
838 /// <summary></summary> 846 /// <summary></summary>
839 public Vector3 Acceleration 847 public Vector3 Acceleration
840 { 848 {
841 get { return m_acceleration; } 849 get
850 {
851 PhysicsActor actor = PhysActor;
852 if (actor != null)
853 {
854 m_acceleration = actor.Acceleration;
855 }
856 return m_acceleration;
857 }
858
842 set { m_acceleration = value; } 859 set { m_acceleration = value; }
843 } 860 }
844 861
@@ -865,7 +882,6 @@ namespace OpenSim.Region.Framework.Scenes
865 set 882 set
866 { 883 {
867 m_color = value; 884 m_color = value;
868 TriggerScriptChangedEvent(Changed.COLOR);
869 885
870 /* ScheduleFullUpdate() need not be called b/c after 886 /* ScheduleFullUpdate() need not be called b/c after
871 * setting the color, the text will be set, so then 887 * setting the color, the text will be set, so then
@@ -944,7 +960,7 @@ namespace OpenSim.Region.Framework.Scenes
944 get { return m_shape.Scale; } 960 get { return m_shape.Scale; }
945 set 961 set
946 { 962 {
947 StoreUndoState(); 963 StoreUndoState(UndoType.STATE_PRIM_SCALE);
948 if (m_shape != null) 964 if (m_shape != null)
949 { 965 {
950 m_shape.Scale = value; 966 m_shape.Scale = value;
@@ -989,7 +1005,8 @@ namespace OpenSim.Region.Framework.Scenes
989 if (IsAttachment) 1005 if (IsAttachment)
990 return GroupPosition; 1006 return GroupPosition;
991 1007
992 return m_offsetPosition + m_groupPosition; } 1008// return m_offsetPosition + m_groupPosition; }
1009 return m_groupPosition + (m_offsetPosition * ParentGroup.RootPart.RotationOffset) ; } //KF: Rotation was ignored!
993 } 1010 }
994 1011
995 public SceneObjectGroup ParentGroup 1012 public SceneObjectGroup ParentGroup
@@ -1140,6 +1157,13 @@ namespace OpenSim.Region.Framework.Scenes
1140 get { return _flags; } 1157 get { return _flags; }
1141 set { _flags = value; } 1158 set { _flags = value; }
1142 } 1159 }
1160
1161 [XmlIgnore]
1162 public bool IsOccupied // KF If an av is sittingon this prim
1163 {
1164 get { return m_occupied; }
1165 set { m_occupied = value; }
1166 }
1143 1167
1144 [XmlIgnore] 1168 [XmlIgnore]
1145 public UUID SitTargetAvatar 1169 public UUID SitTargetAvatar
@@ -1215,14 +1239,6 @@ namespace OpenSim.Region.Framework.Scenes
1215 } 1239 }
1216 } 1240 }
1217 1241
1218 /// <summary>
1219 /// Clear all pending updates of parts to clients
1220 /// </summary>
1221 private void ClearUpdateSchedule()
1222 {
1223 m_updateFlag = 0;
1224 }
1225
1226 private void SendObjectPropertiesToClient(UUID AgentID) 1242 private void SendObjectPropertiesToClient(UUID AgentID)
1227 { 1243 {
1228 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) 1244 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
@@ -1508,7 +1524,7 @@ namespace OpenSim.Region.Framework.Scenes
1508 { 1524 {
1509 m_redo.Clear(); 1525 m_redo.Clear();
1510 } 1526 }
1511 StoreUndoState(); 1527 StoreUndoState(UndoType.STATE_ALL);
1512 } 1528 }
1513 1529
1514 public byte ConvertScriptUintToByte(uint indata) 1530 public byte ConvertScriptUintToByte(uint indata)
@@ -1611,7 +1627,7 @@ namespace OpenSim.Region.Framework.Scenes
1611 PrimitiveBaseShape shape = PrimitiveBaseShape.Create(); 1627 PrimitiveBaseShape shape = PrimitiveBaseShape.Create();
1612 part.Shape = shape; 1628 part.Shape = shape;
1613 1629
1614 part.Name = "Primitive"; 1630 part.Name = "Object";
1615 part._ownerID = UUID.Random(); 1631 part._ownerID = UUID.Random();
1616 1632
1617 return part; 1633 return part;
@@ -1734,7 +1750,7 @@ namespace OpenSim.Region.Framework.Scenes
1734 // which stops client-side interpolation of deactivated joint proxy objects. 1750 // which stops client-side interpolation of deactivated joint proxy objects.
1735 } 1751 }
1736 1752
1737 if (!UsePhysics && !isNew) 1753 if (!UsePhysics)
1738 { 1754 {
1739 // reset velocity to 0 on physics switch-off. Without that, the client thinks the 1755 // reset velocity to 0 on physics switch-off. Without that, the client thinks the
1740 // prim still has velocity and continues to interpolate its position along the old 1756 // prim still has velocity and continues to interpolate its position along the old
@@ -1969,12 +1985,17 @@ namespace OpenSim.Region.Framework.Scenes
1969 public Vector3 GetWorldPosition() 1985 public Vector3 GetWorldPosition()
1970 { 1986 {
1971 Quaternion parentRot = ParentGroup.RootPart.RotationOffset; 1987 Quaternion parentRot = ParentGroup.RootPart.RotationOffset;
1972
1973 Vector3 axPos = OffsetPosition; 1988 Vector3 axPos = OffsetPosition;
1974
1975 axPos *= parentRot; 1989 axPos *= parentRot;
1976 Vector3 translationOffsetPosition = axPos; 1990 Vector3 translationOffsetPosition = axPos;
1977 return GroupPosition + translationOffsetPosition; 1991 if(_parentID == 0)
1992 {
1993 return GroupPosition;
1994 }
1995 else
1996 {
1997 return ParentGroup.AbsolutePosition + translationOffsetPosition; //KF: Fix child prim position
1998 }
1978 } 1999 }
1979 2000
1980 /// <summary> 2001 /// <summary>
@@ -1985,7 +2006,7 @@ namespace OpenSim.Region.Framework.Scenes
1985 { 2006 {
1986 Quaternion newRot; 2007 Quaternion newRot;
1987 2008
1988 if (this.LinkNum == 0) 2009 if (this.LinkNum < 2) //KF Single or root prim
1989 { 2010 {
1990 newRot = RotationOffset; 2011 newRot = RotationOffset;
1991 } 2012 }
@@ -2631,17 +2652,18 @@ namespace OpenSim.Region.Framework.Scenes
2631 //Trys to fetch sound id from prim's inventory. 2652 //Trys to fetch sound id from prim's inventory.
2632 //Prim's inventory doesn't support non script items yet 2653 //Prim's inventory doesn't support non script items yet
2633 2654
2634 lock (TaskInventory) 2655 TaskInventory.LockItemsForRead(true);
2656
2657 foreach (KeyValuePair<UUID, TaskInventoryItem> item in TaskInventory)
2635 { 2658 {
2636 foreach (KeyValuePair<UUID, TaskInventoryItem> item in TaskInventory) 2659 if (item.Value.Name == sound)
2637 { 2660 {
2638 if (item.Value.Name == sound) 2661 soundID = item.Value.ItemID;
2639 { 2662 break;
2640 soundID = item.Value.ItemID;
2641 break;
2642 }
2643 } 2663 }
2644 } 2664 }
2665
2666 TaskInventory.LockItemsForRead(false);
2645 } 2667 }
2646 2668
2647 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp) 2669 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence sp)
@@ -2701,7 +2723,7 @@ namespace OpenSim.Region.Framework.Scenes
2701 /// <param name="scale"></param> 2723 /// <param name="scale"></param>
2702 public void Resize(Vector3 scale) 2724 public void Resize(Vector3 scale)
2703 { 2725 {
2704 StoreUndoState(); 2726 StoreUndoState(UndoType.STATE_PRIM_SCALE);
2705 m_shape.Scale = scale; 2727 m_shape.Scale = scale;
2706 2728
2707 ParentGroup.HasGroupChanged = true; 2729 ParentGroup.HasGroupChanged = true;
@@ -2710,38 +2732,7 @@ namespace OpenSim.Region.Framework.Scenes
2710 2732
2711 public void RotLookAt(Quaternion target, float strength, float damping) 2733 public void RotLookAt(Quaternion target, float strength, float damping)
2712 { 2734 {
2713 rotLookAt(target, strength, damping); 2735 m_parentGroup.rotLookAt(target, strength, damping); // This calls method in SceneObjectGroup.
2714 }
2715
2716 public void rotLookAt(Quaternion target, float strength, float damping)
2717 {
2718 if (IsAttachment)
2719 {
2720 /*
2721 ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
2722 if (avatar != null)
2723 {
2724 Rotate the Av?
2725 } */
2726 }
2727 else
2728 {
2729 APIDDamp = damping;
2730 APIDStrength = strength;
2731 APIDTarget = target;
2732 }
2733 }
2734
2735 public void startLookAt(Quaternion rot, float damp, float strength)
2736 {
2737 APIDDamp = damp;
2738 APIDStrength = strength;
2739 APIDTarget = rot;
2740 }
2741
2742 public void stopLookAt()
2743 {
2744 APIDTarget = Quaternion.Identity;
2745 } 2736 }
2746 2737
2747 /// <summary> 2738 /// <summary>
@@ -2753,7 +2744,10 @@ namespace OpenSim.Region.Framework.Scenes
2753 2744
2754 if (m_parentGroup != null) 2745 if (m_parentGroup != null)
2755 { 2746 {
2756 m_parentGroup.QueueForUpdateCheck(); 2747 if (!m_parentGroup.areUpdatesSuspended)
2748 {
2749 m_parentGroup.QueueForUpdateCheck();
2750 }
2757 } 2751 }
2758 2752
2759 int timeNow = Util.UnixTimeSinceEpoch(); 2753 int timeNow = Util.UnixTimeSinceEpoch();
@@ -2970,8 +2964,8 @@ namespace OpenSim.Region.Framework.Scenes
2970 { 2964 {
2971 const float ROTATION_TOLERANCE = 0.01f; 2965 const float ROTATION_TOLERANCE = 0.01f;
2972 const float VELOCITY_TOLERANCE = 0.001f; 2966 const float VELOCITY_TOLERANCE = 0.001f;
2973 const float POSITION_TOLERANCE = 0.05f; 2967 const float POSITION_TOLERANCE = 0.05f; // I don't like this, but I suppose it's necessary
2974 const int TIME_MS_TOLERANCE = 3000; 2968 const int TIME_MS_TOLERANCE = 200; //llSetPos has a 200ms delay. This should NOT be 3 seconds.
2975 2969
2976 if (m_updateFlag == 1) 2970 if (m_updateFlag == 1)
2977 { 2971 {
@@ -2985,7 +2979,7 @@ namespace OpenSim.Region.Framework.Scenes
2985 Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) 2979 Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
2986 { 2980 {
2987 AddTerseUpdateToAllAvatars(); 2981 AddTerseUpdateToAllAvatars();
2988 ClearUpdateSchedule(); 2982
2989 2983
2990 // This causes the Scene to 'poll' physical objects every couple of frames 2984 // This causes the Scene to 'poll' physical objects every couple of frames
2991 // bad, so it's been replaced by an event driven method. 2985 // bad, so it's been replaced by an event driven method.
@@ -3003,16 +2997,18 @@ namespace OpenSim.Region.Framework.Scenes
3003 m_lastAngularVelocity = AngularVelocity; 2997 m_lastAngularVelocity = AngularVelocity;
3004 m_lastTerseSent = Environment.TickCount; 2998 m_lastTerseSent = Environment.TickCount;
3005 } 2999 }
3000 //Moved this outside of the if clause so updates don't get blocked.. *sigh*
3001 m_updateFlag = 0; //Why were we calling a function to do this? Inefficient! *screams*
3006 } 3002 }
3007 else 3003 else
3008 { 3004 {
3009 if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes 3005 if (m_updateFlag == 2) // is a new prim, just created/reloaded or has major changes
3010 { 3006 {
3011 AddFullUpdateToAllAvatars(); 3007 AddFullUpdateToAllAvatars();
3012 ClearUpdateSchedule(); 3008 m_updateFlag = 0; //Same here
3013 } 3009 }
3014 } 3010 }
3015 ClearUpdateSchedule(); 3011 m_updateFlag = 0;
3016 } 3012 }
3017 3013
3018 /// <summary> 3014 /// <summary>
@@ -3039,17 +3035,16 @@ namespace OpenSim.Region.Framework.Scenes
3039 if (!UUID.TryParse(sound, out soundID)) 3035 if (!UUID.TryParse(sound, out soundID))
3040 { 3036 {
3041 // search sound file from inventory 3037 // search sound file from inventory
3042 lock (TaskInventory) 3038 TaskInventory.LockItemsForRead(true);
3039 foreach (KeyValuePair<UUID, TaskInventoryItem> item in TaskInventory)
3043 { 3040 {
3044 foreach (KeyValuePair<UUID, TaskInventoryItem> item in TaskInventory) 3041 if (item.Value.Name == sound && item.Value.Type == (int)AssetType.Sound)
3045 { 3042 {
3046 if (item.Value.Name == sound && item.Value.Type == (int)AssetType.Sound) 3043 soundID = item.Value.ItemID;
3047 { 3044 break;
3048 soundID = item.Value.ItemID;
3049 break;
3050 }
3051 } 3045 }
3052 } 3046 }
3047 TaskInventory.LockItemsForRead(false);
3053 } 3048 }
3054 3049
3055 if (soundID == UUID.Zero) 3050 if (soundID == UUID.Zero)
@@ -3484,7 +3479,7 @@ namespace OpenSim.Region.Framework.Scenes
3484 3479
3485 public void StopLookAt() 3480 public void StopLookAt()
3486 { 3481 {
3487 m_parentGroup.stopLookAt(); 3482 m_parentGroup.stopLookAt(); // This calls method in SceneObjectGroup.
3488 3483
3489 m_parentGroup.ScheduleGroupForTerseUpdate(); 3484 m_parentGroup.ScheduleGroupForTerseUpdate();
3490 } 3485 }
@@ -3511,10 +3506,9 @@ namespace OpenSim.Region.Framework.Scenes
3511 m_parentGroup.ScheduleGroupForTerseUpdate(); 3506 m_parentGroup.ScheduleGroupForTerseUpdate();
3512 //m_parentGroup.ScheduleGroupForFullUpdate(); 3507 //m_parentGroup.ScheduleGroupForFullUpdate();
3513 } 3508 }
3514 3509 public void StoreUndoState(UndoType type)
3515 public void StoreUndoState()
3516 { 3510 {
3517 if (!Undoing) 3511 if (!Undoing && (m_parentGroup == null || m_parentGroup.RootPart == null || !m_parentGroup.RootPart.Undoing))
3518 { 3512 {
3519 if (!IgnoreUndoUpdate) 3513 if (!IgnoreUndoUpdate)
3520 { 3514 {
@@ -3525,17 +3519,25 @@ namespace OpenSim.Region.Framework.Scenes
3525 if (m_undo.Count > 0) 3519 if (m_undo.Count > 0)
3526 { 3520 {
3527 UndoState last = m_undo.Peek(); 3521 UndoState last = m_undo.Peek();
3528 if (last != null) 3522
3529 {
3530 if (last.Compare(this))
3531 return;
3532 }
3533 } 3523 }
3534 3524
3535 if (m_parentGroup.GetSceneMaxUndo() > 0) 3525 if (m_parentGroup.GetSceneMaxUndo() > 0)
3536 { 3526 {
3537 UndoState nUndo = new UndoState(this); 3527 UndoState lastUndo = m_undo.Peek();
3538 3528
3529 UndoState nUndo = new UndoState(this, type);
3530
3531 if (lastUndo != null)
3532 {
3533 TimeSpan ts = DateTime.Now.Subtract(lastUndo.LastUpdated);
3534 if (ts.TotalMilliseconds < 500)
3535 {
3536 //Delete the last entry since it was less than 500 milliseconds ago
3537 nUndo.Merge(lastUndo);
3538 m_undo.Pop();
3539 }
3540 }
3539 m_undo.Push(nUndo); 3541 m_undo.Push(nUndo);
3540 } 3542 }
3541 3543
@@ -4012,11 +4014,13 @@ namespace OpenSim.Region.Framework.Scenes
4012 if (m_undo.Count > 0) 4014 if (m_undo.Count > 0)
4013 { 4015 {
4014 UndoState nUndo = null; 4016 UndoState nUndo = null;
4017 UndoState goback = m_undo.Pop();
4015 if (m_parentGroup.GetSceneMaxUndo() > 0) 4018 if (m_parentGroup.GetSceneMaxUndo() > 0)
4016 { 4019 {
4017 nUndo = new UndoState(this); 4020 nUndo = new UndoState(this, goback.Type);
4018 } 4021 }
4019 UndoState goback = m_undo.Pop(); 4022
4023
4020 if (goback != null) 4024 if (goback != null)
4021 { 4025 {
4022 goback.PlaybackState(this); 4026 goback.PlaybackState(this);
@@ -4031,13 +4035,13 @@ namespace OpenSim.Region.Framework.Scenes
4031 { 4035 {
4032 lock (m_redo) 4036 lock (m_redo)
4033 { 4037 {
4038 UndoState gofwd = m_redo.Pop();
4034 if (m_parentGroup.GetSceneMaxUndo() > 0) 4039 if (m_parentGroup.GetSceneMaxUndo() > 0)
4035 { 4040 {
4036 UndoState nUndo = new UndoState(this); 4041 UndoState nUndo = new UndoState(this, gofwd.Type);
4037 4042
4038 m_undo.Push(nUndo); 4043 m_undo.Push(nUndo);
4039 } 4044 }
4040 UndoState gofwd = m_redo.Pop();
4041 if (gofwd != null) 4045 if (gofwd != null)
4042 gofwd.PlayfwdState(this); 4046 gofwd.PlayfwdState(this);
4043 } 4047 }
@@ -4482,8 +4486,9 @@ namespace OpenSim.Region.Framework.Scenes
4482 { 4486 {
4483 m_shape.TextureEntry = textureEntry; 4487 m_shape.TextureEntry = textureEntry;
4484 TriggerScriptChangedEvent(Changed.TEXTURE); 4488 TriggerScriptChangedEvent(Changed.TEXTURE);
4485 4489 m_updateFlag = 1;
4486 ParentGroup.HasGroupChanged = true; 4490 ParentGroup.HasGroupChanged = true;
4491
4487 //This is madness.. 4492 //This is madness..
4488 //ParentGroup.ScheduleGroupForFullUpdate(); 4493 //ParentGroup.ScheduleGroupForFullUpdate();
4489 //This is sparta 4494 //This is sparta
@@ -4728,5 +4733,17 @@ namespace OpenSim.Region.Framework.Scenes
4728 Color color = Color; 4733 Color color = Color;
4729 return new Color4(color.R, color.G, color.B, (byte)(0xFF - color.A)); 4734 return new Color4(color.R, color.G, color.B, (byte)(0xFF - color.A));
4730 } 4735 }
4736
4737 public void ResetOwnerChangeFlag()
4738 {
4739 List<UUID> inv = Inventory.GetInventoryList();
4740
4741 foreach (UUID itemID in inv)
4742 {
4743 TaskInventoryItem item = Inventory.GetInventoryItem(itemID);
4744 item.OwnerChanged = false;
4745 Inventory.UpdateInventoryItem(item);
4746 }
4747 }
4731 } 4748 }
4732} 4749}