From 1c1d40cf6a0d40f510607b834416dc10ec318db4 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 16 Aug 2016 05:04:44 +0100 Subject: [PATCH] libOMV PrimFlags.JointLP2P does not exist. Its bit now means VolumeDetector. VolumeDetectActive is now stored on that flag bit. with this change it is now sent to viewers that now gray out phantom on object edit. At same time fixes the fact volumedetector was not been saved on region db and so was lost on restarts. libOMV needs to be fix on this and other PrimFlags --- .../Framework/Scenes/SceneObjectPart.cs | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 6f2a1de55e..459b01eb3f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -285,7 +285,23 @@ namespace OpenSim.Region.Framework.Scenes // but reversed logic: bit cleared means free to rotate public byte RotationAxisLocks = 0; - public bool VolumeDetectActive; + // WRONG flag in libOmvPrimFlags + private const uint primFlagVolumeDetect = (uint)PrimFlags.JointLP2P; + + public bool VolumeDetectActive + { + get + { + return (Flags & (PrimFlags)primFlagVolumeDetect) != 0; + } + set + { + if(value) + Flags |= (PrimFlags)primFlagVolumeDetect; + else + Flags &= (PrimFlags)(~primFlagVolumeDetect); + } + } public bool IsWaitingForFirstSpinUpdatePacket; @@ -4742,7 +4758,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter VolumeDetectActive = SetVD; // volume detector implies phantom we need to decouple this mess - if (VolumeDetectActive) + if (SetVD) SetPhantom = true; else if(wasVD) SetPhantom = false;