diff options
Fixed the crashing when trying to look at the map in grid mode. Although the textures for the regions don't seem to show up, about to look into that.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 50a31c6..1cadf9b 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -151,20 +151,23 @@ namespace OpenSim.Region.Communications.OGS1 | |||
151 | 151 | ||
152 | List<MapBlockData> neighbours = new List<MapBlockData>(); | 152 | List<MapBlockData> neighbours = new List<MapBlockData>(); |
153 | 153 | ||
154 | foreach (Hashtable n in (Hashtable)respData.Values) | 154 | foreach (ArrayList a in respData.Values) |
155 | { | 155 | { |
156 | MapBlockData neighbour = new MapBlockData(); | 156 | foreach (Hashtable n in a) |
157 | { | ||
158 | MapBlockData neighbour = new MapBlockData(); | ||
157 | 159 | ||
158 | neighbour.X = (ushort)n["x"]; | 160 | neighbour.X = Convert.ToUInt16(n["x"]); |
159 | neighbour.Y = (ushort)n["y"]; | 161 | neighbour.Y = Convert.ToUInt16(n["y"]); |
160 | 162 | ||
161 | neighbour.Name = (string)n["name"]; | 163 | neighbour.Name = (string)n["name"]; |
162 | neighbour.Access = (byte)n["access"]; | 164 | neighbour.Access = Convert.ToByte(n["access"]); |
163 | neighbour.RegionFlags = (uint)n["region-flags"]; | 165 | neighbour.RegionFlags = Convert.ToUInt32(n["region-flags"]); |
164 | neighbour.WaterHeight = (byte)n["water-height"]; | 166 | neighbour.WaterHeight = Convert.ToByte(n["water-height"]); |
165 | neighbour.MapImageId = (string)n["map-image-id"]; | 167 | neighbour.MapImageId = (string)n["map-image-id"]; |
166 | 168 | ||
167 | neighbours.Add(neighbour); | 169 | neighbours.Add(neighbour); |
170 | } | ||
168 | } | 171 | } |
169 | 172 | ||
170 | return neighbours; | 173 | return neighbours; |