diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 1696dc5..577c0d3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1503,7 +1503,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1503 | /// </summary> | 1503 | /// </summary> |
1504 | /// <param name="rootObjectFlags"></param> | 1504 | /// <param name="rootObjectFlags"></param> |
1505 | /// <param name="VolumeDetectActive"></param> | 1505 | /// <param name="VolumeDetectActive"></param> |
1506 | public void ApplyPhysics(uint rootObjectFlags, bool VolumeDetectActive) | 1506 | // public void ApplyPhysics(uint rootObjectFlags, bool VolumeDetectActive) |
1507 | public void ApplyPhysics(uint rootObjectFlags, bool VolumeDetectActive, bool building) | ||
1507 | { | 1508 | { |
1508 | if (!ParentGroup.Scene.CollidablePrims) | 1509 | if (!ParentGroup.Scene.CollidablePrims) |
1509 | return; | 1510 | return; |
@@ -1557,6 +1558,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1557 | PhysActor.SetMaterial(Material); | 1558 | PhysActor.SetMaterial(Material); |
1558 | DoPhysicsPropertyUpdate(RigidBody, true); | 1559 | DoPhysicsPropertyUpdate(RigidBody, true); |
1559 | PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); | 1560 | PhysActor.SetVolumeDetect(VolumeDetectActive ? 1 : 0); |
1561 | if (!building) | ||
1562 | PhysActor.Building = false; | ||
1560 | } | 1563 | } |
1561 | } | 1564 | } |
1562 | } | 1565 | } |
@@ -1792,6 +1795,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1792 | if (!isNew) | 1795 | if (!isNew) |
1793 | ParentGroup.Scene.RemovePhysicalPrim(1); | 1796 | ParentGroup.Scene.RemovePhysicalPrim(1); |
1794 | 1797 | ||
1798 | Velocity = new Vector3(0, 0, 0); | ||
1799 | Acceleration = new Vector3(0, 0, 0); | ||
1800 | AngularVelocity = new Vector3(0, 0, 0); | ||
1801 | |||
1795 | PhysActor.OnRequestTerseUpdate -= PhysicsRequestingTerseUpdate; | 1802 | PhysActor.OnRequestTerseUpdate -= PhysicsRequestingTerseUpdate; |
1796 | PhysActor.OnOutOfBounds -= PhysicsOutOfBounds; | 1803 | PhysActor.OnOutOfBounds -= PhysicsOutOfBounds; |
1797 | PhysActor.delink(); | 1804 | PhysActor.delink(); |
@@ -4268,7 +4275,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4268 | /// <param name="SetTemporary"></param> | 4275 | /// <param name="SetTemporary"></param> |
4269 | /// <param name="SetPhantom"></param> | 4276 | /// <param name="SetPhantom"></param> |
4270 | /// <param name="SetVD"></param> | 4277 | /// <param name="SetVD"></param> |
4271 | public void UpdatePrimFlags(bool UsePhysics, bool SetTemporary, bool SetPhantom, bool SetVD) | 4278 | // public void UpdatePrimFlags(bool UsePhysics, bool SetTemporary, bool SetPhantom, bool SetVD) |
4279 | public void UpdatePrimFlags(bool UsePhysics, bool SetTemporary, bool SetPhantom, bool SetVD, bool building) | ||
4272 | { | 4280 | { |
4273 | bool wasUsingPhysics = ((Flags & PrimFlags.Physics) != 0); | 4281 | bool wasUsingPhysics = ((Flags & PrimFlags.Physics) != 0); |
4274 | bool wasTemporary = ((Flags & PrimFlags.TemporaryOnRez) != 0); | 4282 | bool wasTemporary = ((Flags & PrimFlags.TemporaryOnRez) != 0); |
@@ -4286,6 +4294,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
4286 | // that... | 4294 | // that... |
4287 | // ... if VD is changed, all others are not. | 4295 | // ... if VD is changed, all others are not. |
4288 | // ... if one of the others is changed, VD is not. | 4296 | // ... if one of the others is changed, VD is not. |
4297 | // do this first | ||
4298 | if (building && PhysActor != null && PhysActor.Building != building) | ||
4299 | PhysActor.Building = building; | ||
4289 | if (SetVD) // VD is active, special logic applies | 4300 | if (SetVD) // VD is active, special logic applies |
4290 | { | 4301 | { |
4291 | // State machine logic for VolumeDetect | 4302 | // State machine logic for VolumeDetect |
@@ -4448,6 +4459,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
4448 | } | 4459 | } |
4449 | // m_log.Debug("Update: PHY:" + UsePhysics.ToString() + ", T:" + IsTemporary.ToString() + ", PHA:" + IsPhantom.ToString() + " S:" + CastsShadows.ToString()); | 4460 | // m_log.Debug("Update: PHY:" + UsePhysics.ToString() + ", T:" + IsTemporary.ToString() + ", PHA:" + IsPhantom.ToString() + " S:" + CastsShadows.ToString()); |
4450 | 4461 | ||
4462 | // and last in case we have a new actor and not building | ||
4463 | if (PhysActor != null && PhysActor.Building != building) | ||
4464 | PhysActor.Building = building; | ||
4451 | if (ParentGroup != null) | 4465 | if (ParentGroup != null) |
4452 | { | 4466 | { |
4453 | ParentGroup.HasGroupChanged = true; | 4467 | ParentGroup.HasGroupChanged = true; |