diff options
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 25 |
2 files changed, 13 insertions, 14 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 8f03a0a..786258f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -741,7 +741,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
741 | 741 | ||
742 | rootPart.RemFlag(PrimFlags.TemporaryOnRez); | 742 | rootPart.RemFlag(PrimFlags.TemporaryOnRez); |
743 | 743 | ||
744 | so.ApplyPhysics(); | 744 | so.ApplyPhysics(false); |
745 | 745 | ||
746 | rootPart.Rezzed = DateTime.Now; | 746 | rootPart.Rezzed = DateTime.Now; |
747 | so.AttachToBackup(); | 747 | so.AttachToBackup(); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index a52c0d6..d399535 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1237,14 +1237,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1237 | //m_log.DebugFormat("[SCENE]: Given local id {0} to part {1}, linknum {2}, parent {3} {4}", part.LocalId, part.UUID, part.LinkNum, part.ParentID, part.ParentUUID); | 1237 | //m_log.DebugFormat("[SCENE]: Given local id {0} to part {1}, linknum {2}, parent {3} {4}", part.LocalId, part.UUID, part.LinkNum, part.ParentID, part.ParentUUID); |
1238 | } | 1238 | } |
1239 | 1239 | ||
1240 | ApplyPhysics(); | 1240 | ApplyPhysics(true); |
1241 | |||
1242 | if (RootPart.PhysActor != null) | ||
1243 | RootPart.Force = RootPart.Force; | ||
1244 | if (RootPart.PhysActor != null) | ||
1245 | RootPart.Torque = RootPart.Torque; | ||
1246 | if (RootPart.PhysActor != null) | ||
1247 | RootPart.Buoyancy = RootPart.Buoyancy; | ||
1248 | 1241 | ||
1249 | // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled | 1242 | // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled |
1250 | // for the same object with very different properties. The caller must schedule the update. | 1243 | // for the same object with very different properties. The caller must schedule the update. |
@@ -1853,7 +1846,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1853 | AttachmentPoint = (byte)0; | 1846 | AttachmentPoint = (byte)0; |
1854 | // must check if buildind should be true or false here | 1847 | // must check if buildind should be true or false here |
1855 | // m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_rootPart.VolumeDetectActive,false); | 1848 | // m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_rootPart.VolumeDetectActive,false); |
1856 | ApplyPhysics(); | 1849 | ApplyPhysics(false); |
1857 | 1850 | ||
1858 | HasGroupChanged = true; | 1851 | HasGroupChanged = true; |
1859 | RootPart.Rezzed = DateTime.Now; | 1852 | RootPart.Rezzed = DateTime.Now; |
@@ -2158,7 +2151,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2158 | /// <summary> | 2151 | /// <summary> |
2159 | /// Apply physics to this group | 2152 | /// Apply physics to this group |
2160 | /// </summary> | 2153 | /// </summary> |
2161 | public void ApplyPhysics() | 2154 | public void ApplyPhysics(bool refreshForces) |
2162 | { | 2155 | { |
2163 | SceneObjectPart[] parts = m_parts.GetArray(); | 2156 | SceneObjectPart[] parts = m_parts.GetArray(); |
2164 | if (parts.Length > 1) | 2157 | if (parts.Length > 1) |
@@ -2177,16 +2170,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
2177 | } | 2170 | } |
2178 | // Hack to get the physics scene geometries in the right spot | 2171 | // Hack to get the physics scene geometries in the right spot |
2179 | // ResetChildPrimPhysicsPositions(); | 2172 | // ResetChildPrimPhysicsPositions(); |
2173 | |||
2180 | if (m_rootPart.PhysActor != null) | 2174 | if (m_rootPart.PhysActor != null) |
2181 | { | ||
2182 | m_rootPart.PhysActor.Building = false; | 2175 | m_rootPart.PhysActor.Building = false; |
2183 | } | ||
2184 | } | 2176 | } |
2185 | else | 2177 | else |
2186 | { | 2178 | { |
2187 | // Apply physics to the root prim | 2179 | // Apply physics to the root prim |
2188 | m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_rootPart.VolumeDetectActive, false); | 2180 | m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_rootPart.VolumeDetectActive, false); |
2189 | } | 2181 | } |
2182 | |||
2183 | if (m_rootPart.PhysActor != null && refreshForces) | ||
2184 | { | ||
2185 | m_rootPart.Force = m_rootPart.Force; | ||
2186 | m_rootPart.Torque = m_rootPart.Torque; | ||
2187 | m_rootPart.Buoyancy = m_rootPart.Buoyancy; | ||
2188 | } | ||
2190 | } | 2189 | } |
2191 | 2190 | ||
2192 | public void SetOwnerId(UUID userId) | 2191 | public void SetOwnerId(UUID userId) |
@@ -3080,7 +3079,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3080 | { | 3079 | { |
3081 | // cancel physics | 3080 | // cancel physics |
3082 | RootPart.Flags &= ~PrimFlags.Physics; | 3081 | RootPart.Flags &= ~PrimFlags.Physics; |
3083 | ApplyPhysics(); | 3082 | ApplyPhysics(false); |
3084 | } | 3083 | } |
3085 | } | 3084 | } |
3086 | 3085 | ||