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 +-- .../Shared/Api/Implementation/OSSL_Api.cs | 2 +- .../Shared/Api/Runtime/LSL_Constants.cs | 15 ++- bin/ScriptSyntax.xml | 104 ++++++++++++++------- 4 files changed, 90 insertions(+), 44 deletions(-) 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; diff --git a/bin/ScriptSyntax.xml b/bin/ScriptSyntax.xml index d01414b..2282ada 100644 --- a/bin/ScriptSyntax.xml +++ b/bin/ScriptSyntax.xml @@ -1,4 +1,4 @@ -5b85f255-466f-238d-90ed-5726eaa2e67b +24121ec8-c0a3-099d-8d83-64feaa32418c llsd-lsl-syntax-version2 controls @@ -1513,7 +1513,7 @@ OS_APIVERSION typeinteger - value3 + value4 OS_ATTACH_MSG_ALL typeinteger @@ -1539,6 +1539,36 @@ typeinteger value0x1 + OS_LTPAG_ALGNLV + typeinteger + value0x4 + tooltiposLocalTeleportAgent align lookat to velocity + + OS_LTPAG_FORCEFLY + typeinteger + value0x8 + tooltiposLocalTeleportAgent force fly + + OS_LTPAG_FORCENOFLY + typeinteger + value0x16 + tooltiposLocalTeleportAgent force no fly + + OS_LTPAG_NONE + typeinteger + value0x0 + tooltiposLocalTeleportAgent no flags + + OS_LTPAG_USELOOKAT + typeinteger + value0x2 + tooltiposLocalTeleportAgent use lookat + + OS_LTPAG_USEVEL + typeinteger + value0x1 + tooltiposLocalTeleportAgent use velocity + OS_NPC_CREATOR_OWNED typeinteger value0x1 @@ -6116,49 +6146,49 @@ arguments atypefloat btypefloat - margintypefloat osApproxEquals returninteger arguments - ratyperotation - rbtyperotation - margintypefloat + vatypevector + vbtypevector osApproxEquals returninteger arguments - ratyperotation - rbtyperotation + atypefloat + btypefloat + margintypefloat osApproxEquals returninteger arguments - vatypevector - vbtypevector - margintypefloat + ratyperotation + rbtyperotation osApproxEquals returninteger arguments - vatypevector - vbtypevector + ratyperotation + rbtyperotation + margintypefloat osApproxEquals returninteger arguments - atypefloat - btypefloat + vatypevector + vbtypevector + margintypefloat osAvatarName2Key @@ -6284,8 +6314,6 @@ returnstring arguments drawListtypestring - startXtypeinteger - startYtypeinteger endXtypeinteger endYtypeinteger @@ -6295,6 +6323,8 @@ returnstring arguments drawListtypestring + startXtypeinteger + startYtypeinteger endXtypeinteger endYtypeinteger @@ -6433,13 +6463,13 @@ arguments avatartypestring + targettypestring osForceOtherSit arguments avatartypestring - targettypestring osFormatString @@ -6754,15 +6784,15 @@ osKickAvatar arguments - agentIdtypekey + FirstNametypestring + SurNametypestring alerttypestring osKickAvatar arguments - FirstNametypestring - SurNametypestring + agentIdtypekey alerttypestring @@ -6781,6 +6811,16 @@ returnstring arguments + osLocalTeleportAgent + + arguments + agenttypekey + positiontypevector + velocitytypevector + lookattypevector + flagstypeinteger + + osLoopSound arguments @@ -7105,13 +7145,13 @@ osRegionNotice arguments + agentIDtypekey msgtypestring osRegionNotice arguments - agentIDtypekey msgtypestring @@ -7351,7 +7391,6 @@ osSetProjectionParams arguments - primtypekey projectiontypeinteger texturetypekey fovtypefloat @@ -7362,6 +7401,7 @@ osSetProjectionParams arguments + linknumbertypeinteger projectiontypeinteger texturetypekey fovtypefloat @@ -7372,7 +7412,7 @@ osSetProjectionParams arguments - linknumbertypeinteger + primtypekey projectiontypeinteger texturetypekey fovtypefloat @@ -7494,8 +7534,6 @@ arguments srctypestring valuetypestring - starttypeinteger - counttypeinteger ignorecasetypeinteger @@ -7505,6 +7543,8 @@ arguments srctypestring valuetypestring + starttypeinteger + counttypeinteger ignorecasetypeinteger @@ -7541,6 +7581,7 @@ arguments srctypestring starttypeinteger + lengthtypeinteger osStringSubString @@ -7549,7 +7590,6 @@ arguments srctypestring starttypeinteger - lengthtypeinteger osSunGetParam @@ -7579,8 +7619,6 @@ arguments agenttypestring - regionXtypeinteger - regionYtypeinteger positiontypevector lookattypevector @@ -7589,6 +7627,8 @@ arguments agenttypestring + regionXtypeinteger + regionYtypeinteger positiontypevector lookattypevector @@ -7606,8 +7646,6 @@ osTeleportOwner arguments - regionXtypeinteger - regionYtypeinteger positiontypevector lookattypevector @@ -7615,7 +7653,8 @@ osTeleportOwner arguments - regionNametypestring + regionXtypeinteger + regionYtypeinteger positiontypevector lookattypevector @@ -7623,6 +7662,7 @@ osTeleportOwner arguments + regionNametypestring positiontypevector lookattypevector -- cgit v1.1