diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 66 |
1 files changed, 46 insertions, 20 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index fe96152..079148f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -167,6 +167,44 @@ namespace OpenSim.Region.Framework.Scenes | |||
167 | } | 167 | } |
168 | } | 168 | } |
169 | 169 | ||
170 | /// <summary> | ||
171 | /// Is this scene object phantom? | ||
172 | /// </summary> | ||
173 | /// <remarks> | ||
174 | /// Updating must currently take place through UpdatePrimFlags() | ||
175 | /// </remarks> | ||
176 | public bool IsPhantom | ||
177 | { | ||
178 | get { return (RootPart.Flags & PrimFlags.Phantom) != 0; } | ||
179 | } | ||
180 | |||
181 | /// <summary> | ||
182 | /// Does this scene object use physics? | ||
183 | /// </summary> | ||
184 | /// <remarks> | ||
185 | /// Updating must currently take place through UpdatePrimFlags() | ||
186 | /// </remarks> | ||
187 | public bool UsesPhysics | ||
188 | { | ||
189 | get { return (RootPart.Flags & PrimFlags.TemporaryOnRez) != 0; } | ||
190 | } | ||
191 | |||
192 | /// <summary> | ||
193 | /// Is this scene object temporary? | ||
194 | /// </summary> | ||
195 | /// <remarks> | ||
196 | /// Updating must currently take place through UpdatePrimFlags() | ||
197 | /// </remarks> | ||
198 | public bool IsTemporary | ||
199 | { | ||
200 | get { return (RootPart.Flags & PrimFlags.TemporaryOnRez) != 0; } | ||
201 | } | ||
202 | |||
203 | public bool IsVolumeDetect | ||
204 | { | ||
205 | get { return RootPart.VolumeDetectActive; } | ||
206 | } | ||
207 | |||
170 | public float scriptScore; | 208 | public float scriptScore; |
171 | 209 | ||
172 | private Vector3 lastPhysGroupPos; | 210 | private Vector3 lastPhysGroupPos; |
@@ -1510,36 +1548,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
1510 | SetRootPart(part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, 0, userExposed)); | 1548 | SetRootPart(part.Copy(m_scene.AllocateLocalId(), OwnerID, GroupID, 0, userExposed)); |
1511 | } | 1549 | } |
1512 | 1550 | ||
1513 | public void ScriptSetPhysicsStatus(bool UsePhysics) | 1551 | public void ScriptSetPhysicsStatus(bool usePhysics) |
1514 | { | 1552 | { |
1515 | bool IsTemporary = ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0); | 1553 | UpdatePrimFlags(RootPart.LocalId, usePhysics, IsTemporary, IsPhantom, IsVolumeDetect); |
1516 | bool IsPhantom = ((RootPart.Flags & PrimFlags.Phantom) != 0); | ||
1517 | bool IsVolumeDetect = RootPart.VolumeDetectActive; | ||
1518 | UpdatePrimFlags(RootPart.LocalId, UsePhysics, IsTemporary, IsPhantom, IsVolumeDetect); | ||
1519 | } | 1554 | } |
1520 | 1555 | ||
1521 | public void ScriptSetTemporaryStatus(bool TemporaryStatus) | 1556 | public void ScriptSetTemporaryStatus(bool makeTemporary) |
1522 | { | 1557 | { |
1523 | bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0); | 1558 | UpdatePrimFlags(RootPart.LocalId, UsesPhysics, makeTemporary, IsPhantom, IsVolumeDetect); |
1524 | bool IsPhantom = ((RootPart.Flags & PrimFlags.Phantom) != 0); | ||
1525 | bool IsVolumeDetect = RootPart.VolumeDetectActive; | ||
1526 | UpdatePrimFlags(RootPart.LocalId, UsePhysics, TemporaryStatus, IsPhantom, IsVolumeDetect); | ||
1527 | } | 1559 | } |
1528 | 1560 | ||
1529 | public void ScriptSetPhantomStatus(bool PhantomStatus) | 1561 | public void ScriptSetPhantomStatus(bool makePhantom) |
1530 | { | 1562 | { |
1531 | bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0); | 1563 | UpdatePrimFlags(RootPart.LocalId, UsesPhysics, IsTemporary, makePhantom, IsVolumeDetect); |
1532 | bool IsTemporary = ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0); | ||
1533 | bool IsVolumeDetect = RootPart.VolumeDetectActive; | ||
1534 | UpdatePrimFlags(RootPart.LocalId, UsePhysics, IsTemporary, PhantomStatus, IsVolumeDetect); | ||
1535 | } | 1564 | } |
1536 | 1565 | ||
1537 | public void ScriptSetVolumeDetect(bool VDStatus) | 1566 | public void ScriptSetVolumeDetect(bool makeVolumeDetect) |
1538 | { | 1567 | { |
1539 | bool UsePhysics = ((RootPart.Flags & PrimFlags.Physics) != 0); | 1568 | UpdatePrimFlags(RootPart.LocalId, UsesPhysics, IsTemporary, IsPhantom, makeVolumeDetect); |
1540 | bool IsTemporary = ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0); | ||
1541 | bool IsPhantom = ((RootPart.Flags & PrimFlags.Phantom) != 0); | ||
1542 | UpdatePrimFlags(RootPart.LocalId, UsePhysics, IsTemporary, IsPhantom, VDStatus); | ||
1543 | 1569 | ||
1544 | /* | 1570 | /* |
1545 | ScriptSetPhantomStatus(false); // What ever it was before, now it's not phantom anymore | 1571 | ScriptSetPhantomStatus(false); // What ever it was before, now it's not phantom anymore |