Fix phantom and temp flags not taking

avinationmerge
Melanie 2011-12-06 19:44:45 +01:00
parent 28da235888
commit 5490a3e549
2 changed files with 10 additions and 2 deletions

View File

@ -2811,11 +2811,11 @@ namespace OpenSim.Region.Framework.Scenes
}
}
RootPart.UpdatePrimFlags(UsePhysics, IsTemporary, IsPhantom, SetVolumeDetect);
RootPart.UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect);
for (int i = 0; i < parts.Length; i++)
{
if (parts[i] != RootPart)
parts[i].UpdatePrimFlags(UsePhysics, IsTemporary, IsPhantom, SetVolumeDetect);
parts[i].UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect);
}
}
}

View File

@ -4307,6 +4307,9 @@ namespace OpenSim.Region.Framework.Scenes
bool wasPhantom = ((Flags & PrimFlags.Phantom) != 0);
bool wasVD = VolumeDetectActive;
// m_log.DebugFormat("[SOP]: Old states: phys: {0} temp: {1} phan: {2} vd: {3}", wasUsingPhysics, wasTemporary, wasPhantom, wasVD);
// m_log.DebugFormat("[SOP]: New states: phys: {0} temp: {1} phan: {2} vd: {3}", UsePhysics, SetTemporary, SetPhantom, SetVD);
if ((UsePhysics == wasUsingPhysics) && (wasTemporary == SetTemporary) && (wasPhantom == SetPhantom) && (SetVD == wasVD))
return;
@ -4336,6 +4339,11 @@ namespace OpenSim.Region.Framework.Scenes
SetPhantom = false;
}
}
else if (wasVD)
{
// Correspondingly, if VD is turned off, also turn off phantom
SetPhantom = false;
}
if (UsePhysics && IsJoint())
{