precision issues

This commit is contained in:
UbitUmarov
2021-09-16 17:28:03 +01:00
parent 441ab99087
commit 916e981214
2 changed files with 4 additions and 5 deletions

View File

@@ -4997,10 +4997,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
AssetLandmark lm = new AssetLandmark(a);
if(lm != null)
{
float rx = (uint)(lm.RegionHandle >> 32);
float ry = (uint)lm.RegionHandle;
Vector3 region = new Vector3(World.RegionInfo.WorldLocX, World.RegionInfo.WorldLocY, 0);
region = lm.Position + new Vector3(rx, ry, 0) - region;
double rx = (lm.RegionHandle >> 32) - World.RegionInfo.WorldLocX + (double)lm.Position.X;
double ry = lm.RegionHandle - World.RegionInfo.WorldLocY + (double)lm.Position.Y;
LSL_Vector region = new LSL_Vector(rx, ry, lm.Position.Z);
reply = region.ToString();
}
}

View File

@@ -512,7 +512,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
void osSetInertia(LSL_Float mass, vector centerOfMass, vector principalInertiaScaled, rotation rot);
void osSetInertiaAsBox(LSL_Float mass, vector boxSize, vector centerOfMass, rotation rot);
void osSetInertiaAsSphere(LSL_Float mass, LSL_Float radius, vector centerOfMass);
void osSetInertiaAsCylinder(LSL_Float mass, LSL_Float radius, LSL_Float lenght, vector centerOfMass,rotation lslrot);
void osSetInertiaAsCylinder(LSL_Float mass, LSL_Float radius, LSL_Float length, vector centerOfMass,rotation lslrot);
LSL_Integer osTeleportObject(LSL_Key objectUUID, vector targetPos, rotation targetrotation, LSL_Integer flags);
LSL_Integer osGetLinkNumber(LSL_String name);