aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorHomer Horwitz2008-10-05 19:12:58 +0000
committerHomer Horwitz2008-10-05 19:12:58 +0000
commitb9e603f8d864e97d6933532cade56b449cd666e5 (patch)
tree77cee68f1e6e94ddb913704318dc65babf1e0e96
parentFix a problem with land-search and non-convex parcels. (diff)
downloadopensim-SC_OLD-b9e603f8d864e97d6933532cade56b449cd666e5.zip
opensim-SC_OLD-b9e603f8d864e97d6933532cade56b449cd666e5.tar.gz
opensim-SC_OLD-b9e603f8d864e97d6933532cade56b449cd666e5.tar.bz2
opensim-SC_OLD-b9e603f8d864e97d6933532cade56b449cd666e5.tar.xz
Fixed small coordinate issue: The center is (min+max)/2, not (max-min)/2
-rw-r--r--OpenSim/Region/DataSnapshot/LandSnapshot.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/OpenSim/Region/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/DataSnapshot/LandSnapshot.cs
index 5288c74..18186d1 100644
--- a/OpenSim/Region/DataSnapshot/LandSnapshot.cs
+++ b/OpenSim/Region/DataSnapshot/LandSnapshot.cs
@@ -184,7 +184,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
184 XmlNode tpLocation = nodeFactory.CreateNode(XmlNodeType.Element, "location", ""); 184 XmlNode tpLocation = nodeFactory.CreateNode(XmlNodeType.Element, "location", "");
185 Vector3 loc = parcel.UserLocation; 185 Vector3 loc = parcel.UserLocation;
186 if (loc.Equals(Vector3.Zero)) // This test is moot at this point: the location is wrong by default 186 if (loc.Equals(Vector3.Zero)) // This test is moot at this point: the location is wrong by default
187 loc = new Vector3((parcel.AABBMax.X - parcel.AABBMin.X) / 2, (parcel.AABBMax.Y - parcel.AABBMin.Y) / 2, (parcel.AABBMax.Y - parcel.AABBMin.Y) / 2); 187 loc = new Vector3((parcel.AABBMax.X + parcel.AABBMin.X) / 2, (parcel.AABBMax.Y + parcel.AABBMin.Y) / 2, (parcel.AABBMax.Z + parcel.AABBMin.Z) / 2);
188 tpLocation.InnerText = loc.X.ToString() + "/" + loc.Y.ToString() + "/" + loc.Z.ToString(); 188 tpLocation.InnerText = loc.X.ToString() + "/" + loc.Y.ToString() + "/" + loc.Z.ToString();
189 xmlparcel.AppendChild(tpLocation); 189 xmlparcel.AppendChild(tpLocation);
190 190