aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2015-09-30 17:34:25 +0100
committerUbitUmarov2015-09-30 17:34:25 +0100
commit4a2e6db3447ee5b4f74b9dae79702ed18d6de5e3 (patch)
tree59b6818d6b9354a89d895bdda5e44882a6c2b26f
parent some fixes/changes on land send (diff)
downloadopensim-SC-4a2e6db3447ee5b4f74b9dae79702ed18d6de5e3.zip
opensim-SC-4a2e6db3447ee5b4f74b9dae79702ed18d6de5e3.tar.gz
opensim-SC-4a2e6db3447ee5b4f74b9dae79702ed18d6de5e3.tar.bz2
opensim-SC-4a2e6db3447ee5b4f74b9dae79702ed18d6de5e3.tar.xz
add high level code suport for SetHoverHeight() called from a attachment, so in future physics engines can also suport it
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs10
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs17
2 files changed, 14 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 22b81dc..a4a33a4 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2579,7 +2579,15 @@ namespace OpenSim.Region.Framework.Scenes
2579 /// <param name="tau">Number of seconds over which to reach target</param> 2579 /// <param name="tau">Number of seconds over which to reach target</param>
2580 public void SetHoverHeight(float height, PIDHoverType hoverType, float tau) 2580 public void SetHoverHeight(float height, PIDHoverType hoverType, float tau)
2581 { 2581 {
2582 PhysicsActor pa = RootPart.PhysActor; 2582 PhysicsActor pa = null;
2583 if(IsAttachment)
2584 {
2585 ScenePresence avatar = m_scene.GetScenePresence(AttachedAvatar);
2586 if (avatar != null)
2587 pa = avatar.PhysicsActor;
2588 }
2589 else
2590 pa = RootPart.PhysActor;
2583 2591
2584 if (pa != null) 2592 if (pa != null)
2585 { 2593 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 8d40a38..16c1f16 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -3942,25 +3942,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3942 { 3942 {
3943 m_host.AddScriptLPS(1); 3943 m_host.AddScriptLPS(1);
3944 3944
3945 if (m_host.PhysActor != null) 3945 PIDHoverType hoverType = PIDHoverType.Ground;
3946 if (water != 0)
3946 { 3947 {
3947 PIDHoverType hoverType = PIDHoverType.Ground; 3948 hoverType = PIDHoverType.GroundAndWater;
3948 if (water != 0)
3949 {
3950 hoverType = PIDHoverType.GroundAndWater;
3951 }
3952
3953 m_host.SetHoverHeight((float)height, hoverType, (float)tau);
3954 } 3949 }
3950 m_host.SetHoverHeight((float)height, hoverType, (float)tau);
3955 } 3951 }
3956 3952
3957 public void llStopHover() 3953 public void llStopHover()
3958 { 3954 {
3959 m_host.AddScriptLPS(1); 3955 m_host.AddScriptLPS(1);
3960 if (m_host.PhysActor != null) 3956 m_host.SetHoverHeight(0f, PIDHoverType.Ground, 0f);
3961 {
3962 m_host.SetHoverHeight(0f, PIDHoverType.Ground, 0f);
3963 }
3964 } 3957 }
3965 3958
3966 public void llMinEventDelay(double delay) 3959 public void llMinEventDelay(double delay)