If calling llStopMoveToTarget() on an in-world prim, don't send an unnecessary object update if the prim was not moving to target.

This involves making PhysicsActor.PIDActive get as well as set.
On physics components that don't implement this (all characters and some phys engines) we return false.
This commit is contained in:
Justin Clark-Casey
2014-11-19 20:06:56 +00:00
parent bdebd525db
commit 7a2c77e7ea
11 changed files with 46 additions and 21 deletions

View File

@@ -614,9 +614,9 @@ public sealed class BSCharacter : BSPhysObject
public override OMV.Vector3 PIDTarget {
set { _PIDTarget = value; }
}
public override bool PIDActive {
set { _usePID = value; }
}
public override bool PIDActive { get; set; }
public override float PIDTau {
set { _PIDTau = value; }
}

View File

@@ -246,7 +246,12 @@ public abstract class BSPhysObject : PhysicsActor
public virtual bool ForceBodyShapeRebuild(bool inTaintTime) { return false; }
public override bool PIDActive { set { MoveToTargetActive = value; } }
public override bool PIDActive
{
get { return MoveToTargetActive; }
set { MoveToTargetActive = value; }
}
public override OMV.Vector3 PIDTarget { set { MoveToTargetTarget = value; } }
public override float PIDTau { set { MoveToTargetTau = value; } }

View File

@@ -1087,9 +1087,17 @@ public class BSPrim : BSPhysObject
}
}
public override bool PIDActive {
set {
base.MoveToTargetActive = value;
public override bool PIDActive
{
get
{
return MoveToTargetActive;
}
set
{
MoveToTargetActive = value;
EnableActor(MoveToTargetActive, MoveToTargetActorName, delegate()
{
return new BSActorMoveToTarget(PhysScene, this, MoveToTargetActorName);