diff options
author | Homer Horwitz | 2008-10-05 19:12:58 +0000 |
---|---|---|
committer | Homer Horwitz | 2008-10-05 19:12:58 +0000 |
commit | b9e603f8d864e97d6933532cade56b449cd666e5 (patch) | |
tree | 77cee68f1e6e94ddb913704318dc65babf1e0e96 /OpenSim/Region/DataSnapshot/LandSnapshot.cs | |
parent | Fix a problem with land-search and non-convex parcels. (diff) | |
download | opensim-SC-b9e603f8d864e97d6933532cade56b449cd666e5.zip opensim-SC-b9e603f8d864e97d6933532cade56b449cd666e5.tar.gz opensim-SC-b9e603f8d864e97d6933532cade56b449cd666e5.tar.bz2 opensim-SC-b9e603f8d864e97d6933532cade56b449cd666e5.tar.xz |
Fixed small coordinate issue: The center is (min+max)/2, not (max-min)/2
Diffstat (limited to 'OpenSim/Region/DataSnapshot/LandSnapshot.cs')
-rw-r--r-- | OpenSim/Region/DataSnapshot/LandSnapshot.cs | 2 |
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 | ||