diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 204 |
1 files changed, 140 insertions, 64 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index ad3bcd5..c9a8832 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. |
@@ -184,6 +185,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
184 | 185 | ||
185 | public UUID FromFolderID; | 186 | public UUID FromFolderID; |
186 | 187 | ||
188 | // The following two are to hold the attachment data | ||
189 | // while an object is inworld | ||
190 | [XmlIgnore] | ||
191 | public byte AttachPoint = 0; | ||
192 | |||
193 | [XmlIgnore] | ||
194 | public Vector3 AttachOffset = Vector3.Zero; | ||
195 | |||
196 | [XmlIgnore] | ||
187 | public int STATUS_ROTATE_X; | 197 | public int STATUS_ROTATE_X; |
188 | 198 | ||
189 | public int STATUS_ROTATE_Y; | 199 | public int STATUS_ROTATE_Y; |
@@ -210,8 +220,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
210 | 220 | ||
211 | public Vector3 RotationAxis = Vector3.One; | 221 | public Vector3 RotationAxis = Vector3.One; |
212 | 222 | ||
213 | public bool VolumeDetectActive; // XmlIgnore set to avoid problems with persistance until I come to care for this | 223 | public bool VolumeDetectActive; |
214 | // Certainly this must be a persistant setting finally | ||
215 | 224 | ||
216 | public bool IsWaitingForFirstSpinUpdatePacket; | 225 | public bool IsWaitingForFirstSpinUpdatePacket; |
217 | 226 | ||
@@ -251,6 +260,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
251 | private Quaternion m_sitTargetOrientation = Quaternion.Identity; | 260 | private Quaternion m_sitTargetOrientation = Quaternion.Identity; |
252 | private Vector3 m_sitTargetPosition; | 261 | private Vector3 m_sitTargetPosition; |
253 | private string m_sitAnimation = "SIT"; | 262 | private string m_sitAnimation = "SIT"; |
263 | private bool m_occupied; // KF if any av is sitting on this prim | ||
254 | private string m_text = String.Empty; | 264 | private string m_text = String.Empty; |
255 | private string m_touchName = String.Empty; | 265 | private string m_touchName = String.Empty; |
256 | private readonly Stack<UndoState> m_undo = new Stack<UndoState>(5); | 266 | private readonly Stack<UndoState> m_undo = new Stack<UndoState>(5); |
@@ -283,6 +293,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
283 | protected Vector3 m_lastAcceleration; | 293 | protected Vector3 m_lastAcceleration; |
284 | protected Vector3 m_lastAngularVelocity; | 294 | protected Vector3 m_lastAngularVelocity; |
285 | protected int m_lastTerseSent; | 295 | protected int m_lastTerseSent; |
296 | protected float m_buoyancy = 0.0f; | ||
286 | 297 | ||
287 | /// <summary> | 298 | /// <summary> |
288 | /// Stores media texture data | 299 | /// Stores media texture data |
@@ -338,7 +349,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
338 | UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition, | 349 | UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition, |
339 | Quaternion rotationOffset, Vector3 offsetPosition) : this() | 350 | Quaternion rotationOffset, Vector3 offsetPosition) : this() |
340 | { | 351 | { |
341 | m_name = "Primitive"; | 352 | m_name = "Object"; |
342 | 353 | ||
343 | CreationDate = (int)Utils.DateTimeToUnixTime(Rezzed); | 354 | CreationDate = (int)Utils.DateTimeToUnixTime(Rezzed); |
344 | LastOwnerID = CreatorID = OwnerID = ownerID; | 355 | LastOwnerID = CreatorID = OwnerID = ownerID; |
@@ -378,7 +389,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
378 | private uint _ownerMask = (uint)PermissionMask.All; | 389 | private uint _ownerMask = (uint)PermissionMask.All; |
379 | private uint _groupMask = (uint)PermissionMask.None; | 390 | private uint _groupMask = (uint)PermissionMask.None; |
380 | private uint _everyoneMask = (uint)PermissionMask.None; | 391 | private uint _everyoneMask = (uint)PermissionMask.None; |
381 | private uint _nextOwnerMask = (uint)PermissionMask.All; | 392 | private uint _nextOwnerMask = (uint)(PermissionMask.Move | PermissionMask.Modify | PermissionMask.Transfer); |
382 | private PrimFlags _flags = PrimFlags.None; | 393 | private PrimFlags _flags = PrimFlags.None; |
383 | private DateTime m_expires; | 394 | private DateTime m_expires; |
384 | private DateTime m_rezzed; | 395 | private DateTime m_rezzed; |
@@ -472,12 +483,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
472 | } | 483 | } |
473 | 484 | ||
474 | /// <value> | 485 | /// <value> |
475 | /// Access should be via Inventory directly - this property temporarily remains for xml serialization purposes | 486 | /// Get the inventory list |
476 | /// </value> | 487 | /// </value> |
477 | public TaskInventoryDictionary TaskInventory | 488 | public TaskInventoryDictionary TaskInventory |
478 | { | 489 | { |
479 | get { return m_inventory.Items; } | 490 | get { |
480 | set { m_inventory.Items = value; } | 491 | return m_inventory.Items; |
492 | } | ||
493 | set { | ||
494 | m_inventory.Items = value; | ||
495 | } | ||
481 | } | 496 | } |
482 | 497 | ||
483 | /// <summary> | 498 | /// <summary> |
@@ -621,14 +636,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
621 | set { m_LoopSoundSlavePrims = value; } | 636 | set { m_LoopSoundSlavePrims = value; } |
622 | } | 637 | } |
623 | 638 | ||
624 | |||
625 | public Byte[] TextureAnimation | 639 | public Byte[] TextureAnimation |
626 | { | 640 | { |
627 | get { return m_TextureAnimation; } | 641 | get { return m_TextureAnimation; } |
628 | set { m_TextureAnimation = value; } | 642 | set { m_TextureAnimation = value; } |
629 | } | 643 | } |
630 | 644 | ||
631 | |||
632 | public Byte[] ParticleSystem | 645 | public Byte[] ParticleSystem |
633 | { | 646 | { |
634 | get { return m_particleSystem; } | 647 | get { return m_particleSystem; } |
@@ -665,9 +678,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
665 | { | 678 | { |
666 | // If this is a linkset, we don't want the physics engine mucking up our group position here. | 679 | // If this is a linkset, we don't want the physics engine mucking up our group position here. |
667 | PhysicsActor actor = PhysActor; | 680 | PhysicsActor actor = PhysActor; |
668 | if (actor != null && ParentID == 0) | 681 | if (ParentID == 0) |
669 | { | 682 | { |
670 | m_groupPosition = actor.Position; | 683 | if (actor != null) |
684 | m_groupPosition = actor.Position; | ||
685 | return m_groupPosition; | ||
671 | } | 686 | } |
672 | 687 | ||
673 | if (ParentGroup.IsAttachment) | 688 | if (ParentGroup.IsAttachment) |
@@ -677,12 +692,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
677 | return sp.AbsolutePosition; | 692 | return sp.AbsolutePosition; |
678 | } | 693 | } |
679 | 694 | ||
695 | // use root prim's group position. Physics may have updated it | ||
696 | if (ParentGroup.RootPart != this) | ||
697 | m_groupPosition = ParentGroup.RootPart.GroupPosition; | ||
680 | return m_groupPosition; | 698 | return m_groupPosition; |
681 | } | 699 | } |
682 | set | 700 | set |
683 | { | 701 | { |
684 | m_groupPosition = value; | 702 | m_groupPosition = value; |
685 | |||
686 | PhysicsActor actor = PhysActor; | 703 | PhysicsActor actor = PhysActor; |
687 | if (actor != null) | 704 | if (actor != null) |
688 | { | 705 | { |
@@ -708,16 +725,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
708 | m_log.Error("[SCENEOBJECTPART]: GROUP POSITION. " + e.Message); | 725 | m_log.Error("[SCENEOBJECTPART]: GROUP POSITION. " + e.Message); |
709 | } | 726 | } |
710 | } | 727 | } |
711 | |||
712 | // TODO if we decide to do sitting in a more SL compatible way (multiple avatars per prim), this has to be fixed, too | ||
713 | if (SitTargetAvatar != UUID.Zero) | ||
714 | { | ||
715 | ScenePresence avatar; | ||
716 | if (ParentGroup.Scene.TryGetScenePresence(SitTargetAvatar, out avatar)) | ||
717 | { | ||
718 | avatar.ParentPosition = GetWorldPosition(); | ||
719 | } | ||
720 | } | ||
721 | } | 728 | } |
722 | } | 729 | } |
723 | 730 | ||
@@ -726,7 +733,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
726 | get { return m_offsetPosition; } | 733 | get { return m_offsetPosition; } |
727 | set | 734 | set |
728 | { | 735 | { |
729 | // StoreUndoState(); | 736 | Vector3 oldpos = m_offsetPosition; |
730 | m_offsetPosition = value; | 737 | m_offsetPosition = value; |
731 | 738 | ||
732 | if (ParentGroup != null && !ParentGroup.IsDeleted) | 739 | if (ParentGroup != null && !ParentGroup.IsDeleted) |
@@ -741,7 +748,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
741 | if (ParentGroup.Scene != null) | 748 | if (ParentGroup.Scene != null) |
742 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); | 749 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); |
743 | } | 750 | } |
751 | |||
752 | if (!m_parentGroup.m_dupeInProgress) | ||
753 | { | ||
754 | List<ScenePresence> avs = ParentGroup.GetLinkedAvatars(); | ||
755 | foreach (ScenePresence av in avs) | ||
756 | { | ||
757 | if (av.ParentID == m_localId) | ||
758 | { | ||
759 | Vector3 offset = (m_offsetPosition - oldpos); | ||
760 | av.AbsolutePosition += offset; | ||
761 | av.SendAvatarDataToAllAgents(); | ||
762 | } | ||
763 | } | ||
764 | } | ||
744 | } | 765 | } |
766 | TriggerScriptChangedEvent(Changed.POSITION); | ||
745 | } | 767 | } |
746 | } | 768 | } |
747 | 769 | ||
@@ -890,7 +912,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
890 | /// <summary></summary> | 912 | /// <summary></summary> |
891 | public Vector3 Acceleration | 913 | public Vector3 Acceleration |
892 | { | 914 | { |
893 | 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 | |||
894 | set { m_acceleration = value; } | 925 | set { m_acceleration = value; } |
895 | } | 926 | } |
896 | 927 | ||
@@ -1041,10 +1072,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1041 | { | 1072 | { |
1042 | get | 1073 | get |
1043 | { | 1074 | { |
1044 | if (ParentGroup.IsAttachment) | 1075 | return GroupPosition + (m_offsetPosition * ParentGroup.RootPart.RotationOffset); |
1045 | return GroupPosition; | ||
1046 | |||
1047 | return m_offsetPosition + m_groupPosition; | ||
1048 | } | 1076 | } |
1049 | } | 1077 | } |
1050 | 1078 | ||
@@ -1214,6 +1242,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1214 | _flags = value; | 1242 | _flags = value; |
1215 | } | 1243 | } |
1216 | } | 1244 | } |
1245 | |||
1246 | [XmlIgnore] | ||
1247 | public bool IsOccupied // KF If an av is sittingon this prim | ||
1248 | { | ||
1249 | get { return m_occupied; } | ||
1250 | set { m_occupied = value; } | ||
1251 | } | ||
1217 | 1252 | ||
1218 | /// <summary> | 1253 | /// <summary> |
1219 | /// ID of the avatar that is sat on us. If there is no such avatar then is UUID.Zero | 1254 | /// ID of the avatar that is sat on us. If there is no such avatar then is UUID.Zero |
@@ -1273,6 +1308,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1273 | set { m_collisionSoundVolume = value; } | 1308 | set { m_collisionSoundVolume = value; } |
1274 | } | 1309 | } |
1275 | 1310 | ||
1311 | public float Buoyancy | ||
1312 | { | ||
1313 | get { return m_buoyancy; } | ||
1314 | set | ||
1315 | { | ||
1316 | m_buoyancy = value; | ||
1317 | if (PhysActor != null) | ||
1318 | { | ||
1319 | PhysActor.Buoyancy = value; | ||
1320 | } | ||
1321 | } | ||
1322 | } | ||
1323 | |||
1276 | #endregion Public Properties with only Get | 1324 | #endregion Public Properties with only Get |
1277 | 1325 | ||
1278 | private uint ApplyMask(uint val, bool set, uint mask) | 1326 | private uint ApplyMask(uint val, bool set, uint mask) |
@@ -1597,6 +1645,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1597 | 1645 | ||
1598 | // Move afterwards ResetIDs as it clears the localID | 1646 | // Move afterwards ResetIDs as it clears the localID |
1599 | dupe.LocalId = localID; | 1647 | dupe.LocalId = localID; |
1648 | if(dupe.PhysActor != null) | ||
1649 | dupe.PhysActor.LocalID = localID; | ||
1650 | |||
1600 | // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated. | 1651 | // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated. |
1601 | dupe.LastOwnerID = OwnerID; | 1652 | dupe.LastOwnerID = OwnerID; |
1602 | 1653 | ||
@@ -2602,17 +2653,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
2602 | //Trys to fetch sound id from prim's inventory. | 2653 | //Trys to fetch sound id from prim's inventory. |
2603 | //Prim's inventory doesn't support non script items yet | 2654 | //Prim's inventory doesn't support non script items yet |
2604 | 2655 | ||
2605 | lock (TaskInventory) | 2656 | TaskInventory.LockItemsForRead(true); |
2657 | |||
2658 | foreach (KeyValuePair<UUID, TaskInventoryItem> item in TaskInventory) | ||
2606 | { | 2659 | { |
2607 | foreach (KeyValuePair<UUID, TaskInventoryItem> item in TaskInventory) | 2660 | if (item.Value.Name == sound) |
2608 | { | 2661 | { |
2609 | if (item.Value.Name == sound) | 2662 | soundID = item.Value.ItemID; |
2610 | { | 2663 | break; |
2611 | soundID = item.Value.ItemID; | ||
2612 | break; | ||
2613 | } | ||
2614 | } | 2664 | } |
2615 | } | 2665 | } |
2666 | |||
2667 | TaskInventory.LockItemsForRead(false); | ||
2616 | } | 2668 | } |
2617 | 2669 | ||
2618 | ParentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp) | 2670 | ParentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp) |
@@ -2695,6 +2747,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2695 | 2747 | ||
2696 | public void RotLookAt(Quaternion target, float strength, float damping) | 2748 | public void RotLookAt(Quaternion target, float strength, float damping) |
2697 | { | 2749 | { |
2750 | m_parentGroup.rotLookAt(target, strength, damping); // This calls method in SceneObjectGroup. | ||
2751 | } | ||
2752 | |||
2753 | public void rotLookAt(Quaternion target, float strength, float damping) | ||
2754 | { | ||
2698 | if (ParentGroup.IsAttachment) | 2755 | if (ParentGroup.IsAttachment) |
2699 | { | 2756 | { |
2700 | /* | 2757 | /* |
@@ -2925,8 +2982,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2925 | { | 2982 | { |
2926 | const float ROTATION_TOLERANCE = 0.01f; | 2983 | const float ROTATION_TOLERANCE = 0.01f; |
2927 | const float VELOCITY_TOLERANCE = 0.001f; | 2984 | const float VELOCITY_TOLERANCE = 0.001f; |
2928 | const float POSITION_TOLERANCE = 0.05f; | 2985 | const float POSITION_TOLERANCE = 0.05f; // I don't like this, but I suppose it's necessary |
2929 | const int TIME_MS_TOLERANCE = 3000; | 2986 | const int TIME_MS_TOLERANCE = 200; //llSetPos has a 200ms delay. This should NOT be 3 seconds. |
2930 | 2987 | ||
2931 | switch (UpdateFlag) | 2988 | switch (UpdateFlag) |
2932 | { | 2989 | { |
@@ -2988,17 +3045,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
2988 | if (!UUID.TryParse(sound, out soundID)) | 3045 | if (!UUID.TryParse(sound, out soundID)) |
2989 | { | 3046 | { |
2990 | // search sound file from inventory | 3047 | // search sound file from inventory |
2991 | lock (TaskInventory) | 3048 | TaskInventory.LockItemsForRead(true); |
3049 | foreach (KeyValuePair<UUID, TaskInventoryItem> item in TaskInventory) | ||
2992 | { | 3050 | { |
2993 | foreach (KeyValuePair<UUID, TaskInventoryItem> item in TaskInventory) | 3051 | if (item.Value.Name == sound && item.Value.Type == (int)AssetType.Sound) |
2994 | { | 3052 | { |
2995 | if (item.Value.Name == sound && item.Value.Type == (int)AssetType.Sound) | 3053 | soundID = item.Value.ItemID; |
2996 | { | 3054 | break; |
2997 | soundID = item.Value.ItemID; | ||
2998 | break; | ||
2999 | } | ||
3000 | } | 3055 | } |
3001 | } | 3056 | } |
3057 | TaskInventory.LockItemsForRead(false); | ||
3002 | } | 3058 | } |
3003 | 3059 | ||
3004 | if (soundID == UUID.Zero) | 3060 | if (soundID == UUID.Zero) |
@@ -3465,10 +3521,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3465 | // TODO: May need to fix for group comparison | 3521 | // TODO: May need to fix for group comparison |
3466 | if (last.Compare(this)) | 3522 | if (last.Compare(this)) |
3467 | { | 3523 | { |
3468 | // m_log.DebugFormat( | 3524 | // m_log.DebugFormat( |
3469 | // "[SCENE OBJECT PART]: Not storing undo for {0} {1} since current state is same as last undo state, initial stack size {2}", | 3525 | // "[SCENE OBJECT PART]: Not storing undo for {0} {1} since current state is same as last undo state, initial stack size {2}", |
3470 | // Name, LocalId, m_undo.Count); | 3526 | // Name, LocalId, m_undo.Count); |
3471 | 3527 | ||
3472 | return; | 3528 | return; |
3473 | } | 3529 | } |
3474 | } | 3530 | } |
@@ -3481,29 +3537,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
3481 | if (ParentGroup.GetSceneMaxUndo() > 0) | 3537 | if (ParentGroup.GetSceneMaxUndo() > 0) |
3482 | { | 3538 | { |
3483 | UndoState nUndo = new UndoState(this, forGroup); | 3539 | UndoState nUndo = new UndoState(this, forGroup); |
3484 | 3540 | ||
3485 | m_undo.Push(nUndo); | 3541 | m_undo.Push(nUndo); |
3486 | 3542 | ||
3487 | if (m_redo.Count > 0) | 3543 | if (m_redo.Count > 0) |
3488 | m_redo.Clear(); | 3544 | m_redo.Clear(); |
3489 | 3545 | ||
3490 | // m_log.DebugFormat( | 3546 | // m_log.DebugFormat( |
3491 | // "[SCENE OBJECT PART]: Stored undo state for {0} {1}, forGroup {2}, stack size now {3}", | 3547 | // "[SCENE OBJECT PART]: Stored undo state for {0} {1}, forGroup {2}, stack size now {3}", |
3492 | // Name, LocalId, forGroup, m_undo.Count); | 3548 | // Name, LocalId, forGroup, m_undo.Count); |
3493 | } | 3549 | } |
3494 | } | 3550 | } |
3495 | } | 3551 | } |
3496 | } | 3552 | } |
3497 | // else | 3553 | // else |
3498 | // { | 3554 | // { |
3499 | // m_log.DebugFormat("[SCENE OBJECT PART]: Ignoring undo store for {0} {1}", Name, LocalId); | 3555 | // m_log.DebugFormat("[SCENE OBJECT PART]: Ignoring undo store for {0} {1}", Name, LocalId); |
3500 | // } | 3556 | // } |
3501 | } | 3557 | } |
3502 | // else | 3558 | // else |
3503 | // { | 3559 | // { |
3504 | // m_log.DebugFormat( | 3560 | // m_log.DebugFormat( |
3505 | // "[SCENE OBJECT PART]: Ignoring undo store for {0} {1} since already undoing", Name, LocalId); | 3561 | // "[SCENE OBJECT PART]: Ignoring undo store for {0} {1} since already undoing", Name, LocalId); |
3506 | // } | 3562 | // } |
3507 | } | 3563 | } |
3508 | 3564 | ||
3509 | /// <summary> | 3565 | /// <summary> |
@@ -4234,6 +4290,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
4234 | bool wasPhantom = ((Flags & PrimFlags.Phantom) != 0); | 4290 | bool wasPhantom = ((Flags & PrimFlags.Phantom) != 0); |
4235 | bool wasVD = VolumeDetectActive; | 4291 | bool wasVD = VolumeDetectActive; |
4236 | 4292 | ||
4293 | // m_log.DebugFormat("[SOP]: Old states: phys: {0} temp: {1} phan: {2} vd: {3}", wasUsingPhysics, wasTemporary, wasPhantom, wasVD); | ||
4294 | // m_log.DebugFormat("[SOP]: New states: phys: {0} temp: {1} phan: {2} vd: {3}", UsePhysics, SetTemporary, SetPhantom, SetVD); | ||
4295 | |||
4237 | if ((UsePhysics == wasUsingPhysics) && (wasTemporary == SetTemporary) && (wasPhantom == SetPhantom) && (SetVD == wasVD)) | 4296 | if ((UsePhysics == wasUsingPhysics) && (wasTemporary == SetTemporary) && (wasPhantom == SetPhantom) && (SetVD == wasVD)) |
4238 | return; | 4297 | return; |
4239 | 4298 | ||
@@ -4263,6 +4322,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
4263 | SetPhantom = false; | 4322 | SetPhantom = false; |
4264 | } | 4323 | } |
4265 | } | 4324 | } |
4325 | else if (wasVD) | ||
4326 | { | ||
4327 | // Correspondingly, if VD is turned off, also turn off phantom | ||
4328 | SetPhantom = false; | ||
4329 | } | ||
4266 | 4330 | ||
4267 | if (UsePhysics && IsJoint()) | 4331 | if (UsePhysics && IsJoint()) |
4268 | { | 4332 | { |
@@ -4753,5 +4817,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
4753 | Color color = Color; | 4817 | Color color = Color; |
4754 | return new Color4(color.R, color.G, color.B, (byte)(0xFF - color.A)); | 4818 | return new Color4(color.R, color.G, color.B, (byte)(0xFF - color.A)); |
4755 | } | 4819 | } |
4820 | |||
4821 | public void ResetOwnerChangeFlag() | ||
4822 | { | ||
4823 | List<UUID> inv = Inventory.GetInventoryList(); | ||
4824 | |||
4825 | foreach (UUID itemID in inv) | ||
4826 | { | ||
4827 | TaskInventoryItem item = Inventory.GetInventoryItem(itemID); | ||
4828 | item.OwnerChanged = false; | ||
4829 | Inventory.UpdateInventoryItem(item, false, false); | ||
4830 | } | ||
4831 | } | ||
4756 | } | 4832 | } |
4757 | } | 4833 | } |