From f7419ad52d5e318f90862b28eb7546712e25d96d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 6 Aug 2016 05:21:15 +0100 Subject: ubOde revert making vehicle hover height disable hover. This at least breaks current scripts. wikis say it should, but makes no sense with vehicle type parameters defaults. Hover it again only disabled with timescale >300; handle llSameGroup on attachments --- OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs | 2 +- .../Shared/Api/Implementation/LSL_Api.cs | 34 ++++++++++++---------- 2 files changed, 20 insertions(+), 16 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs index be7cfea..d8a2272 100644 --- a/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs +++ b/OpenSim/Region/PhysicsModules/ubOde/ODEDynamics.cs @@ -828,7 +828,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde } // hover - if (m_VhoverTimescale < 300 && m_VhoverHeight >0 && rootPrim.prim_geom != IntPtr.Zero) + if (m_VhoverTimescale < 300 && rootPrim.prim_geom != IntPtr.Zero) { // d.Vector3 pos = d.BodyGetPosition(Body); d.Vector3 pos = d.GeomGetPosition(rootPrim.prim_geom); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index cf61943..ce0e59c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -6861,9 +6861,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (uuid == m_host.ParentGroup.RootPart.GroupID) return new LSL_Integer(1); - // We got passed a UUID.Zero - if (uuid == UUID.Zero) - return new LSL_Integer(0); + // Handle object case + SceneObjectPart part = World.GetSceneObjectPart(uuid); + if (part != null) + { + + if(part.ParentGroup.IsAttachment) + { + uuid = part.ParentGroup.AttachedAvatar; + } + else + { + // This will handle both deed and non-deed and also the no + // group case + if (part.ParentGroup.RootPart.GroupID == m_host.ParentGroup.RootPart.GroupID) + return new LSL_Integer(1); + + return new LSL_Integer(0); + } + } // Handle the case where id names an avatar ScenePresence presence = World.GetScenePresence(uuid); @@ -6879,18 +6895,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return new LSL_Integer(0); } - // Handle object case - SceneObjectPart part = World.GetSceneObjectPart(uuid); - if (part != null) - { - // This will handle both deed and non-deed and also the no - // group case - if (part.ParentGroup.RootPart.GroupID == m_host.ParentGroup.RootPart.GroupID) - return new LSL_Integer(1); - - return new LSL_Integer(0); - } - return new LSL_Integer(0); } -- cgit v1.1