aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMelanie Thielker2008-07-14 01:27:47 +0000
committerMelanie Thielker2008-07-14 01:27:47 +0000
commite712678689f37f7a58e02547a5dbe6a214680db2 (patch)
treea7f13c72ca14860cfb2099fe0603878e57120d7d /OpenSim/Framework
parentMantis#1728. Thank you kindly, Mikem for a patch that solves: (diff)
downloadopensim-SC_OLD-e712678689f37f7a58e02547a5dbe6a214680db2.zip
opensim-SC_OLD-e712678689f37f7a58e02547a5dbe6a214680db2.tar.gz
opensim-SC_OLD-e712678689f37f7a58e02547a5dbe6a214680db2.tar.bz2
opensim-SC_OLD-e712678689f37f7a58e02547a5dbe6a214680db2.tar.xz
Patch #9147
Patch #4 of the region settings series. Partial functionality of the new storage system. More patches to follow.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/EstateSettings.cs162
-rw-r--r--OpenSim/Framework/RegionSettings.cs2
2 files changed, 1 insertions, 163 deletions
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs
index aa8688b..35ade66 100644
--- a/OpenSim/Framework/EstateSettings.cs
+++ b/OpenSim/Framework/EstateSettings.cs
@@ -53,17 +53,11 @@ namespace OpenSim.Framework
53 private LLUUID m_estateManager8; 53 private LLUUID m_estateManager8;
54 private LLUUID m_estateManager9; 54 private LLUUID m_estateManager9;
55 private string m_estateName; 55 private string m_estateName;
56 private byte m_maxAgents;
57 private float m_objectBonusFactor;
58 56
59 private uint m_parentEstateID; 57 private uint m_parentEstateID;
60 private int m_pricePerMeter; 58 private int m_pricePerMeter;
61 private int m_redirectGridX; 59 private int m_redirectGridX;
62 private int m_redirectGridY; 60 private int m_redirectGridY;
63 private bool m_regionAllowTerraform;
64 private Simulator.RegionFlags m_regionFlags;
65 private float m_regionWaterHeight;
66 private Simulator.SimAccess m_simAccess;
67 private float m_sunHour; 61 private float m_sunHour;
68 private LLVector3 m_sunPosition; 62 private LLVector3 m_sunPosition;
69 private LLUUID m_terrainBase0; 63 private LLUUID m_terrainBase0;
@@ -80,15 +74,11 @@ namespace OpenSim.Framework
80 private float m_terrainHeightRange2; 74 private float m_terrainHeightRange2;
81 private float m_terrainHeightRange3; 75 private float m_terrainHeightRange3;
82 private LLUUID m_terrainImageID; 76 private LLUUID m_terrainImageID;
83 private float m_terrainLowerLimit;
84 private double m_terrainMultiplier; 77 private double m_terrainMultiplier;
85 private float m_terrainRaiseLimit;
86 private float m_terrainStartHeight0; 78 private float m_terrainStartHeight0;
87 private float m_terrainStartHeight1; 79 private float m_terrainStartHeight1;
88 private float m_terrainStartHeight2; 80 private float m_terrainStartHeight2;
89 private float m_terrainStartHeight3; 81 private float m_terrainStartHeight3;
90 private bool m_useFixedSun;
91 private float m_waterHeight;
92 82
93 public EstateSettings() 83 public EstateSettings()
94 { 84 {
@@ -132,26 +122,6 @@ namespace OpenSim.Framework
132 } 122 }
133 } 123 }
134 124
135 public byte maxAgents
136 {
137 get { return m_maxAgents; }
138 set
139 {
140 m_maxAgents = value;
141 configMember.forceSetConfigurationOption("max_agents", m_maxAgents.ToString());
142 }
143 }
144
145 public float objectBonusFactor
146 {
147 get { return m_objectBonusFactor; }
148 set
149 {
150 m_objectBonusFactor = value;
151 configMember.forceSetConfigurationOption("object_bonus_factor", m_objectBonusFactor.ToString());
152 }
153 }
154
155 public int redirectGridX 125 public int redirectGridX
156 { 126 {
157 get { return m_redirectGridX; } 127 get { return m_redirectGridX; }
@@ -172,36 +142,12 @@ namespace OpenSim.Framework
172 } 142 }
173 } 143 }
174 144
175 public Simulator.RegionFlags regionFlags
176 {
177 get { return m_regionFlags; }
178 set
179 {
180 //m_regionFlags = (Simulator.RegionFlags)0x400000;
181 m_regionFlags = value;
182 configMember.forceSetConfigurationOption("region_flags", ((uint) m_regionFlags).ToString());
183 }
184 }
185
186 public Simulator.SimAccess simAccess
187 {
188 get { return m_simAccess; }
189 set
190 {
191 m_simAccess = value;
192 configMember.forceSetConfigurationOption("sim_access", ((byte) m_simAccess).ToString());
193 }
194 }
195
196 public float sunHour 145 public float sunHour
197 { 146 {
198 get { return m_sunHour; } 147 get { return m_sunHour; }
199 set 148 set
200 { 149 {
201 m_sunHour = value; 150 m_sunHour = value;
202
203 if (useFixedSun)
204 configMember.forceSetConfigurationOption("sun_hour", m_sunHour.ToString());
205 } 151 }
206 } 152 }
207 153
@@ -215,36 +161,6 @@ namespace OpenSim.Framework
215 } 161 }
216 } 162 }
217 163
218 public float terrainRaiseLimit
219 {
220 get { return m_terrainRaiseLimit; }
221 set
222 {
223 m_terrainRaiseLimit = value;
224 configMember.forceSetConfigurationOption("terrain_raise_limit", m_terrainRaiseLimit.ToString());
225 }
226 }
227
228 public float terrainLowerLimit
229 {
230 get { return m_terrainLowerLimit; }
231 set
232 {
233 m_terrainLowerLimit = value;
234 configMember.forceSetConfigurationOption("terrain_lower_limit", m_terrainLowerLimit.ToString());
235 }
236 }
237
238 public bool useFixedSun
239 {
240 get { return m_useFixedSun; }
241 set
242 {
243 m_useFixedSun = value;
244 configMember.forceSetConfigurationOption("use_fixed_sun", m_useFixedSun.ToString());
245 }
246 }
247
248 public int pricePerMeter 164 public int pricePerMeter
249 { 165 {
250 get { return m_pricePerMeter; } 166 get { return m_pricePerMeter; }
@@ -256,28 +172,6 @@ namespace OpenSim.Framework
256 } 172 }
257 173
258 174
259 public float regionWaterHeight
260 {
261 get { return m_regionWaterHeight; }
262 set
263 {
264 m_regionWaterHeight = value;
265 configMember.forceSetConfigurationOption("region_water_height", m_regionWaterHeight.ToString());
266 }
267 }
268
269
270 public bool regionAllowTerraform
271 {
272 get { return m_regionAllowTerraform; }
273 set
274 {
275 m_regionAllowTerraform = value;
276 configMember.forceSetConfigurationOption("region_allow_terraform", m_regionAllowTerraform.ToString());
277 }
278 }
279
280
281 // Region Information 175 // Region Information
282 // Low resolution 'base' textures. No longer used. 176 // Low resolution 'base' textures. No longer used.
283 177
@@ -473,16 +367,6 @@ namespace OpenSim.Framework
473 } 367 }
474 } 368 }
475 369
476 public float waterHeight
477 {
478 get { return m_waterHeight; }
479 set
480 {
481 m_waterHeight = value;
482 configMember.forceSetConfigurationOption("water_height", m_waterHeight.ToString());
483 }
484 }
485
486 public LLUUID terrainImageID 370 public LLUUID terrainImageID
487 { 371 {
488 get { return m_terrainImageID; } 372 get { return m_terrainImageID; }
@@ -760,30 +644,16 @@ namespace OpenSim.Framework
760 configMember.addConfigurationOption("max_agents", ConfigurationOption.ConfigurationTypes.TYPE_BYTE, String.Empty, "40", 644 configMember.addConfigurationOption("max_agents", ConfigurationOption.ConfigurationTypes.TYPE_BYTE, String.Empty, "40",
761 true); 645 true);
762 646
763 configMember.addConfigurationOption("object_bonus_factor", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT,
764 String.Empty, "1.0", true);
765 configMember.addConfigurationOption("redirect_grid_x", ConfigurationOption.ConfigurationTypes.TYPE_INT32, String.Empty, 647 configMember.addConfigurationOption("redirect_grid_x", ConfigurationOption.ConfigurationTypes.TYPE_INT32, String.Empty,
766 "0", true); 648 "0", true);
767 configMember.addConfigurationOption("redirect_grid_y", ConfigurationOption.ConfigurationTypes.TYPE_INT32, String.Empty, 649 configMember.addConfigurationOption("redirect_grid_y", ConfigurationOption.ConfigurationTypes.TYPE_INT32, String.Empty,
768 "0", true); 650 "0", true);
769 configMember.addConfigurationOption("region_flags", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, String.Empty,
770 "336723974", true); //Taken from a Linden sim for the moment.
771 configMember.addConfigurationOption("sim_access", ConfigurationOption.ConfigurationTypes.TYPE_BYTE, String.Empty, "21",
772 true);
773 configMember.addConfigurationOption("sun_hour", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, String.Empty, "0", 651 configMember.addConfigurationOption("sun_hour", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, String.Empty, "0",
774 true); 652 true);
775 configMember.addConfigurationOption("terrain_raise_limit", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT,
776 String.Empty, "4.0", true); //4 is the LL default
777 configMember.addConfigurationOption("terrain_lower_limit", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT,
778 String.Empty, "-4.0", true); //-4.0 is the LL default
779 configMember.addConfigurationOption("use_fixed_sun", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, String.Empty, 653 configMember.addConfigurationOption("use_fixed_sun", ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, String.Empty,
780 "false", true); 654 "false", true);
781 configMember.addConfigurationOption("price_per_meter", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, 655 configMember.addConfigurationOption("price_per_meter", ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
782 String.Empty, "1", true); 656 String.Empty, "1", true);
783 configMember.addConfigurationOption("region_water_height",
784 ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, String.Empty, "20", true);
785 configMember.addConfigurationOption("region_allow_terraform",
786 ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN, String.Empty, "true", true);
787 657
788 configMember.addConfigurationOption("terrain_base_0", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, String.Empty, 658 configMember.addConfigurationOption("terrain_base_0", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, String.Empty,
789 "b8d3965a-ad78-bf43-699b-bff8eca6c975", true); 659 "b8d3965a-ad78-bf43-699b-bff8eca6c975", true);
@@ -868,46 +738,18 @@ namespace OpenSim.Framework
868 case "parent_estate_id": 738 case "parent_estate_id":
869 m_parentEstateID = (uint) configuration_result; 739 m_parentEstateID = (uint) configuration_result;
870 break; 740 break;
871 case "max_agents":
872 m_maxAgents = (byte) configuration_result;
873 break;
874
875 case "object_bonus_factor":
876 m_objectBonusFactor = (float) configuration_result;
877 break;
878 case "redirect_grid_x": 741 case "redirect_grid_x":
879 m_redirectGridX = (int) configuration_result; 742 m_redirectGridX = (int) configuration_result;
880 break; 743 break;
881 case "redirect_grid_y": 744 case "redirect_grid_y":
882 m_redirectGridY = (int) configuration_result; 745 m_redirectGridY = (int) configuration_result;
883 break; 746 break;
884 case "region_flags":
885 m_regionFlags = (Simulator.RegionFlags) ((uint) configuration_result);
886 break;
887 case "sim_access":
888 m_simAccess = (Simulator.SimAccess) ((byte) configuration_result);
889 break;
890 case "sun_hour": 747 case "sun_hour":
891 m_sunHour = (float) configuration_result; 748 m_sunHour = (float) configuration_result;
892 break; 749 break;
893 case "terrain_raise_limit":
894 m_terrainRaiseLimit = (float) configuration_result;
895 break;
896 case "terrain_lower_limit":
897 m_terrainLowerLimit = (float) configuration_result;
898 break;
899 case "use_fixed_sun":
900 m_useFixedSun = (bool) configuration_result;
901 break;
902 case "price_per_meter": 750 case "price_per_meter":
903 m_pricePerMeter = Convert.ToInt32(configuration_result); 751 m_pricePerMeter = Convert.ToInt32(configuration_result);
904 break; 752 break;
905 case "region_water_height":
906 m_regionWaterHeight = (float) configuration_result;
907 break;
908 case "region_allow_terraform":
909 m_regionAllowTerraform = (bool) configuration_result;
910 break;
911 753
912 case "terrain_base_0": 754 case "terrain_base_0":
913 m_terrainBase0 = (LLUUID) configuration_result; 755 m_terrainBase0 = (LLUUID) configuration_result;
@@ -970,10 +812,6 @@ namespace OpenSim.Framework
970 case "terrain_multiplier": 812 case "terrain_multiplier":
971 m_terrainMultiplier = Convert.ToDouble(configuration_result); 813 m_terrainMultiplier = Convert.ToDouble(configuration_result);
972 break; 814 break;
973 case "water_height":
974 double tmpVal = (double) configuration_result;
975 m_waterHeight = (float) tmpVal;
976 break;
977 case "terrain_image_id": 815 case "terrain_image_id":
978 m_terrainImageID = (LLUUID) configuration_result; 816 m_terrainImageID = (LLUUID) configuration_result;
979 break; 817 break;
diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs
index 06cf7bf..f525da0 100644
--- a/OpenSim/Framework/RegionSettings.cs
+++ b/OpenSim/Framework/RegionSettings.cs
@@ -458,7 +458,7 @@ namespace OpenSim.Framework
458 set { m_TerrainRaiseLimit = value; } 458 set { m_TerrainRaiseLimit = value; }
459 } 459 }
460 460
461 private double m_TerrainLowerLimit = 100; 461 private double m_TerrainLowerLimit = -100;
462 462
463 public double TerrainLowerLimit 463 public double TerrainLowerLimit
464 { 464 {