diff options
author | Dahlia Trimble | 2008-12-22 09:29:59 +0000 |
---|---|---|
committer | Dahlia Trimble | 2008-12-22 09:29:59 +0000 |
commit | 6e68a11082c0928395450d70fcb5b3f18bdfb35f (patch) | |
tree | 2276875a4b59b60f412f2f92d77bdffe69dd9713 /OpenSim/Region | |
parent | test commit - no functional change (diff) | |
download | opensim-SC-6e68a11082c0928395450d70fcb5b3f18bdfb35f.zip opensim-SC-6e68a11082c0928395450d70fcb5b3f18bdfb35f.tar.gz opensim-SC-6e68a11082c0928395450d70fcb5b3f18bdfb35f.tar.bz2 opensim-SC-6e68a11082c0928395450d70fcb5b3f18bdfb35f.tar.xz |
Thanks Gerhard for a patch that implements part 3 of VolumeDetection / persistance
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 7 |
2 files changed, 10 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 857f193..2f6a61a 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -858,7 +858,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
858 | m_rootPart.AttachedAvatar = UUID.Zero; | 858 | m_rootPart.AttachedAvatar = UUID.Zero; |
859 | m_rootPart.SetParentLocalId(0); | 859 | m_rootPart.SetParentLocalId(0); |
860 | SetAttachmentPoint((byte)0); | 860 | SetAttachmentPoint((byte)0); |
861 | m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim); | 861 | m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_rootPart.VolumeDetectActive, m_scene.m_physicalPrim); |
862 | HasGroupChanged = true; | 862 | HasGroupChanged = true; |
863 | RootPart.Rezzed = DateTime.Now; | 863 | RootPart.Rezzed = DateTime.Now; |
864 | RootPart.RemFlag(PrimFlags.TemporaryOnRez); | 864 | RootPart.RemFlag(PrimFlags.TemporaryOnRez); |
@@ -1161,12 +1161,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
1161 | { | 1161 | { |
1162 | if (m_parts.Count > 1) | 1162 | if (m_parts.Count > 1) |
1163 | { | 1163 | { |
1164 | m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_physicalPrim); | 1164 | m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_rootPart.VolumeDetectActive, m_physicalPrim); |
1165 | foreach (SceneObjectPart part in m_parts.Values) | 1165 | foreach (SceneObjectPart part in m_parts.Values) |
1166 | { | 1166 | { |
1167 | if (part.LocalId != m_rootPart.LocalId) | 1167 | if (part.LocalId != m_rootPart.LocalId) |
1168 | { | 1168 | { |
1169 | part.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_physicalPrim); | 1169 | part.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), part.VolumeDetectActive, m_physicalPrim); |
1170 | } | 1170 | } |
1171 | } | 1171 | } |
1172 | 1172 | ||
@@ -1175,7 +1175,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1175 | } | 1175 | } |
1176 | else | 1176 | else |
1177 | { | 1177 | { |
1178 | m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_physicalPrim); | 1178 | m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_rootPart.VolumeDetectActive, m_physicalPrim); |
1179 | } | 1179 | } |
1180 | } | 1180 | } |
1181 | } | 1181 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 0315c92..ddfb413 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -1281,11 +1281,15 @@ if (m_shape != null) { | |||
1281 | /// </summary> | 1281 | /// </summary> |
1282 | /// <param name="rootObjectFlags"></param> | 1282 | /// <param name="rootObjectFlags"></param> |
1283 | /// <param name="m_physicalPrim"></param> | 1283 | /// <param name="m_physicalPrim"></param> |
1284 | public void ApplyPhysics(uint rootObjectFlags, bool m_physicalPrim) | 1284 | public void ApplyPhysics(uint rootObjectFlags, bool VolumeDetectActive, bool m_physicalPrim) |
1285 | { | 1285 | { |
1286 | bool isPhysical = (((rootObjectFlags & (uint) PrimFlags.Physics) != 0) && m_physicalPrim); | 1286 | bool isPhysical = (((rootObjectFlags & (uint) PrimFlags.Physics) != 0) && m_physicalPrim); |
1287 | bool isPhantom = ((rootObjectFlags & (uint) PrimFlags.Phantom) != 0); | 1287 | bool isPhantom = ((rootObjectFlags & (uint) PrimFlags.Phantom) != 0); |
1288 | 1288 | ||
1289 | // Special case for VolumeDetection: If VolumeDetection is set, the phantom flag is locally ignored | ||
1290 | if (VolumeDetectActive) | ||
1291 | isPhantom = false; | ||
1292 | |||
1289 | // Added clarification.. since A rigid body is an object that you can kick around, etc. | 1293 | // Added clarification.. since A rigid body is an object that you can kick around, etc. |
1290 | bool RigidBody = isPhysical && !isPhantom; | 1294 | bool RigidBody = isPhysical && !isPhantom; |
1291 | 1295 | ||
@@ -1305,6 +1309,7 @@ if (m_shape != null) { | |||
1305 | { | 1309 | { |
1306 | PhysActor.LocalID = LocalId; | 1310 | PhysActor.LocalID = LocalId; |
1307 | DoPhysicsPropertyUpdate(RigidBody, true); | 1311 | DoPhysicsPropertyUpdate(RigidBody, true); |
1312 | PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); | ||
1308 | } | 1313 | } |
1309 | } | 1314 | } |
1310 | } | 1315 | } |