aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Data/MySQL/MySQLDataStore.cs6
-rw-r--r--OpenSim/Framework/RegionInfo.cs18
-rw-r--r--OpenSim/Framework/RegionSettings.cs66
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs8
4 files changed, 64 insertions, 34 deletions
diff --git a/OpenSim/Data/MySQL/MySQLDataStore.cs b/OpenSim/Data/MySQL/MySQLDataStore.cs
index 97aaf6a..f1a252d 100644
--- a/OpenSim/Data/MySQL/MySQLDataStore.cs
+++ b/OpenSim/Data/MySQL/MySQLDataStore.cs
@@ -761,6 +761,8 @@ namespace OpenSim.Data.MySQL
761 { 761 {
762 fillRegionSettingsRow(settingsRow, rs); 762 fillRegionSettingsRow(settingsRow, rs);
763 } 763 }
764
765 Commit();
764 } 766 }
765 } 767 }
766 768
@@ -910,6 +912,7 @@ namespace OpenSim.Data.MySQL
910 m_landDataAdapter.Update(m_landTable); 912 m_landDataAdapter.Update(m_landTable);
911 m_landAccessListDataAdapter.Update(m_landAccessListTable); 913 m_landAccessListDataAdapter.Update(m_landAccessListTable);
912 m_regionBanListDataAdapter.Update(m_regionBanListTable); 914 m_regionBanListDataAdapter.Update(m_regionBanListTable);
915 m_regionSettingsDataAdapter.Update(m_regionSettingsTable);
913 916
914 m_dataSet.AcceptChanges(); 917 m_dataSet.AcceptChanges();
915 } 918 }
@@ -999,6 +1002,9 @@ namespace OpenSim.Data.MySQL
999 createCol(regionsettings, "fixed_sun", typeof (Int32)); 1002 createCol(regionsettings, "fixed_sun", typeof (Int32));
1000 createCol(regionsettings, "sun_position", typeof (Double)); 1003 createCol(regionsettings, "sun_position", typeof (Double));
1001 createCol(regionsettings, "covenant", typeof(String)); 1004 createCol(regionsettings, "covenant", typeof(String));
1005
1006 regionsettings.PrimaryKey = new DataColumn[] {regionsettings.Columns["RegionUUID"]};
1007
1002 return regionsettings; 1008 return regionsettings;
1003 } 1009 }
1004 1010
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index f10f25d..924a566 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -197,6 +197,7 @@ namespace OpenSim.Framework
197 public string DataStore = String.Empty; 197 public string DataStore = String.Empty;
198 public bool isSandbox = false; 198 public bool isSandbox = false;
199 private EstateSettings m_estateSettings; 199 private EstateSettings m_estateSettings;
200 private RegionSettings m_regionSettings;
200 201
201// public bool m_allow_alternate_ports; 202// public bool m_allow_alternate_ports;
202 203
@@ -280,6 +281,21 @@ namespace OpenSim.Framework
280 } 281 }
281 } 282 }
282 283
284 public RegionSettings RegionSettings
285 {
286 get
287 {
288 if(m_regionSettings == null)
289 {
290 m_regionSettings = new RegionSettings();
291 }
292
293 return m_regionSettings;
294 }
295
296 set { m_regionSettings = value; }
297 }
298
283 public void SetEndPoint(string ipaddr, int port) 299 public void SetEndPoint(string ipaddr, int port)
284 { 300 {
285 IPAddress tmpIP = IPAddress.Parse(ipaddr); 301 IPAddress tmpIP = IPAddress.Parse(ipaddr);
@@ -560,4 +576,4 @@ namespace OpenSim.Framework
560 configMember.forceSetConfigurationOption("lastmap_refresh", lastMapRefresh); 576 configMember.forceSetConfigurationOption("lastmap_refresh", lastMapRefresh);
561 } 577 }
562 } 578 }
563} \ No newline at end of file 579}
diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs
index caadfd4..ac853b5 100644
--- a/OpenSim/Framework/RegionSettings.cs
+++ b/OpenSim/Framework/RegionSettings.cs
@@ -33,7 +33,7 @@ namespace OpenSim.Framework
33{ 33{
34 public class RegionSettings 34 public class RegionSettings
35 { 35 {
36 private LLUUID m_RegionUUID; 36 private LLUUID m_RegionUUID = LLUUID.Zero;
37 37
38 public LLUUID RegionUUID 38 public LLUUID RegionUUID
39 { 39 {
@@ -41,7 +41,7 @@ namespace OpenSim.Framework
41 set { m_RegionUUID = value; } 41 set { m_RegionUUID = value; }
42 } 42 }
43 43
44 private bool m_BlockTerraform; 44 private bool m_BlockTerraform = false;
45 45
46 public bool BlockTerraform 46 public bool BlockTerraform
47 { 47 {
@@ -49,7 +49,7 @@ namespace OpenSim.Framework
49 set { m_BlockTerraform = value; } 49 set { m_BlockTerraform = value; }
50 } 50 }
51 51
52 private bool m_BlockFly; 52 private bool m_BlockFly = false;
53 53
54 public bool BlockFly 54 public bool BlockFly
55 { 55 {
@@ -57,7 +57,7 @@ namespace OpenSim.Framework
57 set { m_BlockFly = value; } 57 set { m_BlockFly = value; }
58 } 58 }
59 59
60 private bool m_AllowDamage; 60 private bool m_AllowDamage = false;
61 61
62 public bool AllowDamage 62 public bool AllowDamage
63 { 63 {
@@ -65,7 +65,7 @@ namespace OpenSim.Framework
65 set { m_AllowDamage = value; } 65 set { m_AllowDamage = value; }
66 } 66 }
67 67
68 private bool m_RestrictPushing; 68 private bool m_RestrictPushing = false;
69 69
70 public bool RestrictPushing 70 public bool RestrictPushing
71 { 71 {
@@ -73,7 +73,7 @@ namespace OpenSim.Framework
73 set { m_RestrictPushing = value; } 73 set { m_RestrictPushing = value; }
74 } 74 }
75 75
76 private bool m_AllowLandResell; 76 private bool m_AllowLandResell = true;
77 77
78 public bool AllowLandResell 78 public bool AllowLandResell
79 { 79 {
@@ -81,7 +81,7 @@ namespace OpenSim.Framework
81 set { m_AllowLandResell = value; } 81 set { m_AllowLandResell = value; }
82 } 82 }
83 83
84 private bool m_AllowLandJoinDivide; 84 private bool m_AllowLandJoinDivide = true;
85 85
86 public bool AllowLandJoinDivide 86 public bool AllowLandJoinDivide
87 { 87 {
@@ -89,7 +89,7 @@ namespace OpenSim.Framework
89 set { m_AllowLandJoinDivide = value; } 89 set { m_AllowLandJoinDivide = value; }
90 } 90 }
91 91
92 private bool m_BlockShowInSearch; 92 private bool m_BlockShowInSearch = false;
93 93
94 public bool BlockShowInSearch 94 public bool BlockShowInSearch
95 { 95 {
@@ -97,7 +97,7 @@ namespace OpenSim.Framework
97 set { m_BlockShowInSearch = value; } 97 set { m_BlockShowInSearch = value; }
98 } 98 }
99 99
100 private int m_AgentLimit; 100 private int m_AgentLimit = 40;
101 101
102 public int AgentLimit 102 public int AgentLimit
103 { 103 {
@@ -105,7 +105,7 @@ namespace OpenSim.Framework
105 set { m_AgentLimit = value; } 105 set { m_AgentLimit = value; }
106 } 106 }
107 107
108 private double m_ObjectBonus; 108 private double m_ObjectBonus = 1.0;
109 109
110 public double ObjectBonus 110 public double ObjectBonus
111 { 111 {
@@ -113,7 +113,7 @@ namespace OpenSim.Framework
113 set { m_ObjectBonus = value; } 113 set { m_ObjectBonus = value; }
114 } 114 }
115 115
116 private int m_Maturity; 116 private int m_Maturity = 1;
117 117
118 public int Maturity 118 public int Maturity
119 { 119 {
@@ -121,7 +121,7 @@ namespace OpenSim.Framework
121 set { m_Maturity = value; } 121 set { m_Maturity = value; }
122 } 122 }
123 123
124 private bool m_DisableScripts; 124 private bool m_DisableScripts = false;
125 125
126 public bool DisableScripts 126 public bool DisableScripts
127 { 127 {
@@ -129,7 +129,7 @@ namespace OpenSim.Framework
129 set { m_DisableScripts = value; } 129 set { m_DisableScripts = value; }
130 } 130 }
131 131
132 private bool m_DisableCollisions; 132 private bool m_DisableCollisions = false;
133 133
134 public bool DisableCollisions 134 public bool DisableCollisions
135 { 135 {
@@ -137,7 +137,7 @@ namespace OpenSim.Framework
137 set { m_DisableCollisions = value; } 137 set { m_DisableCollisions = value; }
138 } 138 }
139 139
140 private bool m_DisablePhysics; 140 private bool m_DisablePhysics = false;
141 141
142 public bool DisablePhysics 142 public bool DisablePhysics
143 { 143 {
@@ -145,7 +145,7 @@ namespace OpenSim.Framework
145 set { m_DisablePhysics = value; } 145 set { m_DisablePhysics = value; }
146 } 146 }
147 147
148 private LLUUID m_TerrainTexture1; 148 private LLUUID m_TerrainTexture1 = LLUUID.Zero;
149 149
150 public LLUUID TerrainTexture1 150 public LLUUID TerrainTexture1
151 { 151 {
@@ -153,7 +153,7 @@ namespace OpenSim.Framework
153 set { m_TerrainTexture1 = value; } 153 set { m_TerrainTexture1 = value; }
154 } 154 }
155 155
156 private LLUUID m_TerrainTexture2; 156 private LLUUID m_TerrainTexture2 = LLUUID.Zero;
157 157
158 public LLUUID TerrainTexture2 158 public LLUUID TerrainTexture2
159 { 159 {
@@ -161,7 +161,7 @@ namespace OpenSim.Framework
161 set { m_TerrainTexture2 = value; } 161 set { m_TerrainTexture2 = value; }
162 } 162 }
163 163
164 private LLUUID m_TerrainTexture3; 164 private LLUUID m_TerrainTexture3 = LLUUID.Zero;
165 165
166 public LLUUID TerrainTexture3 166 public LLUUID TerrainTexture3
167 { 167 {
@@ -169,7 +169,7 @@ namespace OpenSim.Framework
169 set { m_TerrainTexture3 = value; } 169 set { m_TerrainTexture3 = value; }
170 } 170 }
171 171
172 private LLUUID m_TerrainTexture4; 172 private LLUUID m_TerrainTexture4 = LLUUID.Zero;
173 173
174 public LLUUID TerrainTexture4 174 public LLUUID TerrainTexture4
175 { 175 {
@@ -177,7 +177,7 @@ namespace OpenSim.Framework
177 set { m_TerrainTexture4 = value; } 177 set { m_TerrainTexture4 = value; }
178 } 178 }
179 179
180 private double m_Elevation1NW; 180 private double m_Elevation1NW = 10;
181 181
182 public double Elevation1NW 182 public double Elevation1NW
183 { 183 {
@@ -185,7 +185,7 @@ namespace OpenSim.Framework
185 set { m_Elevation1NW = value; } 185 set { m_Elevation1NW = value; }
186 } 186 }
187 187
188 private double m_Elevation2NW; 188 private double m_Elevation2NW = 60;
189 189
190 public double Elevation2NW 190 public double Elevation2NW
191 { 191 {
@@ -193,7 +193,7 @@ namespace OpenSim.Framework
193 set { m_Elevation2NW = value; } 193 set { m_Elevation2NW = value; }
194 } 194 }
195 195
196 private double m_Elevation1NE; 196 private double m_Elevation1NE = 10;
197 197
198 public double Elevation1NE 198 public double Elevation1NE
199 { 199 {
@@ -201,7 +201,7 @@ namespace OpenSim.Framework
201 set { m_Elevation1NE = value; } 201 set { m_Elevation1NE = value; }
202 } 202 }
203 203
204 private double m_Elevation2NE; 204 private double m_Elevation2NE = 60;
205 205
206 public double Elevation2NE 206 public double Elevation2NE
207 { 207 {
@@ -209,7 +209,7 @@ namespace OpenSim.Framework
209 set { m_Elevation2NE = value; } 209 set { m_Elevation2NE = value; }
210 } 210 }
211 211
212 private double m_Elevation1SE; 212 private double m_Elevation1SE = 10;
213 213
214 public double Elevation1SE 214 public double Elevation1SE
215 { 215 {
@@ -217,7 +217,7 @@ namespace OpenSim.Framework
217 set { m_Elevation1SE = value; } 217 set { m_Elevation1SE = value; }
218 } 218 }
219 219
220 private double m_Elevation2SE; 220 private double m_Elevation2SE = 60;
221 221
222 public double Elevation2SE 222 public double Elevation2SE
223 { 223 {
@@ -225,7 +225,7 @@ namespace OpenSim.Framework
225 set { m_Elevation2SE = value; } 225 set { m_Elevation2SE = value; }
226 } 226 }
227 227
228 private double m_Elevation1SW; 228 private double m_Elevation1SW = 10;
229 229
230 public double Elevation1SW 230 public double Elevation1SW
231 { 231 {
@@ -233,7 +233,7 @@ namespace OpenSim.Framework
233 set { m_Elevation1SW = value; } 233 set { m_Elevation1SW = value; }
234 } 234 }
235 235
236 private double m_Elevation2SW; 236 private double m_Elevation2SW = 60;
237 237
238 public double Elevation2SW 238 public double Elevation2SW
239 { 239 {
@@ -241,7 +241,7 @@ namespace OpenSim.Framework
241 set { m_Elevation2SW = value; } 241 set { m_Elevation2SW = value; }
242 } 242 }
243 243
244 private double m_WaterHeight; 244 private double m_WaterHeight = 20;
245 245
246 public double WaterHeight 246 public double WaterHeight
247 { 247 {
@@ -249,7 +249,7 @@ namespace OpenSim.Framework
249 set { m_WaterHeight = value; } 249 set { m_WaterHeight = value; }
250 } 250 }
251 251
252 private double m_TerrainRaiseLimit; 252 private double m_TerrainRaiseLimit = 100;
253 253
254 public double TerrainRaiseLimit 254 public double TerrainRaiseLimit
255 { 255 {
@@ -257,7 +257,7 @@ namespace OpenSim.Framework
257 set { m_TerrainRaiseLimit = value; } 257 set { m_TerrainRaiseLimit = value; }
258 } 258 }
259 259
260 private double m_TerrainLowerLimit; 260 private double m_TerrainLowerLimit = 100;
261 261
262 public double TerrainLowerLimit 262 public double TerrainLowerLimit
263 { 263 {
@@ -265,7 +265,7 @@ namespace OpenSim.Framework
265 set { m_TerrainLowerLimit = value; } 265 set { m_TerrainLowerLimit = value; }
266 } 266 }
267 267
268 private bool m_UseEstateSun; 268 private bool m_UseEstateSun = true;
269 269
270 public bool UseEstateSun 270 public bool UseEstateSun
271 { 271 {
@@ -273,7 +273,7 @@ namespace OpenSim.Framework
273 set { m_UseEstateSun = value; } 273 set { m_UseEstateSun = value; }
274 } 274 }
275 275
276 private bool m_FixedSun; 276 private bool m_FixedSun = false;
277 277
278 public bool FixedSun 278 public bool FixedSun
279 { 279 {
@@ -281,7 +281,7 @@ namespace OpenSim.Framework
281 set { m_FixedSun = value; } 281 set { m_FixedSun = value; }
282 } 282 }
283 283
284 private double m_SunPosition; 284 private double m_SunPosition = 0.0;
285 285
286 public double SunPosition 286 public double SunPosition
287 { 287 {
@@ -289,7 +289,7 @@ namespace OpenSim.Framework
289 set { m_SunPosition = value; } 289 set { m_SunPosition = value; }
290 } 290 }
291 291
292 private LLUUID m_Covenant; 292 private LLUUID m_Covenant = LLUUID.Zero;
293 293
294 public LLUUID Covenant 294 public LLUUID Covenant
295 { 295 {
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 291a7ae..12c909b 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -264,6 +264,14 @@ namespace OpenSim.Region.Environment.Scenes
264 m_eventManager = new EventManager(); 264 m_eventManager = new EventManager();
265 m_externalChecks = new SceneExternalChecks(this); 265 m_externalChecks = new SceneExternalChecks(this);
266 266
267 // Load region settings
268 // First try database
269 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
270 // If the database access failed, this will create defaults
271 m_regInfo.RegionSettings.RegionUUID = m_regInfo.RegionID;
272 // Finally, save the defaults
273 m_storageManager.DataStore.StoreRegionSettings(m_regInfo.RegionSettings);
274
267 //Bind Storage Manager functions to some land manager functions for this scene 275 //Bind Storage Manager functions to some land manager functions for this scene
268 EventManager.OnLandObjectAdded += 276 EventManager.OnLandObjectAdded +=
269 new EventManager.LandObjectAdded(m_storageManager.DataStore.StoreLandObject); 277 new EventManager.LandObjectAdded(m_storageManager.DataStore.StoreLandObject);