some cleanup
parent
44d6746f40
commit
237cf1ced6
|
@ -1231,36 +1231,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// }
|
||||
}
|
||||
}
|
||||
// PlaySoundMasterPrim no longer in use to remove
|
||||
private SceneObjectPart m_PlaySoundMasterPrim = null;
|
||||
public SceneObjectPart PlaySoundMasterPrim
|
||||
{
|
||||
get { return m_PlaySoundMasterPrim; }
|
||||
set { m_PlaySoundMasterPrim = value; }
|
||||
}
|
||||
// PlaySoundSlavePrims no longer in use to remove
|
||||
private List<SceneObjectPart> m_PlaySoundSlavePrims = new List<SceneObjectPart>();
|
||||
public List<SceneObjectPart> PlaySoundSlavePrims
|
||||
{
|
||||
get { return m_PlaySoundSlavePrims; }
|
||||
set { m_PlaySoundSlavePrims = value; }
|
||||
}
|
||||
|
||||
// LoopSoundMasterPrim no longer in use to remove
|
||||
private SceneObjectPart m_LoopSoundMasterPrim = null;
|
||||
public SceneObjectPart LoopSoundMasterPrim
|
||||
{
|
||||
get { return m_LoopSoundMasterPrim; }
|
||||
set { m_LoopSoundMasterPrim = value; }
|
||||
}
|
||||
|
||||
// m_LoopSoundSlavePrims no longer in use to remove
|
||||
private List<SceneObjectPart> m_LoopSoundSlavePrims = new List<SceneObjectPart>();
|
||||
public List<SceneObjectPart> LoopSoundSlavePrims
|
||||
{
|
||||
get { return m_LoopSoundSlavePrims; }
|
||||
set { m_LoopSoundSlavePrims = value; }
|
||||
}
|
||||
|
||||
private double m_lastCollisionSoundMS;
|
||||
|
||||
|
@ -1465,9 +1435,10 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
m_rootPart.LocalId = m_scene.AllocateLocalId();
|
||||
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
SceneObjectPart part;
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
{
|
||||
SceneObjectPart part = parts[i];
|
||||
part = parts[i];
|
||||
if (part.KeyframeMotion != null)
|
||||
{
|
||||
part.KeyframeMotion.UpdateSceneObject(this);
|
||||
|
@ -1963,12 +1934,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
public void GetSelectedCosts(out float PhysCost, out float StreamCost, out float SimulCost)
|
||||
{
|
||||
SceneObjectPart p;
|
||||
SceneObjectPart[] parts;
|
||||
|
||||
lock (m_parts)
|
||||
{
|
||||
parts = m_parts.GetArray();
|
||||
}
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
|
||||
int nparts = parts.Length;
|
||||
|
||||
|
@ -2098,11 +2064,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
part.ClearUndoState();
|
||||
}
|
||||
|
||||
public ushort GetTimeDilation()
|
||||
{
|
||||
return Utils.FloatToUInt16(m_scene.TimeDilation, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set a part to act as the root part for this scene object
|
||||
/// </summary>
|
||||
|
@ -2765,24 +2726,29 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
// This is used by both Double-Click Auto-Pilot and llMoveToTarget() in an attached object
|
||||
public void MoveToTarget(Vector3 target, float tau)
|
||||
{
|
||||
if (IsAttachment)
|
||||
if(tau > 0)
|
||||
{
|
||||
ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar);
|
||||
|
||||
if (avatar != null && !avatar.IsSatOnObject)
|
||||
avatar.MoveToTarget(target, false, false, tau);
|
||||
}
|
||||
else
|
||||
{
|
||||
PhysicsActor pa = RootPart.PhysActor;
|
||||
|
||||
if (pa != null)
|
||||
if (IsAttachment)
|
||||
{
|
||||
pa.PIDTarget = target;
|
||||
pa.PIDTau = tau;
|
||||
pa.PIDActive = true;
|
||||
ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar);
|
||||
|
||||
if (avatar != null && !avatar.IsSatOnObject)
|
||||
avatar.MoveToTarget(target, false, false, tau);
|
||||
}
|
||||
else
|
||||
{
|
||||
PhysicsActor pa = RootPart.PhysActor;
|
||||
|
||||
if (pa != null)
|
||||
{
|
||||
pa.PIDTarget = target;
|
||||
pa.PIDTau = tau;
|
||||
pa.PIDActive = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
StopMoveToTarget();
|
||||
}
|
||||
|
||||
public void StopMoveToTarget()
|
||||
|
@ -3188,13 +3154,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// <returns>null if a part with the local ID was not found</returns>
|
||||
public SceneObjectPart GetPart(uint localID)
|
||||
{
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
{
|
||||
if (parts[i].LocalId == localID)
|
||||
return parts[i];
|
||||
}
|
||||
|
||||
SceneObjectPart sop = m_scene.GetSceneObjectPart(localID);
|
||||
if(sop.ParentGroup.Equals(this))
|
||||
return sop;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -4013,7 +3975,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
AttachToBackup();
|
||||
}
|
||||
|
||||
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
|
||||
if (UsePhysics)
|
||||
|
@ -4054,8 +4015,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
{
|
||||
|
||||
if (parts[i].UUID != m_rootPart.UUID)
|
||||
if (parts[i].LocalId != m_rootPart.LocalId)
|
||||
parts[i].UpdatePrimFlags(UsePhysics, SetTemporary, SetPhantom, SetVolumeDetect, true);
|
||||
}
|
||||
|
||||
|
|
|
@ -703,33 +703,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
get { return m_scriptAccessPin; }
|
||||
set { m_scriptAccessPin = (int)value; }
|
||||
}
|
||||
private SceneObjectPart m_PlaySoundMasterPrim = null;
|
||||
public SceneObjectPart PlaySoundMasterPrim
|
||||
{
|
||||
get { return m_PlaySoundMasterPrim; }
|
||||
set { m_PlaySoundMasterPrim = value; }
|
||||
}
|
||||
|
||||
private List<SceneObjectPart> m_PlaySoundSlavePrims = new List<SceneObjectPart>();
|
||||
public List<SceneObjectPart> PlaySoundSlavePrims
|
||||
{
|
||||
get { return m_PlaySoundSlavePrims; }
|
||||
set { m_PlaySoundSlavePrims = value; }
|
||||
}
|
||||
|
||||
private SceneObjectPart m_LoopSoundMasterPrim = null;
|
||||
public SceneObjectPart LoopSoundMasterPrim
|
||||
{
|
||||
get { return m_LoopSoundMasterPrim; }
|
||||
set { m_LoopSoundMasterPrim = value; }
|
||||
}
|
||||
|
||||
private List<SceneObjectPart> m_LoopSoundSlavePrims = new List<SceneObjectPart>();
|
||||
public List<SceneObjectPart> LoopSoundSlavePrims
|
||||
{
|
||||
get { return m_LoopSoundSlavePrims; }
|
||||
set { m_LoopSoundSlavePrims = value; }
|
||||
}
|
||||
|
||||
public Byte[] TextureAnimation
|
||||
{
|
||||
|
@ -2714,18 +2687,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
return newRot;
|
||||
}
|
||||
|
||||
public void MoveToTarget(Vector3 target, float tau)
|
||||
{
|
||||
if (tau > 0)
|
||||
{
|
||||
ParentGroup.MoveToTarget(target, tau);
|
||||
}
|
||||
else
|
||||
{
|
||||
StopMoveToTarget();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Uses a PID to attempt to clamp the object on the Z axis at the given height over tau seconds.
|
||||
/// </summary>
|
||||
|
@ -4139,11 +4100,6 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
SetText(text);
|
||||
}
|
||||
|
||||
public void StopMoveToTarget()
|
||||
{
|
||||
ParentGroup.StopMoveToTarget();
|
||||
}
|
||||
|
||||
public void StoreUndoState(ObjectChangeType change)
|
||||
{
|
||||
lock (m_UndoLock)
|
||||
|
|
|
@ -3035,13 +3035,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
public void llMoveToTarget(LSL_Vector target, double tau)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
m_host.MoveToTarget(target, (float)tau);
|
||||
m_host.ParentGroup.MoveToTarget(target, (float)tau);
|
||||
}
|
||||
|
||||
public void llStopMoveToTarget()
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
m_host.StopMoveToTarget();
|
||||
m_host.ParentGroup.StopMoveToTarget();
|
||||
}
|
||||
|
||||
public void llApplyImpulse(LSL_Vector force, int local)
|
||||
|
|
Loading…
Reference in New Issue