diff options
author | Melanie | 2012-10-18 20:56:34 +0100 |
---|---|---|
committer | Melanie | 2012-10-18 20:56:34 +0100 |
commit | 72c925a6c9eb4dea6f9134db10c3af28ea83df48 (patch) | |
tree | 9f991ade4e71f91fc612759b4e783c9f01a740f3 /OpenSim/Region/Framework | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Remove redundant and annoyingly modal message box in upload processing. (diff) | |
download | opensim-SC_OLD-72c925a6c9eb4dea6f9134db10c3af28ea83df48.zip opensim-SC_OLD-72c925a6c9eb4dea6f9134db10c3af28ea83df48.tar.gz opensim-SC_OLD-72c925a6c9eb4dea6f9134db10c3af28ea83df48.tar.bz2 opensim-SC_OLD-72c925a6c9eb4dea6f9134db10c3af28ea83df48.tar.xz |
Merge branch 'avination' into careminster
Conflicts:
OpenSim/Framework/WebUtil.cs
OpenSim/Region/Physics/OdePlugin/OdeScene.cs
Diffstat (limited to 'OpenSim/Region/Framework')
-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 985f0a0..782a1af 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -4386,8 +4386,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4386 | 4386 | ||
4387 | SceneObjectPart[] parts = m_parts.GetArray(); | 4387 | SceneObjectPart[] parts = m_parts.GetArray(); |
4388 | 4388 | ||
4389 | for (int i = 0; i < parts.Length; i++) | 4389 | // for (int i = 0; i < parts.Length; i++) |
4390 | parts[i].CheckSculptAndLoad(); | 4390 | // parts[i].CheckSculptAndLoad(); |
4391 | } | 4391 | } |
4392 | 4392 | ||
4393 | /// <summary> | 4393 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 2d90a22..248679b 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 | } |
@@ -3128,6 +3135,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3128 | /// Set sculpt and mesh data, and tell the physics engine to process the change. | 3135 | /// Set sculpt and mesh data, and tell the physics engine to process the change. |
3129 | /// </summary> | 3136 | /// </summary> |
3130 | /// <param name="texture">The mesh itself.</param> | 3137 | /// <param name="texture">The mesh itself.</param> |
3138 | /* | ||
3131 | public void SculptTextureCallback(AssetBase texture) | 3139 | public void SculptTextureCallback(AssetBase texture) |
3132 | { | 3140 | { |
3133 | if (m_shape.SculptEntry) | 3141 | if (m_shape.SculptEntry) |
@@ -3155,7 +3163,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3155 | } | 3163 | } |
3156 | } | 3164 | } |
3157 | } | 3165 | } |
3158 | 3166 | */ | |
3159 | /// <summary> | 3167 | /// <summary> |
3160 | /// Send a full update to the client for the given part | 3168 | /// Send a full update to the client for the given part |
3161 | /// </summary> | 3169 | /// </summary> |
@@ -4397,7 +4405,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4397 | public void UpdateExtraParam(ushort type, bool inUse, byte[] data) | 4405 | public void UpdateExtraParam(ushort type, bool inUse, byte[] data) |
4398 | { | 4406 | { |
4399 | m_shape.ReadInUpdateExtraParam(type, inUse, data); | 4407 | m_shape.ReadInUpdateExtraParam(type, inUse, data); |
4400 | 4408 | /* | |
4401 | if (type == 0x30) | 4409 | if (type == 0x30) |
4402 | { | 4410 | { |
4403 | if (m_shape.SculptEntry && m_shape.SculptTexture != UUID.Zero) | 4411 | if (m_shape.SculptEntry && m_shape.SculptTexture != UUID.Zero) |
@@ -4405,7 +4413,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4405 | ParentGroup.Scene.AssetService.Get(m_shape.SculptTexture.ToString(), this, AssetReceived); | 4413 | ParentGroup.Scene.AssetService.Get(m_shape.SculptTexture.ToString(), this, AssetReceived); |
4406 | } | 4414 | } |
4407 | } | 4415 | } |
4408 | 4416 | */ | |
4409 | if (ParentGroup != null) | 4417 | if (ParentGroup != null) |
4410 | { | 4418 | { |
4411 | ParentGroup.HasGroupChanged = true; | 4419 | ParentGroup.HasGroupChanged = true; |
@@ -4813,9 +4821,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
4813 | } | 4821 | } |
4814 | } | 4822 | } |
4815 | 4823 | ||
4816 | if (Shape.SculptEntry) | 4824 | // if (Shape.SculptEntry) |
4817 | CheckSculptAndLoad(); | 4825 | // CheckSculptAndLoad(); |
4818 | else | 4826 | // else |
4819 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa); | 4827 | ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(pa); |
4820 | 4828 | ||
4821 | if (!building) | 4829 | if (!building) |
@@ -4969,10 +4977,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
4969 | /// <remarks> | 4977 | /// <remarks> |
4970 | /// When the physics engine has finished with it, the sculpt data is discarded to save memory. | 4978 | /// When the physics engine has finished with it, the sculpt data is discarded to save memory. |
4971 | /// </remarks> | 4979 | /// </remarks> |
4980 | /* | ||
4972 | public void CheckSculptAndLoad() | 4981 | public void CheckSculptAndLoad() |
4973 | { | 4982 | { |
4974 | // m_log.DebugFormat("Processing CheckSculptAndLoad for {0} {1}", Name, LocalId); | 4983 | // m_log.DebugFormat("Processing CheckSculptAndLoad for {0} {1}", Name, LocalId); |
4975 | 4984 | ||
4985 | return; | ||
4986 | |||
4976 | if (ParentGroup.IsDeleted) | 4987 | if (ParentGroup.IsDeleted) |
4977 | return; | 4988 | return; |
4978 | 4989 | ||
@@ -4994,7 +5005,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4994 | } | 5005 | } |
4995 | } | 5006 | } |
4996 | } | 5007 | } |
4997 | 5008 | */ | |
4998 | /// <summary> | 5009 | /// <summary> |
4999 | /// Update the texture entry for this part. | 5010 | /// Update the texture entry for this part. |
5000 | /// </summary> | 5011 | /// </summary> |
@@ -5262,6 +5273,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
5262 | } | 5273 | } |
5263 | 5274 | ||
5264 | Quaternion rot = Quaternion.Slerp(RotationOffset,APIDTarget,1.0f/(float)m_APIDIterations); | 5275 | Quaternion rot = Quaternion.Slerp(RotationOffset,APIDTarget,1.0f/(float)m_APIDIterations); |
5276 | rot.Normalize(); | ||
5265 | UpdateRotation(rot); | 5277 | UpdateRotation(rot); |
5266 | 5278 | ||
5267 | m_APIDIterations--; | 5279 | m_APIDIterations--; |