From fba442097bf79e1976c2c9ebe9751ca8fbaca6e8 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 15 Apr 2022 17:57:40 +0100 Subject: [PATCH] add some more things to llGetParcelDetails. Thanks Tampa for some initial code. --- .../Shared/Api/Implementation/LSL_Api.cs | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 83fb908cc6..2db08f8a50 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -14345,11 +14345,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param) { - LandData land = World.GetLandData(pos); + ILandObject parcel = World.LandChannel.GetLandObject(pos); + if (parcel == null) + { + return new LSL_List(0); + } + + LandData land = parcel.LandData; if (land == null) { return new LSL_List(0); } + LSL_List ret = new LSL_List(); foreach (object o in param.Data) { @@ -14373,6 +14380,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case "5": ret.Add(new LSL_Key(land.GlobalID.ToString())); break; + case "6": + ret.Add(new LSL_Integer(land.SeeAVs ? 1 : 0)); + break; + case "7": + ret.Add(new LSL_Integer(parcel.GetParcelMaxPrimCount())); + break; + case "8": + ret.Add(new LSL_Integer(parcel.PrimCounts.Total)); + break; + case "9": + ret.Add(new LSL_Vector(land.UserLocation)); + break; + case "10": + ret.Add(new LSL_Vector(land.UserLookAt)); + break; + case "11": + ret.Add(new LSL_Integer(land.LandingType)); + break; + case "12": + ret.Add(new LSL_Integer(land.Flags)); + break; + case "13": + ret.Add(new LSL_Integer(World.LSLScriptDanger(m_host, pos) ? 1 : 0)); + break; case "64": ret.Add(new LSL_Integer(land.Dwell)); break;