aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/EstateManager.cs
diff options
context:
space:
mode:
authorlbsa712007-10-22 17:55:49 +0000
committerlbsa712007-10-22 17:55:49 +0000
commitdd770c384c2e63cf8a1e2f522741afb8adfab4c2 (patch)
tree97bc7dacf15388d8b32639219ea51872961de2cd /OpenSim/Region/Environment/EstateManager.cs
parentafter a small misunderstanding with the match group numbers (diff)
downloadopensim-SC_OLD-dd770c384c2e63cf8a1e2f522741afb8adfab4c2.zip
opensim-SC_OLD-dd770c384c2e63cf8a1e2f522741afb8adfab4c2.tar.gz
opensim-SC_OLD-dd770c384c2e63cf8a1e2f522741afb8adfab4c2.tar.bz2
opensim-SC_OLD-dd770c384c2e63cf8a1e2f522741afb8adfab4c2.tar.xz
* Made EstateSetting static since there's only one instance, and we only need to create it once
* Now cacheing RegionInfos indefinitively; we should add a tiomeout to this cache
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/EstateManager.cs92
1 files changed, 46 insertions, 46 deletions
diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs
index 97e25d5..cb403a7 100644
--- a/OpenSim/Region/Environment/EstateManager.cs
+++ b/OpenSim/Region/Environment/EstateManager.cs
@@ -73,20 +73,20 @@ namespace OpenSim.Region.Environment
73 switch (corner) 73 switch (corner)
74 { 74 {
75 case 0: 75 case 0:
76 m_regInfo.estateSettings.terrainStartHeight0 = lowValue; 76 m_regInfo.EstateSettings.terrainStartHeight0 = lowValue;
77 m_regInfo.estateSettings.terrainHeightRange0 = highValue; 77 m_regInfo.EstateSettings.terrainHeightRange0 = highValue;
78 break; 78 break;
79 case 1: 79 case 1:
80 m_regInfo.estateSettings.terrainStartHeight1 = lowValue; 80 m_regInfo.EstateSettings.terrainStartHeight1 = lowValue;
81 m_regInfo.estateSettings.terrainHeightRange1 = highValue; 81 m_regInfo.EstateSettings.terrainHeightRange1 = highValue;
82 break; 82 break;
83 case 2: 83 case 2:
84 m_regInfo.estateSettings.terrainStartHeight2 = lowValue; 84 m_regInfo.EstateSettings.terrainStartHeight2 = lowValue;
85 m_regInfo.estateSettings.terrainHeightRange2 = highValue; 85 m_regInfo.EstateSettings.terrainHeightRange2 = highValue;
86 break; 86 break;
87 case 3: 87 case 3:
88 m_regInfo.estateSettings.terrainStartHeight3 = lowValue; 88 m_regInfo.EstateSettings.terrainStartHeight3 = lowValue;
89 m_regInfo.estateSettings.terrainHeightRange3 = highValue; 89 m_regInfo.EstateSettings.terrainHeightRange3 = highValue;
90 break; 90 break;
91 } 91 }
92 } 92 }
@@ -101,16 +101,16 @@ namespace OpenSim.Region.Environment
101 switch (band) 101 switch (band)
102 { 102 {
103 case 0: 103 case 0:
104 m_regInfo.estateSettings.terrainDetail0 = textureUUID; 104 m_regInfo.EstateSettings.terrainDetail0 = textureUUID;
105 break; 105 break;
106 case 1: 106 case 1:
107 m_regInfo.estateSettings.terrainDetail1 = textureUUID; 107 m_regInfo.EstateSettings.terrainDetail1 = textureUUID;
108 break; 108 break;
109 case 2: 109 case 2:
110 m_regInfo.estateSettings.terrainDetail2 = textureUUID; 110 m_regInfo.EstateSettings.terrainDetail2 = textureUUID;
111 break; 111 break;
112 case 3: 112 case 3:
113 m_regInfo.estateSettings.terrainDetail3 = textureUUID; 113 m_regInfo.EstateSettings.terrainDetail3 = textureUUID;
114 break; 114 break;
115 } 115 }
116 } 116 }
@@ -127,18 +127,18 @@ namespace OpenSim.Region.Environment
127 bool UseFixedSun, float SunHour) 127 bool UseFixedSun, float SunHour)
128 { 128 {
129 // Water Height 129 // Water Height
130 m_regInfo.estateSettings.waterHeight = WaterHeight; 130 m_regInfo.EstateSettings.waterHeight = WaterHeight;
131 m_scene.Terrain.watermap.Fill(WaterHeight); 131 m_scene.Terrain.watermap.Fill(WaterHeight);
132 132
133 // Terraforming limits 133 // Terraforming limits
134 m_regInfo.estateSettings.terrainRaiseLimit = TerrainRaiseLimit; 134 m_regInfo.EstateSettings.terrainRaiseLimit = TerrainRaiseLimit;
135 m_regInfo.estateSettings.terrainLowerLimit = TerrainLowerLimit; 135 m_regInfo.EstateSettings.terrainLowerLimit = TerrainLowerLimit;
136 m_scene.Terrain.maxRaise = TerrainRaiseLimit; 136 m_scene.Terrain.maxRaise = TerrainRaiseLimit;
137 m_scene.Terrain.minLower = TerrainLowerLimit; 137 m_scene.Terrain.minLower = TerrainLowerLimit;
138 138
139 // Time of day / fixed sun 139 // Time of day / fixed sun
140 m_regInfo.estateSettings.useFixedSun = UseFixedSun; 140 m_regInfo.EstateSettings.useFixedSun = UseFixedSun;
141 m_regInfo.estateSettings.sunHour = SunHour; 141 m_regInfo.EstateSettings.sunHour = SunHour;
142 } 142 }
143 143
144 #region Packet Handlers 144 #region Packet Handlers
@@ -187,54 +187,54 @@ namespace OpenSim.Region.Environment
187 } 187 }
188 else 188 else
189 { 189 {
190 m_regInfo.estateSettings.regionFlags = Simulator.RegionFlags.None; 190 m_regInfo.EstateSettings.regionFlags = Simulator.RegionFlags.None;
191 191
192 if (convertParamStringToBool(packet.ParamList[0].Parameter)) 192 if (convertParamStringToBool(packet.ParamList[0].Parameter))
193 { 193 {
194 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | 194 m_regInfo.EstateSettings.regionFlags = m_regInfo.EstateSettings.regionFlags |
195 Simulator.RegionFlags.BlockTerraform; 195 Simulator.RegionFlags.BlockTerraform;
196 } 196 }
197 197
198 if (convertParamStringToBool(packet.ParamList[1].Parameter)) 198 if (convertParamStringToBool(packet.ParamList[1].Parameter))
199 { 199 {
200 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | 200 m_regInfo.EstateSettings.regionFlags = m_regInfo.EstateSettings.regionFlags |
201 Simulator.RegionFlags.NoFly; 201 Simulator.RegionFlags.NoFly;
202 } 202 }
203 203
204 if (convertParamStringToBool(packet.ParamList[2].Parameter)) 204 if (convertParamStringToBool(packet.ParamList[2].Parameter))
205 { 205 {
206 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | 206 m_regInfo.EstateSettings.regionFlags = m_regInfo.EstateSettings.regionFlags |
207 Simulator.RegionFlags.AllowDamage; 207 Simulator.RegionFlags.AllowDamage;
208 } 208 }
209 209
210 if (convertParamStringToBool(packet.ParamList[3].Parameter) == false) 210 if (convertParamStringToBool(packet.ParamList[3].Parameter) == false)
211 { 211 {
212 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | 212 m_regInfo.EstateSettings.regionFlags = m_regInfo.EstateSettings.regionFlags |
213 Simulator.RegionFlags.BlockLandResell; 213 Simulator.RegionFlags.BlockLandResell;
214 } 214 }
215 215
216 216
217 int tempMaxAgents = 217 int tempMaxAgents =
218 Convert.ToInt16(Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[4].Parameter))); 218 Convert.ToInt16(Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[4].Parameter)));
219 m_regInfo.estateSettings.maxAgents = (byte)tempMaxAgents; 219 m_regInfo.EstateSettings.maxAgents = (byte)tempMaxAgents;
220 220
221 float tempObjectBonusFactor = 221 float tempObjectBonusFactor =
222 (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter)); 222 (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter));
223 m_regInfo.estateSettings.objectBonusFactor = tempObjectBonusFactor; 223 m_regInfo.EstateSettings.objectBonusFactor = tempObjectBonusFactor;
224 224
225 int tempMatureLevel = Convert.ToInt16(Helpers.FieldToUTF8String(packet.ParamList[6].Parameter)); 225 int tempMatureLevel = Convert.ToInt16(Helpers.FieldToUTF8String(packet.ParamList[6].Parameter));
226 m_regInfo.estateSettings.simAccess = (Simulator.SimAccess)tempMatureLevel; 226 m_regInfo.EstateSettings.simAccess = (Simulator.SimAccess)tempMatureLevel;
227 227
228 228
229 if (convertParamStringToBool(packet.ParamList[7].Parameter)) 229 if (convertParamStringToBool(packet.ParamList[7].Parameter))
230 { 230 {
231 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | 231 m_regInfo.EstateSettings.regionFlags = m_regInfo.EstateSettings.regionFlags |
232 Simulator.RegionFlags.RestrictPushObject; 232 Simulator.RegionFlags.RestrictPushObject;
233 } 233 }
234 234
235 if (convertParamStringToBool(packet.ParamList[8].Parameter)) 235 if (convertParamStringToBool(packet.ParamList[8].Parameter))
236 { 236 {
237 m_regInfo.estateSettings.regionFlags = m_regInfo.estateSettings.regionFlags | 237 m_regInfo.EstateSettings.regionFlags = m_regInfo.EstateSettings.regionFlags |
238 Simulator.RegionFlags.AllowParcelChanges; 238 Simulator.RegionFlags.AllowParcelChanges;
239 } 239 }
240 240
@@ -309,16 +309,16 @@ namespace OpenSim.Region.Environment
309 switch (Convert.ToInt16(splitField[0])) 309 switch (Convert.ToInt16(splitField[0]))
310 { 310 {
311 case 0: 311 case 0:
312 m_regInfo.estateSettings.terrainBase0 = tempUUID; 312 m_regInfo.EstateSettings.terrainBase0 = tempUUID;
313 break; 313 break;
314 case 1: 314 case 1:
315 m_regInfo.estateSettings.terrainBase1 = tempUUID; 315 m_regInfo.EstateSettings.terrainBase1 = tempUUID;
316 break; 316 break;
317 case 2: 317 case 2:
318 m_regInfo.estateSettings.terrainBase2 = tempUUID; 318 m_regInfo.EstateSettings.terrainBase2 = tempUUID;
319 break; 319 break;
320 case 3: 320 case 3:
321 m_regInfo.estateSettings.terrainBase3 = tempUUID; 321 m_regInfo.EstateSettings.terrainBase3 = tempUUID;
322 break; 322 break;
323 } 323 }
324 } 324 }
@@ -355,22 +355,22 @@ namespace OpenSim.Region.Environment
355 RegionInfoPacket regionInfoPacket = new RegionInfoPacket(); 355 RegionInfoPacket regionInfoPacket = new RegionInfoPacket();
356 regionInfoPacket.AgentData.AgentID = circuitData.AgentID; 356 regionInfoPacket.AgentData.AgentID = circuitData.AgentID;
357 regionInfoPacket.AgentData.SessionID = circuitData.SessionID; 357 regionInfoPacket.AgentData.SessionID = circuitData.SessionID;
358 regionInfoPacket.RegionInfo.BillableFactor = m_regInfo.estateSettings.billableFactor; 358 regionInfoPacket.RegionInfo.BillableFactor = m_regInfo.EstateSettings.billableFactor;
359 regionInfoPacket.RegionInfo.EstateID = m_regInfo.estateSettings.estateID; 359 regionInfoPacket.RegionInfo.EstateID = m_regInfo.EstateSettings.estateID;
360 regionInfoPacket.RegionInfo.MaxAgents = m_regInfo.estateSettings.maxAgents; 360 regionInfoPacket.RegionInfo.MaxAgents = m_regInfo.EstateSettings.maxAgents;
361 regionInfoPacket.RegionInfo.ObjectBonusFactor = m_regInfo.estateSettings.objectBonusFactor; 361 regionInfoPacket.RegionInfo.ObjectBonusFactor = m_regInfo.EstateSettings.objectBonusFactor;
362 regionInfoPacket.RegionInfo.ParentEstateID = m_regInfo.estateSettings.parentEstateID; 362 regionInfoPacket.RegionInfo.ParentEstateID = m_regInfo.EstateSettings.parentEstateID;
363 regionInfoPacket.RegionInfo.PricePerMeter = m_regInfo.estateSettings.pricePerMeter; 363 regionInfoPacket.RegionInfo.PricePerMeter = m_regInfo.EstateSettings.pricePerMeter;
364 regionInfoPacket.RegionInfo.RedirectGridX = m_regInfo.estateSettings.redirectGridX; 364 regionInfoPacket.RegionInfo.RedirectGridX = m_regInfo.EstateSettings.redirectGridX;
365 regionInfoPacket.RegionInfo.RedirectGridY = m_regInfo.estateSettings.redirectGridY; 365 regionInfoPacket.RegionInfo.RedirectGridY = m_regInfo.EstateSettings.redirectGridY;
366 regionInfoPacket.RegionInfo.RegionFlags = (uint)m_regInfo.estateSettings.regionFlags; 366 regionInfoPacket.RegionInfo.RegionFlags = (uint)m_regInfo.EstateSettings.regionFlags;
367 regionInfoPacket.RegionInfo.SimAccess = (byte)m_regInfo.estateSettings.simAccess; 367 regionInfoPacket.RegionInfo.SimAccess = (byte)m_regInfo.EstateSettings.simAccess;
368 regionInfoPacket.RegionInfo.SimName = _enc.GetBytes(m_regInfo.RegionName); 368 regionInfoPacket.RegionInfo.SimName = _enc.GetBytes(m_regInfo.RegionName);
369 regionInfoPacket.RegionInfo.SunHour = m_regInfo.estateSettings.sunHour; 369 regionInfoPacket.RegionInfo.SunHour = m_regInfo.EstateSettings.sunHour;
370 regionInfoPacket.RegionInfo.TerrainLowerLimit = m_regInfo.estateSettings.terrainLowerLimit; 370 regionInfoPacket.RegionInfo.TerrainLowerLimit = m_regInfo.EstateSettings.terrainLowerLimit;
371 regionInfoPacket.RegionInfo.TerrainRaiseLimit = m_regInfo.estateSettings.terrainRaiseLimit; 371 regionInfoPacket.RegionInfo.TerrainRaiseLimit = m_regInfo.EstateSettings.terrainRaiseLimit;
372 regionInfoPacket.RegionInfo.UseEstateSun = !m_regInfo.estateSettings.useFixedSun; 372 regionInfoPacket.RegionInfo.UseEstateSun = !m_regInfo.EstateSettings.useFixedSun;
373 regionInfoPacket.RegionInfo.WaterHeight = m_regInfo.estateSettings.waterHeight; 373 regionInfoPacket.RegionInfo.WaterHeight = m_regInfo.EstateSettings.waterHeight;
374 374
375 remote_client.OutPacket(regionInfoPacket); 375 remote_client.OutPacket(regionInfoPacket);
376 } 376 }