diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 54 |
3 files changed, 36 insertions, 23 deletions
diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index 233e559..edf2bef 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | |||
@@ -575,6 +575,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
575 | Quaternion current = m_group.GroupRotation; | 575 | Quaternion current = m_group.GroupRotation; |
576 | 576 | ||
577 | Quaternion step = Quaternion.Slerp(m_currentFrame.StartRotation, (Quaternion)m_currentFrame.Rotation, complete); | 577 | Quaternion step = Quaternion.Slerp(m_currentFrame.StartRotation, (Quaternion)m_currentFrame.Rotation, complete); |
578 | step.Normalize(); | ||
578 | /* use simpler change detection | 579 | /* use simpler change detection |
579 | * float angle = 0; | 580 | * float angle = 0; |
580 | 581 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 053bfb4..5bd0a1b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -4314,8 +4314,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4314 | 4314 | ||
4315 | SceneObjectPart[] parts = m_parts.GetArray(); | 4315 | SceneObjectPart[] parts = m_parts.GetArray(); |
4316 | 4316 | ||
4317 | for (int i = 0; i < parts.Length; i++) | 4317 | // for (int i = 0; i < parts.Length; i++) |
4318 | parts[i].CheckSculptAndLoad(); | 4318 | // parts[i].CheckSculptAndLoad(); |
4319 | } | 4319 | } |
4320 | 4320 | ||
4321 | /// <summary> | 4321 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 3274cbd..49b771f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1095,9 +1095,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1095 | { | 1095 | { |
1096 | actor.Size = m_shape.Scale; | 1096 | actor.Size = m_shape.Scale; |
1097 | 1097 | ||
1098 | if (Shape.SculptEntry) | 1098 | // if (Shape.SculptEntry) |
1099 | CheckSculptAndLoad(); | 1099 | // CheckSculptAndLoad(); |
1100 | else | 1100 | // else |
1101 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); | 1101 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); |
1102 | } | 1102 | } |
1103 | } | 1103 | } |
@@ -1583,7 +1583,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1583 | 1583 | ||
1584 | float cost = 0.1f; | 1584 | float cost = 0.1f; |
1585 | if (PhysActor != null) | 1585 | if (PhysActor != null) |
1586 | // cost += PhysActor.Cost; | 1586 | cost = PhysActor.PhysicsCost; |
1587 | else | ||
1588 | cost = 0.1f; | ||
1587 | 1589 | ||
1588 | if ((Flags & PrimFlags.Physics) != 0) | 1590 | if ((Flags & PrimFlags.Physics) != 0) |
1589 | cost *= (1.0f + 0.01333f * Scale.LengthSquared()); // 0.01333 == 0.04/3 | 1591 | cost *= (1.0f + 0.01333f * Scale.LengthSquared()); // 0.01333 == 0.04/3 |
@@ -1596,9 +1598,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1596 | { | 1598 | { |
1597 | get | 1599 | get |
1598 | { | 1600 | { |
1599 | 1601 | float cost; | |
1600 | 1602 | if (PhysActor != null) | |
1601 | return 0.1f; | 1603 | cost = PhysActor.StreamCost; |
1604 | else | ||
1605 | cost = 1.0f; | ||
1606 | return 1.0f; | ||
1602 | } | 1607 | } |
1603 | } | 1608 | } |
1604 | 1609 | ||
@@ -1654,8 +1659,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1654 | else | 1659 | else |
1655 | { | 1660 | { |
1656 | PhysActor.PhysicsShapeType = m_physicsShapeType; | 1661 | PhysActor.PhysicsShapeType = m_physicsShapeType; |
1657 | if (Shape.SculptEntry) | 1662 | // if (Shape.SculptEntry) |
1658 | CheckSculptAndLoad(); | 1663 | // CheckSculptAndLoad(); |
1659 | } | 1664 | } |
1660 | 1665 | ||
1661 | if (ParentGroup != null) | 1666 | if (ParentGroup != null) |
@@ -2115,12 +2120,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2115 | 2120 | ||
2116 | if (userExposed) | 2121 | if (userExposed) |
2117 | { | 2122 | { |
2123 | /* | ||
2118 | if (dupe.m_shape.SculptEntry && dupe.m_shape.SculptTexture != UUID.Zero) | 2124 | if (dupe.m_shape.SculptEntry && dupe.m_shape.SculptTexture != UUID.Zero) |
2119 | { | 2125 | { |
2120 | ParentGroup.Scene.AssetService.Get( | 2126 | ParentGroup.Scene.AssetService.Get( |
2121 | dupe.m_shape.SculptTexture.ToString(), dupe, dupe.AssetReceived); | 2127 | dupe.m_shape.SculptTexture.ToString(), dupe, dupe.AssetReceived); |
2122 | } | 2128 | } |
2123 | 2129 | */ | |
2124 | bool UsePhysics = ((dupe.Flags & PrimFlags.Physics) != 0); | 2130 | bool UsePhysics = ((dupe.Flags & PrimFlags.Physics) != 0); |
2125 | dupe.DoPhysicsPropertyUpdate(UsePhysics, true); | 2131 | dupe.DoPhysicsPropertyUpdate(UsePhysics, true); |
2126 | // dupe.UpdatePhysicsSubscribedEvents(); // not sure... | 2132 | // dupe.UpdatePhysicsSubscribedEvents(); // not sure... |
@@ -2142,6 +2148,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2142 | /// <param name="id">ID of asset received</param> | 2148 | /// <param name="id">ID of asset received</param> |
2143 | /// <param name="sender">Register</param> | 2149 | /// <param name="sender">Register</param> |
2144 | /// <param name="asset"></param> | 2150 | /// <param name="asset"></param> |
2151 | /* | ||
2145 | protected void AssetReceived(string id, Object sender, AssetBase asset) | 2152 | protected void AssetReceived(string id, Object sender, AssetBase asset) |
2146 | { | 2153 | { |
2147 | if (asset != null) | 2154 | if (asset != null) |
@@ -2151,7 +2158,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2151 | // "[SCENE OBJECT PART]: Part {0} {1} requested mesh/sculpt data for asset id {2} from asset service but received no data", | 2158 | // "[SCENE OBJECT PART]: Part {0} {1} requested mesh/sculpt data for asset id {2} from asset service but received no data", |
2152 | // Name, UUID, id); | 2159 | // Name, UUID, id); |
2153 | } | 2160 | } |
2154 | 2161 | */ | |
2155 | /// <summary> | 2162 | /// <summary> |
2156 | /// Do a physics property update for a NINJA joint. | 2163 | /// Do a physics property update for a NINJA joint. |
2157 | /// </summary> | 2164 | /// </summary> |
@@ -2341,9 +2348,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2341 | 2348 | ||
2342 | // If this part is a sculpt then delay the physics update until we've asynchronously loaded the | 2349 | // If this part is a sculpt then delay the physics update until we've asynchronously loaded the |
2343 | // mesh data. | 2350 | // mesh data. |
2344 | if (Shape.SculptEntry) | 2351 | // if (Shape.SculptEntry) |
2345 | CheckSculptAndLoad(); | 2352 | // CheckSculptAndLoad(); |
2346 | else | 2353 | // else |
2347 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa); | 2354 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa); |
2348 | } | 2355 | } |
2349 | } | 2356 | } |
@@ -3125,6 +3132,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3125 | /// Set sculpt and mesh data, and tell the physics engine to process the change. | 3132 | /// Set sculpt and mesh data, and tell the physics engine to process the change. |
3126 | /// </summary> | 3133 | /// </summary> |
3127 | /// <param name="texture">The mesh itself.</param> | 3134 | /// <param name="texture">The mesh itself.</param> |
3135 | /* | ||
3128 | public void SculptTextureCallback(AssetBase texture) | 3136 | public void SculptTextureCallback(AssetBase texture) |
3129 | { | 3137 | { |
3130 | if (m_shape.SculptEntry) | 3138 | if (m_shape.SculptEntry) |
@@ -3152,7 +3160,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3152 | } | 3160 | } |
3153 | } | 3161 | } |
3154 | } | 3162 | } |
3155 | 3163 | */ | |
3156 | /// <summary> | 3164 | /// <summary> |
3157 | /// Send a full update to the client for the given part | 3165 | /// Send a full update to the client for the given part |
3158 | /// </summary> | 3166 | /// </summary> |
@@ -4377,7 +4385,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4377 | public void UpdateExtraParam(ushort type, bool inUse, byte[] data) | 4385 | public void UpdateExtraParam(ushort type, bool inUse, byte[] data) |
4378 | { | 4386 | { |
4379 | m_shape.ReadInUpdateExtraParam(type, inUse, data); | 4387 | m_shape.ReadInUpdateExtraParam(type, inUse, data); |
4380 | 4388 | /* | |
4381 | if (type == 0x30) | 4389 | if (type == 0x30) |
4382 | { | 4390 | { |
4383 | if (m_shape.SculptEntry && m_shape.SculptTexture != UUID.Zero) | 4391 | if (m_shape.SculptEntry && m_shape.SculptTexture != UUID.Zero) |
@@ -4385,7 +4393,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4385 | ParentGroup.Scene.AssetService.Get(m_shape.SculptTexture.ToString(), this, AssetReceived); | 4393 | ParentGroup.Scene.AssetService.Get(m_shape.SculptTexture.ToString(), this, AssetReceived); |
4386 | } | 4394 | } |
4387 | } | 4395 | } |
4388 | 4396 | */ | |
4389 | if (ParentGroup != null) | 4397 | if (ParentGroup != null) |
4390 | { | 4398 | { |
4391 | ParentGroup.HasGroupChanged = true; | 4399 | ParentGroup.HasGroupChanged = true; |
@@ -4793,9 +4801,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
4793 | } | 4801 | } |
4794 | } | 4802 | } |
4795 | 4803 | ||
4796 | if (Shape.SculptEntry) | 4804 | // if (Shape.SculptEntry) |
4797 | CheckSculptAndLoad(); | 4805 | // CheckSculptAndLoad(); |
4798 | else | 4806 | // else |
4799 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa); | 4807 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa); |
4800 | 4808 | ||
4801 | if (!building) | 4809 | if (!building) |
@@ -4898,10 +4906,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
4898 | /// <remarks> | 4906 | /// <remarks> |
4899 | /// When the physics engine has finished with it, the sculpt data is discarded to save memory. | 4907 | /// When the physics engine has finished with it, the sculpt data is discarded to save memory. |
4900 | /// </remarks> | 4908 | /// </remarks> |
4909 | /* | ||
4901 | public void CheckSculptAndLoad() | 4910 | public void CheckSculptAndLoad() |
4902 | { | 4911 | { |
4903 | // m_log.DebugFormat("Processing CheckSculptAndLoad for {0} {1}", Name, LocalId); | 4912 | // m_log.DebugFormat("Processing CheckSculptAndLoad for {0} {1}", Name, LocalId); |
4904 | 4913 | ||
4914 | return; | ||
4915 | |||
4905 | if (ParentGroup.IsDeleted) | 4916 | if (ParentGroup.IsDeleted) |
4906 | return; | 4917 | return; |
4907 | 4918 | ||
@@ -4923,7 +4934,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4923 | } | 4934 | } |
4924 | } | 4935 | } |
4925 | } | 4936 | } |
4926 | 4937 | */ | |
4927 | /// <summary> | 4938 | /// <summary> |
4928 | /// Update the texture entry for this part. | 4939 | /// Update the texture entry for this part. |
4929 | /// </summary> | 4940 | /// </summary> |
@@ -5191,6 +5202,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5191 | } | 5202 | } |
5192 | 5203 | ||
5193 | Quaternion rot = Quaternion.Slerp(RotationOffset,APIDTarget,1.0f/(float)m_APIDIterations); | 5204 | Quaternion rot = Quaternion.Slerp(RotationOffset,APIDTarget,1.0f/(float)m_APIDIterations); |
5205 | rot.Normalize(); | ||
5194 | UpdateRotation(rot); | 5206 | UpdateRotation(rot); |
5195 | 5207 | ||
5196 | m_APIDIterations--; | 5208 | m_APIDIterations--; |