aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/EstateManager.cs32
1 files changed, 22 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs
index 64b9d78..9700e6c 100644
--- a/OpenSim/Region/Environment/EstateManager.cs
+++ b/OpenSim/Region/Environment/EstateManager.cs
@@ -426,17 +426,29 @@ namespace OpenSim.Region.Environment
426 } 426 }
427 else 427 else
428 { 428 {
429 float WaterHeight = (float) Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[0].Parameter)); 429 try
430 float TerrainRaiseLimit = 430 {
431 (float) Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[1].Parameter)); 431 string tmp;
432 float TerrainLowerLimit = 432 tmp = Helpers.FieldToUTF8String(packet.ParamList[0].Parameter);
433 (float) Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[2].Parameter)); 433 if (!tmp.Contains(".")) tmp += ".00";
434 bool UseFixedSun = convertParamStringToBool(packet.ParamList[4].Parameter); 434 float WaterHeight = (float)Convert.ToDecimal(tmp);
435 float SunHour = (float) Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter)); 435 tmp = Helpers.FieldToUTF8String(packet.ParamList[1].Parameter);
436 436 if (!tmp.Contains(".")) tmp += ".00";
437 setRegionSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseFixedSun, SunHour); 437 float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp);
438 tmp = Helpers.FieldToUTF8String(packet.ParamList[2].Parameter);
439 if (!tmp.Contains(".")) tmp += ".00";
440 float TerrainLowerLimit = (float)Convert.ToDecimal(tmp);
441 bool UseFixedSun = convertParamStringToBool(packet.ParamList[4].Parameter);
442 float SunHour = (float)Convert.ToDecimal(Helpers.FieldToUTF8String(packet.ParamList[5].Parameter));
443
444 setRegionSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseFixedSun, SunHour);
438 445
439 sendRegionInfoPacketToAll(); 446 sendRegionInfoPacketToAll();
447 }
448 catch (Exception ex)
449 {
450 MainLog.Instance.Error("EstateManager: Exception while setting terrain settings: \n" + packet.ToString() + "\n" + ex.ToString());
451 }
440 } 452 }
441 } 453 }
442 454