diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index cd2b9b4222..b12bb456ea 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 a0f784e667..7d3c832d1e 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 8b70128e71..86c6d7c2c8 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 d01414b921..2282adaea1 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,33 +6146,6 @@ arguments atypefloat btypefloat - margintypefloat - - - osApproxEquals - - returninteger - arguments - ratyperotation - rbtyperotation - margintypefloat - - - osApproxEquals - - returninteger - arguments - ratyperotation - rbtyperotation - - - osApproxEquals - - returninteger - arguments - vatypevector - vbtypevector - margintypefloat osApproxEquals @@ -6159,6 +6162,33 @@ arguments atypefloat btypefloat + margintypefloat + + + osApproxEquals + + returninteger + arguments + ratyperotation + rbtyperotation + + + osApproxEquals + + returninteger + arguments + ratyperotation + rbtyperotation + margintypefloat + + + osApproxEquals + + returninteger + arguments + 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 @@ -7349,17 +7389,6 @@ osSetProjectionParams - - arguments - primtypekey - projectiontypeinteger - texturetypekey - fovtypefloat - focustypefloat - ambtypefloat - - - osSetProjectionParams arguments projectiontypeinteger @@ -7380,6 +7409,17 @@ ambtypefloat + osSetProjectionParams + + arguments + primtypekey + projectiontypeinteger + texturetypekey + fovtypefloat + focustypefloat + ambtypefloat + + osSetRegionSunSettings arguments @@ -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 @@ -7604,6 +7644,13 @@ osTeleportOwner + + arguments + positiontypevector + lookattypevector + + + osTeleportOwner arguments regionXtypeinteger @@ -7620,13 +7667,6 @@ lookattypevector - osTeleportOwner - - arguments - positiontypevector - lookattypevector - - osTerrainFlush arguments