add high level code suport for SetHoverHeight() called from a attachment, so in future physics engines can also suport it

This commit is contained in:
UbitUmarov
2015-09-30 17:34:25 +01:00
parent d281ec5342
commit 4a2e6db344
2 changed files with 14 additions and 13 deletions

View File

@@ -2579,7 +2579,15 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="tau">Number of seconds over which to reach target</param>
public void SetHoverHeight(float height, PIDHoverType hoverType, float tau)
{
PhysicsActor pa = RootPart.PhysActor;
PhysicsActor pa = null;
if(IsAttachment)
{
ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar);
if (avatar != null)
pa = avatar.PhysicsActor;
}
else
pa = RootPart.PhysActor;
if (pa != null)
{