aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorCharles Krinke2008-12-20 21:36:42 +0000
committerCharles Krinke2008-12-20 21:36:42 +0000
commit62dd67b8b8a7eb441d57f2b854444fbc5c4767d3 (patch)
treeb6c9f1123ae69ed2c6d67a4e939168b9140acb55 /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
parentMantis#2881. Thank you kindly, SirKimba for a patch that: (diff)
downloadopensim-SC_OLD-62dd67b8b8a7eb441d57f2b854444fbc5c4767d3.zip
opensim-SC_OLD-62dd67b8b8a7eb441d57f2b854444fbc5c4767d3.tar.gz
opensim-SC_OLD-62dd67b8b8a7eb441d57f2b854444fbc5c4767d3.tar.bz2
opensim-SC_OLD-62dd67b8b8a7eb441d57f2b854444fbc5c4767d3.tar.xz
Mantis#2796. Thank you kindly, Gerhard for a patch that addresses:
On a call of llVolumeDetect(1) (or any other number !=0) volume detection is enabled. Together with VD, the phantom flag is set to the GUI. On a call of llVolumeDetect(0), vd detection is switched of again, also the phantom state is removed. On a call to llSetState(STATE_PHANTOM, false) while VD is active, also VD is switched off. The same is true for unchecking the phantom flag via GUI. This allows to take back VD without the need to script just by removing the phantom flag. Things missing in this patch: persistance of the volume-detection flag. This needs more discussion and will be included in another patch soon.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs34
1 files changed, 29 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 5456282..f4ccc46 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -1431,21 +1431,45 @@ namespace OpenSim.Region.Environment.Scenes
1431 { 1431 {
1432 bool IsTemporary = ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0); 1432 bool IsTemporary = ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0);
1433 bool IsPhantom = ((RootPart.Flags & PrimFlags.Phantom) != 0); 1433 bool IsPhantom = ((RootPart.Flags & PrimFlags.Phantom) != 0);
1434 UpdatePrimFlags(RootPart.LocalId, UsePhysics, IsTemporary, IsPhantom); 1434 bool IsVolumeDetect = RootPart.VolumeDetectActive;
1435 UpdatePrimFlags(RootPart.LocalId, UsePhysics, IsTemporary, IsPhantom, IsVolumeDetect);
1435 } 1436 }
1436 1437
1437 public void ScriptSetTemporaryStatus(bool TemporaryStatus) 1438 public void ScriptSetTemporaryStatus(bool TemporaryStatus)
1438 { 1439 {
1439 bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0); 1440 bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0);
1440 bool IsPhantom = ((RootPart.Flags & PrimFlags.Phantom) != 0); 1441 bool IsPhantom = ((RootPart.Flags & PrimFlags.Phantom) != 0);
1441 UpdatePrimFlags(RootPart.LocalId, UsePhysics, TemporaryStatus, IsPhantom); 1442 bool IsVolumeDetect = RootPart.VolumeDetectActive;
1443 UpdatePrimFlags(RootPart.LocalId, UsePhysics, TemporaryStatus, IsPhantom, IsVolumeDetect);
1442 } 1444 }
1443 1445
1444 public void ScriptSetPhantomStatus(bool PhantomStatus) 1446 public void ScriptSetPhantomStatus(bool PhantomStatus)
1445 { 1447 {
1446 bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0); 1448 bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0);
1447 bool IsTemporary = ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0); 1449 bool IsTemporary = ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0);
1448 UpdatePrimFlags(RootPart.LocalId, UsePhysics, IsTemporary, PhantomStatus); 1450 bool IsVolumeDetect = RootPart.VolumeDetectActive;
1451 UpdatePrimFlags(RootPart.LocalId, UsePhysics, IsTemporary, PhantomStatus, IsVolumeDetect);
1452 }
1453
1454 public void ScriptSetVolumeDetect(bool VDStatus)
1455 {
1456 bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0);
1457 bool IsTemporary = ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0);
1458 bool IsPhantom = ((RootPart.Flags & PrimFlags.Phantom) != 0);
1459 UpdatePrimFlags(RootPart.LocalId, UsePhysics, IsTemporary, IsPhantom, VDStatus);
1460
1461 /*
1462 ScriptSetPhantomStatus(false); // What ever it was before, now it's not phantom anymore
1463
1464 if (PhysActor != null) // Should always be the case now
1465 {
1466 PhysActor.SetVolumeDetect(param);
1467 }
1468 if (param != 0)
1469 AddFlag(PrimFlags.Phantom);
1470
1471 ScheduleFullUpdate();
1472 */
1449 } 1473 }
1450 1474
1451 public void applyImpulse(PhysicsVector impulse) 1475 public void applyImpulse(PhysicsVector impulse)
@@ -2251,7 +2275,7 @@ namespace OpenSim.Region.Environment.Scenes
2251 /// <param name="type"></param> 2275 /// <param name="type"></param>
2252 /// <param name="inUse"></param> 2276 /// <param name="inUse"></param>
2253 /// <param name="data"></param> 2277 /// <param name="data"></param>
2254 public void UpdatePrimFlags(uint localID, bool UsePhysics, bool IsTemporary, bool IsPhantom) 2278 public void UpdatePrimFlags(uint localID, bool UsePhysics, bool IsTemporary, bool IsPhantom, bool IsVolumeDetect)
2255 { 2279 {
2256 SceneObjectPart selectionPart = GetChildPart(localID); 2280 SceneObjectPart selectionPart = GetChildPart(localID);
2257 2281
@@ -2279,7 +2303,7 @@ namespace OpenSim.Region.Environment.Scenes
2279 2303
2280 foreach (SceneObjectPart part in m_parts.Values) 2304 foreach (SceneObjectPart part in m_parts.Values)
2281 { 2305 {
2282 part.UpdatePrimFlags(UsePhysics, IsTemporary, IsPhantom); 2306 part.UpdatePrimFlags(UsePhysics, IsTemporary, IsPhantom, IsVolumeDetect);
2283 } 2307 }
2284 } 2308 }
2285 } 2309 }