diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 8163267..ca240f5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1946,10 +1946,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1946 | else{ | 1946 | else{ |
1947 | LSL_List parcelID = new LSL_List(ScriptBaseClass.PARCEL_DETAILS_ID); | 1947 | LSL_List parcelID = new LSL_List(ScriptBaseClass.PARCEL_DETAILS_ID); |
1948 | Vector3 objectPos = m_host.ParentGroup.RootPart.AbsolutePosition; | 1948 | Vector3 objectPos = m_host.ParentGroup.RootPart.AbsolutePosition; |
1949 | bool sameParcel = | 1949 | string parcelA = llGetParcelDetails(new LSL_Vector(objectPos.X, objectPos.X, objectPos.X), parcelID).Data[0].ToString(); |
1950 | llGetParcelDetails(new LSL_Vector(pos.x, pos.y, pos.z), parcelID).Data[0] == | 1950 | string parcelB = llGetParcelDetails(pos, parcelID).Data[0].ToString(); |
1951 | llGetParcelDetails(pos, parcelID).Data[0] | 1951 | bool sameParcel = parcelA == parcelB; |
1952 | ; | 1952 | int objectPrimCount = m_host.ParentGroup.PrimCount; |
1953 | LSL_Integer destParcelPrimCount = llGetParcelPrimCount(pos, ScriptBaseClass.PARCEL_COUNT_TOTAL, 0); | ||
1954 | LSL_Integer max = llGetParcelMaxPrims(pos, 0); | ||
1953 | if ( | 1955 | if ( |
1954 | llGetStatus((int)PrimFlags.Physics) == 1 || // return FALSE if physical. | 1956 | llGetStatus((int)PrimFlags.Physics) == 1 || // return FALSE if physical. |
1955 | m_host.ParentGroup.IsAttachment || // return FALSE if attachment | 1957 | m_host.ParentGroup.IsAttachment || // return FALSE if attachment |
@@ -1964,7 +1966,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1964 | // this check will only work if pos is within the region bounds. | 1966 | // this check will only work if pos is within the region bounds. |
1965 | ( | 1967 | ( |
1966 | !sameParcel && // if it's moving within the same parcel we do not need to check if the destination parcel will exceed capacity if the object is moved. | 1968 | !sameParcel && // if it's moving within the same parcel we do not need to check if the destination parcel will exceed capacity if the object is moved. |
1967 | (llGetParcelPrimCount(pos, ScriptBaseClass.PARCEL_COUNT_TOTAL, 0) + m_host.ParentGroup.PrimCount) > llGetParcelMaxPrims(pos, 0) | 1969 | (destParcelPrimCount + objectPrimCount) > max |
1968 | ) | 1970 | ) |
1969 | // END RELIANCE ON WORK-AROUND | 1971 | // END RELIANCE ON WORK-AROUND |
1970 | ){ | 1972 | ){ |