aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs90
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs44
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs4
3 files changed, 27 insertions, 111 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index c2c0178..730e487 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1231,36 +1231,6 @@ namespace OpenSim.Region.Framework.Scenes
1231// } 1231// }
1232 } 1232 }
1233 } 1233 }
1234 // PlaySoundMasterPrim no longer in use to remove
1235 private SceneObjectPart m_PlaySoundMasterPrim = null;
1236 public SceneObjectPart PlaySoundMasterPrim
1237 {
1238 get { return m_PlaySoundMasterPrim; }
1239 set { m_PlaySoundMasterPrim = value; }
1240 }
1241 // PlaySoundSlavePrims no longer in use to remove
1242 private List<SceneObjectPart> m_PlaySoundSlavePrims = new List<SceneObjectPart>();
1243 public List<SceneObjectPart> PlaySoundSlavePrims
1244 {
1245 get { return m_PlaySoundSlavePrims; }
1246 set { m_PlaySoundSlavePrims = value; }
1247 }
1248
1249 // LoopSoundMasterPrim no longer in use to remove
1250 private SceneObjectPart m_LoopSoundMasterPrim = null;
1251 public SceneObjectPart LoopSoundMasterPrim
1252 {
1253 get { return m_LoopSoundMasterPrim; }
1254 set { m_LoopSoundMasterPrim = value; }
1255 }
1256
1257 // m_LoopSoundSlavePrims no longer in use to remove
1258 private List<SceneObjectPart> m_LoopSoundSlavePrims = new List<SceneObjectPart>();
1259 public List<SceneObjectPart> LoopSoundSlavePrims
1260 {
1261 get { return m_LoopSoundSlavePrims; }
1262 set { m_LoopSoundSlavePrims = value; }
1263 }
1264 1234
1265 private double m_lastCollisionSoundMS; 1235 private double m_lastCollisionSoundMS;
1266 1236
@@ -1465,9 +1435,10 @@ namespace OpenSim.Region.Framework.Scenes
1465 m_rootPart.LocalId = m_scene.AllocateLocalId(); 1435 m_rootPart.LocalId = m_scene.AllocateLocalId();
1466 1436
1467 SceneObjectPart[] parts = m_parts.GetArray(); 1437 SceneObjectPart[] parts = m_parts.GetArray();
1438 SceneObjectPart part;
1468 for (int i = 0; i < parts.Length; i++) 1439 for (int i = 0; i < parts.Length; i++)
1469 { 1440 {
1470 SceneObjectPart part = parts[i]; 1441 part = parts[i];
1471 if (part.KeyframeMotion != null) 1442 if (part.KeyframeMotion != null)
1472 { 1443 {
1473 part.KeyframeMotion.UpdateSceneObject(this); 1444 part.KeyframeMotion.UpdateSceneObject(this);
@@ -1963,12 +1934,7 @@ namespace OpenSim.Region.Framework.Scenes
1963 public void GetSelectedCosts(out float PhysCost, out float StreamCost, out float SimulCost) 1934 public void GetSelectedCosts(out float PhysCost, out float StreamCost, out float SimulCost)
1964 { 1935 {
1965 SceneObjectPart p; 1936 SceneObjectPart p;
1966 SceneObjectPart[] parts; 1937 SceneObjectPart[] parts = m_parts.GetArray();
1967
1968 lock (m_parts)
1969 {
1970 parts = m_parts.GetArray();
1971 }
1972 1938
1973 int nparts = parts.Length; 1939 int nparts = parts.Length;
1974 1940
@@ -2098,11 +2064,6 @@ namespace OpenSim.Region.Framework.Scenes
2098 part.ClearUndoState(); 2064 part.ClearUndoState();
2099 } 2065 }
2100 2066
2101 public ushort GetTimeDilation()
2102 {
2103 return Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f);
2104 }
2105
2106 /// <summary> 2067 /// <summary>
2107 /// Set a part to act as the root part for this scene object 2068 /// Set a part to act as the root part for this scene object
2108 /// </summary> 2069 /// </summary>
@@ -2765,24 +2726,29 @@ namespace OpenSim.Region.Framework.Scenes
2765 // This is used by both Double-Click Auto-Pilot and llMoveToTarget() in an attached object 2726 // This is used by both Double-Click Auto-Pilot and llMoveToTarget() in an attached object
2766 public void MoveToTarget(Vector3 target, float tau) 2727 public void MoveToTarget(Vector3 target, float tau)
2767 { 2728 {
2768 if (IsAttachment) 2729 if(tau > 0)
2769 { 2730 {
2770 ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar); 2731 if (IsAttachment)
2771 2732 {
2772 if (avatar != null && !avatar.IsSatOnObject) 2733 ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar);
2773 avatar.MoveToTarget(target, false, false, tau);
2774 }
2775 else
2776 {
2777 PhysicsActor pa = RootPart.PhysActor;
2778 2734
2779 if (pa != null) 2735 if (avatar != null && !avatar.IsSatOnObject)
2736 avatar.MoveToTarget(target, false, false, tau);
2737 }
2738 else
2780 { 2739 {
2781 pa.PIDTarget = target; 2740 PhysicsActor pa = RootPart.PhysActor;
2782 pa.PIDTau = tau; 2741
2783 pa.PIDActive = true; 2742 if (pa != null)
2743 {
2744 pa.PIDTarget = target;
2745 pa.PIDTau = tau;
2746 pa.PIDActive = true;
2747 }
2784 } 2748 }
2785 } 2749 }
2750 else
2751 StopMoveToTarget();
2786 } 2752 }
2787 2753
2788 public void StopMoveToTarget() 2754 public void StopMoveToTarget()
@@ -3188,13 +3154,9 @@ namespace OpenSim.Region.Framework.Scenes
3188 /// <returns>null if a part with the local ID was not found</returns> 3154 /// <returns>null if a part with the local ID was not found</returns>
3189 public SceneObjectPart GetPart(uint localID) 3155 public SceneObjectPart GetPart(uint localID)
3190 { 3156 {
3191 SceneObjectPart[] parts = m_parts.GetArray(); 3157 SceneObjectPart sop = m_scene.GetSceneObjectPart(localID);
3192 for (int i = 0; i < parts.Length; i++) 3158 if(sop.ParentGroup.Equals(this))
3193 { 3159 return sop;
3194 if (parts[i].LocalId == localID)
3195 return parts[i];
3196 }
3197
3198 return null; 3160 return null;
3199 } 3161 }
3200 3162
@@ -4013,7 +3975,6 @@ namespace OpenSim.Region.Framework.Scenes
4013 AttachToBackup(); 3975 AttachToBackup();
4014 } 3976 }
4015 3977
4016
4017 SceneObjectPart[] parts = m_parts.GetArray(); 3978 SceneObjectPart[] parts = m_parts.GetArray();
4018 3979
4019 if (UsePhysics) 3980 if (UsePhysics)
@@ -4054,8 +4015,7 @@ namespace OpenSim.Region.Framework.Scenes
4054 4015
4055 for (int i = 0; i < parts.Length; i++) 4016 for (int i = 0; i < parts.Length; i++)
4056 { 4017 {
4057 4018 if (parts[i].LocalId != m_rootPart.LocalId)
4058 if (parts[i].UUID != m_rootPart.UUID)
4059 parts[i].UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect, true); 4019 parts[i].UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect, true);
4060 } 4020 }
4061 4021
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index abda29a..0ff9388 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -703,33 +703,6 @@ namespace OpenSim.Region.Framework.Scenes
703 get { return m_scriptAccessPin; } 703 get { return m_scriptAccessPin; }
704 set { m_scriptAccessPin = (int)value; } 704 set { m_scriptAccessPin = (int)value; }
705 } 705 }
706 private SceneObjectPart m_PlaySoundMasterPrim = null;
707 public SceneObjectPart PlaySoundMasterPrim
708 {
709 get { return m_PlaySoundMasterPrim; }
710 set { m_PlaySoundMasterPrim = value; }
711 }
712
713 private List<SceneObjectPart> m_PlaySoundSlavePrims = new List<SceneObjectPart>();
714 public List<SceneObjectPart> PlaySoundSlavePrims
715 {
716 get { return m_PlaySoundSlavePrims; }
717 set { m_PlaySoundSlavePrims = value; }
718 }
719
720 private SceneObjectPart m_LoopSoundMasterPrim = null;
721 public SceneObjectPart LoopSoundMasterPrim
722 {
723 get { return m_LoopSoundMasterPrim; }
724 set { m_LoopSoundMasterPrim = value; }
725 }
726
727 private List<SceneObjectPart> m_LoopSoundSlavePrims = new List<SceneObjectPart>();
728 public List<SceneObjectPart> LoopSoundSlavePrims
729 {
730 get { return m_LoopSoundSlavePrims; }
731 set { m_LoopSoundSlavePrims = value; }
732 }
733 706
734 public Byte[] TextureAnimation 707 public Byte[] TextureAnimation
735 { 708 {
@@ -2714,18 +2687,6 @@ namespace OpenSim.Region.Framework.Scenes
2714 return newRot; 2687 return newRot;
2715 } 2688 }
2716 2689
2717 public void MoveToTarget(Vector3 target, float tau)
2718 {
2719 if (tau > 0)
2720 {
2721 ParentGroup.MoveToTarget(target, tau);
2722 }
2723 else
2724 {
2725 StopMoveToTarget();
2726 }
2727 }
2728
2729 /// <summary> 2690 /// <summary>
2730 /// Uses a PID to attempt to clamp the object on the Z axis at the given height over tau seconds. 2691 /// Uses a PID to attempt to clamp the object on the Z axis at the given height over tau seconds.
2731 /// </summary> 2692 /// </summary>
@@ -4139,11 +4100,6 @@ namespace OpenSim.Region.Framework.Scenes
4139 SetText(text); 4100 SetText(text);
4140 } 4101 }
4141 4102
4142 public void StopMoveToTarget()
4143 {
4144 ParentGroup.StopMoveToTarget();
4145 }
4146
4147 public void StoreUndoState(ObjectChangeType change) 4103 public void StoreUndoState(ObjectChangeType change)
4148 { 4104 {
4149 lock (m_UndoLock) 4105 lock (m_UndoLock)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 48c3812..6f3c7e9 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3035,13 +3035,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3035 public void llMoveToTarget(LSL_Vector target, double tau) 3035 public void llMoveToTarget(LSL_Vector target, double tau)
3036 { 3036 {
3037 m_host.AddScriptLPS(1); 3037 m_host.AddScriptLPS(1);
3038 m_host.MoveToTarget(target, (float)tau); 3038 m_host.ParentGroup.MoveToTarget(target, (float)tau);
3039 } 3039 }
3040 3040
3041 public void llStopMoveToTarget() 3041 public void llStopMoveToTarget()
3042 { 3042 {
3043 m_host.AddScriptLPS(1); 3043 m_host.AddScriptLPS(1);
3044 m_host.StopMoveToTarget(); 3044 m_host.ParentGroup.StopMoveToTarget();
3045 } 3045 }
3046 3046
3047 public void llApplyImpulse(LSL_Vector force, int local) 3047 public void llApplyImpulse(LSL_Vector force, int local)