From 3a055c578d9fb2e1f6c0c9ba47a7b8c9c5d8af48 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 2 May 2019 03:11:16 +0100 Subject: soem cleanup --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 13 +++---------- .../ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 2 +- .../ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | 15 ++++++++++++++- 3 files changed, 18 insertions(+), 12 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index cd2b9b4..b12bb45 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1769,19 +1769,12 @@ namespace OpenSim.Region.Framework.Scenes float localHalfAVHeight = 0.8f; if (Appearance != null) - localHalfAVHeight = Appearance.AvatarHeight / 2; - - float posZLimit = 22; - - // TODO: Check other Scene HeightField - posZLimit = (float)Scene.Heightmap[(int)newpos.X, (int)newpos.Y]; + localHalfAVHeight = Appearance.AvatarHeight * 0.5f; + float posZLimit = (float)Scene.Heightmap[(int)newpos.X, (int)newpos.Y]; posZLimit += localHalfAVHeight + 0.1f; - - if ((newpos.Z < posZLimit) && !(Single.IsInfinity(posZLimit) || Single.IsNaN(posZLimit))) - { + if (newpos.Z < posZLimit) newpos.Z = posZLimit; - } if ((flags & 8) != 0) Flying = true; diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index a0f784e..7d3c832 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -936,7 +936,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api Vector3 pos = presence.AbsolutePosition; if (!checkAllowAgentTPbyLandOwner(agentId, pos)) - return; + return; World.RequestLocalTeleport(presence, position, velocity, lookat, flags); } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 8b70128..86c6d7c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -35,7 +35,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public partial class ScriptBaseClass { // SCRIPTS CONSTANTS - public static readonly LSLInteger OS_APIVERSION = 3; + public static readonly LSLInteger OS_APIVERSION = 4; public static readonly LSLInteger TRUE = 1; public static readonly LSLInteger FALSE = 0; @@ -898,6 +898,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase //ApiDesc osTeleportObject flag: the rotation is the final rotation, otherwise is a added rotation public const int OSTPOBJ_SETROT = 0x4; + //ApiDesc osLocalTeleportAgent no flags + public const int OS_LTPAG_NONE = 0x0; + //ApiDesc osLocalTeleportAgent use velocity + public const int OS_LTPAG_USEVEL = 0x1; + //ApiDesc osLocalTeleportAgent use lookat + public const int OS_LTPAG_USELOOKAT = 0x2; + //ApiDesc osLocalTeleportAgent align lookat to velocity + public const int OS_LTPAG_ALGNLV = 0x4; + //ApiDesc osLocalTeleportAgent force fly + public const int OS_LTPAG_FORCEFLY = 0x8; + //ApiDesc osLocalTeleportAgent force no fly + public const int OS_LTPAG_FORCENOFLY = 0x16; + // Constants for Windlight public const int WL_WATER_COLOR = 0; public const int WL_WATER_FOG_DENSITY_EXPONENT = 1; -- cgit v1.1