diff options
author | Sean Dague | 2008-07-23 15:50:32 +0000 |
---|---|---|
committer | Sean Dague | 2008-07-23 15:50:32 +0000 |
commit | 090159defc731fca252b2b3520364712760f0f4e (patch) | |
tree | 78fe9dde5a9902d67aa6d1690cf575d778d154f2 /OpenSim/Region/DataSnapshot | |
parent | Send Animation data for other avatars to new users joining the region (tested... (diff) | |
download | opensim-SC-090159defc731fca252b2b3520364712760f0f4e.zip opensim-SC-090159defc731fca252b2b3520364712760f0f4e.tar.gz opensim-SC-090159defc731fca252b2b3520364712760f0f4e.tar.bz2 opensim-SC-090159defc731fca252b2b3520364712760f0f4e.tar.xz |
refactored LandData to use properties, and cleaned up the naming on
the properties a bit to be more consistant with other objects (having things
like .Name .Description, etc).
Diffstat (limited to 'OpenSim/Region/DataSnapshot')
-rw-r--r-- | OpenSim/Region/DataSnapshot/LandSnapshot.cs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/OpenSim/Region/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/DataSnapshot/LandSnapshot.cs index efc4a84..930ea8f 100644 --- a/OpenSim/Region/DataSnapshot/LandSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/LandSnapshot.cs | |||
@@ -142,7 +142,7 @@ namespace OpenSim.Region.DataSnapshot.Providers | |||
142 | foreach (LandObject land in landList.Values) | 142 | foreach (LandObject land in landList.Values) |
143 | { | 143 | { |
144 | LandData parcel = land.landData; | 144 | LandData parcel = land.landData; |
145 | if ((parcel.landFlags & (uint)Parcel.ParcelFlags.ShowDirectory) == (uint)Parcel.ParcelFlags.ShowDirectory) | 145 | if ((parcel.Flags & (uint)Parcel.ParcelFlags.ShowDirectory) == (uint)Parcel.ParcelFlags.ShowDirectory) |
146 | { | 146 | { |
147 | 147 | ||
148 | //TODO: make better method of marshalling data from LandData to XmlNode | 148 | //TODO: make better method of marshalling data from LandData to XmlNode |
@@ -152,7 +152,7 @@ namespace OpenSim.Region.DataSnapshot.Providers | |||
152 | XmlAttribute scripts_attr = nodeFactory.CreateAttribute("scripts"); | 152 | XmlAttribute scripts_attr = nodeFactory.CreateAttribute("scripts"); |
153 | scripts_attr.Value = GetScriptsPermissions(parcel); | 153 | scripts_attr.Value = GetScriptsPermissions(parcel); |
154 | XmlAttribute category_attr = nodeFactory.CreateAttribute("category"); | 154 | XmlAttribute category_attr = nodeFactory.CreateAttribute("category"); |
155 | category_attr.Value = parcel.category.ToString(); | 155 | category_attr.Value = parcel.Category.ToString(); |
156 | //XmlAttribute entities_attr = nodeFactory.CreateAttribute("entities"); | 156 | //XmlAttribute entities_attr = nodeFactory.CreateAttribute("entities"); |
157 | //entities_attr.Value = land.primsOverMe.Count.ToString(); | 157 | //entities_attr.Value = land.primsOverMe.Count.ToString(); |
158 | xmlparcel.Attributes.Append(scripts_attr); | 158 | xmlparcel.Attributes.Append(scripts_attr); |
@@ -162,24 +162,24 @@ namespace OpenSim.Region.DataSnapshot.Providers | |||
162 | 162 | ||
163 | //name, description, area, and UUID | 163 | //name, description, area, and UUID |
164 | XmlNode name = nodeFactory.CreateNode(XmlNodeType.Element, "name", ""); | 164 | XmlNode name = nodeFactory.CreateNode(XmlNodeType.Element, "name", ""); |
165 | name.InnerText = parcel.landName; | 165 | name.InnerText = parcel.Name; |
166 | xmlparcel.AppendChild(name); | 166 | xmlparcel.AppendChild(name); |
167 | 167 | ||
168 | XmlNode desc = nodeFactory.CreateNode(XmlNodeType.Element, "description", ""); | 168 | XmlNode desc = nodeFactory.CreateNode(XmlNodeType.Element, "description", ""); |
169 | desc.InnerText = parcel.landDesc; | 169 | desc.InnerText = parcel.Description; |
170 | xmlparcel.AppendChild(desc); | 170 | xmlparcel.AppendChild(desc); |
171 | 171 | ||
172 | XmlNode uuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", ""); | 172 | XmlNode uuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", ""); |
173 | uuid.InnerText = parcel.globalID.ToString(); | 173 | uuid.InnerText = parcel.GlobalID.ToString(); |
174 | xmlparcel.AppendChild(uuid); | 174 | xmlparcel.AppendChild(uuid); |
175 | 175 | ||
176 | XmlNode area = nodeFactory.CreateNode(XmlNodeType.Element, "area", ""); | 176 | XmlNode area = nodeFactory.CreateNode(XmlNodeType.Element, "area", ""); |
177 | area.InnerText = parcel.area.ToString(); | 177 | area.InnerText = parcel.Area.ToString(); |
178 | xmlparcel.AppendChild(area); | 178 | xmlparcel.AppendChild(area); |
179 | 179 | ||
180 | //default location | 180 | //default location |
181 | XmlNode tpLocation = nodeFactory.CreateNode(XmlNodeType.Element, "location", ""); | 181 | XmlNode tpLocation = nodeFactory.CreateNode(XmlNodeType.Element, "location", ""); |
182 | LLVector3 loc = parcel.userLocation; | 182 | LLVector3 loc = parcel.UserLocation; |
183 | if (loc.Equals(LLVector3.Zero)) // This test is mute at this point: the location is wrong by default | 183 | if (loc.Equals(LLVector3.Zero)) // This test is mute at this point: the location is wrong by default |
184 | loc = new LLVector3((parcel.AABBMax.X - parcel.AABBMin.X) / 2, (parcel.AABBMax.Y - parcel.AABBMin.Y) / 2, (parcel.AABBMax.Y - parcel.AABBMin.Y) / 2); | 184 | loc = new LLVector3((parcel.AABBMax.X - parcel.AABBMin.X) / 2, (parcel.AABBMax.Y - parcel.AABBMin.Y) / 2, (parcel.AABBMax.Y - parcel.AABBMin.Y) / 2); |
185 | tpLocation.InnerText = loc.X.ToString() + "/" + loc.Y.ToString() + "/" + loc.Z.ToString(); | 185 | tpLocation.InnerText = loc.X.ToString() + "/" + loc.Y.ToString() + "/" + loc.Z.ToString(); |
@@ -188,19 +188,19 @@ namespace OpenSim.Region.DataSnapshot.Providers | |||
188 | //TODO: figure how to figure out teleport system landData.landingType | 188 | //TODO: figure how to figure out teleport system landData.landingType |
189 | 189 | ||
190 | //land texture snapshot uuid | 190 | //land texture snapshot uuid |
191 | if (parcel.snapshotID != LLUUID.Zero) | 191 | if (parcel.SnapshotID != LLUUID.Zero) |
192 | { | 192 | { |
193 | XmlNode textureuuid = nodeFactory.CreateNode(XmlNodeType.Element, "image", ""); | 193 | XmlNode textureuuid = nodeFactory.CreateNode(XmlNodeType.Element, "image", ""); |
194 | textureuuid.InnerText = parcel.snapshotID.ToString(); | 194 | textureuuid.InnerText = parcel.SnapshotID.ToString(); |
195 | xmlparcel.AppendChild(textureuuid); | 195 | xmlparcel.AppendChild(textureuuid); |
196 | } | 196 | } |
197 | 197 | ||
198 | //attached user and group | 198 | //attached user and group |
199 | if (parcel.groupID != LLUUID.Zero) | 199 | if (parcel.GroupID != LLUUID.Zero) |
200 | { | 200 | { |
201 | XmlNode groupblock = nodeFactory.CreateNode(XmlNodeType.Element, "group", ""); | 201 | XmlNode groupblock = nodeFactory.CreateNode(XmlNodeType.Element, "group", ""); |
202 | XmlNode groupuuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", ""); | 202 | XmlNode groupuuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", ""); |
203 | groupuuid.InnerText = parcel.groupID.ToString(); | 203 | groupuuid.InnerText = parcel.GroupID.ToString(); |
204 | groupblock.AppendChild(groupuuid); | 204 | groupblock.AppendChild(groupuuid); |
205 | 205 | ||
206 | //No name yet, there's no way to get a group name since they don't exist yet. | 206 | //No name yet, there's no way to get a group name since they don't exist yet. |
@@ -209,11 +209,11 @@ namespace OpenSim.Region.DataSnapshot.Providers | |||
209 | xmlparcel.AppendChild(groupblock); | 209 | xmlparcel.AppendChild(groupblock); |
210 | } | 210 | } |
211 | 211 | ||
212 | if (!parcel.isGroupOwned) | 212 | if (!parcel.IsGroupOwned) |
213 | { | 213 | { |
214 | XmlNode userblock = nodeFactory.CreateNode(XmlNodeType.Element, "owner", ""); | 214 | XmlNode userblock = nodeFactory.CreateNode(XmlNodeType.Element, "owner", ""); |
215 | 215 | ||
216 | LLUUID userOwnerUUID = parcel.ownerID; | 216 | LLUUID userOwnerUUID = parcel.OwnerID; |
217 | 217 | ||
218 | XmlNode useruuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", ""); | 218 | XmlNode useruuid = nodeFactory.CreateNode(XmlNodeType.Element, "uuid", ""); |
219 | useruuid.InnerText = userOwnerUUID.ToString(); | 219 | useruuid.InnerText = userOwnerUUID.ToString(); |
@@ -278,7 +278,7 @@ namespace OpenSim.Region.DataSnapshot.Providers | |||
278 | 278 | ||
279 | private string GetScriptsPermissions(LandData parcel) | 279 | private string GetScriptsPermissions(LandData parcel) |
280 | { | 280 | { |
281 | if ((parcel.landFlags & (uint)Parcel.ParcelFlags.AllowOtherScripts) == (uint)Parcel.ParcelFlags.AllowOtherScripts) | 281 | if ((parcel.Flags & (uint)Parcel.ParcelFlags.AllowOtherScripts) == (uint)Parcel.ParcelFlags.AllowOtherScripts) |
282 | return "yes"; | 282 | return "yes"; |
283 | else | 283 | else |
284 | return "no"; | 284 | return "no"; |