aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/LandData.cs104
-rw-r--r--OpenSim/Framework/LandUpdateArgs.cs7
-rw-r--r--OpenSim/Framework/RegionInfoForEstateMenuArgs.cs3
-rw-r--r--OpenSim/Framework/RegionSettings.cs198
-rw-r--r--OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs13
5 files changed, 108 insertions, 217 deletions
diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs
index ef07438..4440c94 100644
--- a/OpenSim/Framework/LandData.cs
+++ b/OpenSim/Framework/LandData.cs
@@ -90,6 +90,78 @@ namespace OpenSim.Framework
90 private Vector3 _userLookAt = new Vector3(); 90 private Vector3 _userLookAt = new Vector3();
91 private int _dwell = 0; 91 private int _dwell = 0;
92 private int _otherCleanTime = 0; 92 private int _otherCleanTime = 0;
93 private string _mediaType = "none/none";
94 private string _mediaDescription = "";
95 private int _mediaHeight = 0;
96 private int _mediaWidth = 0;
97 private bool _mediaLoop = false;
98 private bool _obscureMusic = false;
99 private bool _obscureMedia = false;
100
101 /// <summary>
102 /// Whether to obscure parcel media URL
103 /// </summary>
104 [XmlIgnore]
105 public bool ObscureMedia {
106 get {
107 return _obscureMedia;
108 }
109 set {
110 _obscureMedia = value;
111 }
112 }
113
114 /// <summary>
115 /// Whether to obscure parcel music URL
116 /// </summary>
117 [XmlIgnore]
118 public bool ObscureMusic {
119 get {
120 return _obscureMusic;
121 }
122 set {
123 _obscureMusic = value;
124 }
125 }
126
127 /// <summary>
128 /// Whether to loop parcel media
129 /// </summary>
130 [XmlIgnore]
131 public bool MediaLoop {
132 get {
133 return _mediaLoop;
134 }
135 set {
136 _mediaLoop = value;
137 }
138 }
139
140 /// <summary>
141 /// Height of parcel media render
142 /// </summary>
143 [XmlIgnore]
144 public int MediaHeight {
145 get {
146 return _mediaHeight;
147 }
148 set {
149 _mediaHeight = value;
150 }
151 }
152
153 /// <summary>
154 /// Width of parcel media render
155 /// </summary>
156 [XmlIgnore]
157 public int MediaWidth {
158 get {
159 return _mediaWidth;
160 }
161 set {
162 _mediaWidth = value;
163 }
164 }
93 165
94 /// <summary> 166 /// <summary>
95 /// Upper corner of the AABB for the parcel 167 /// Upper corner of the AABB for the parcel
@@ -358,20 +430,6 @@ namespace OpenSim.Framework
358 } 430 }
359 } 431 }
360 432
361 private int[] _mediaSize = new int[2];
362 public int[] MediaSize
363 {
364 get
365 {
366 return _mediaSize;
367 }
368 set
369 {
370 _mediaSize = value;
371 }
372 }
373
374 private string _mediaType = "";
375 public string MediaType 433 public string MediaType
376 { 434 {
377 get 435 get
@@ -586,6 +644,17 @@ namespace OpenSim.Framework
586 } 644 }
587 } 645 }
588 646
647 /// <summary>
648 /// parcel media description
649 /// </summary>
650 public string MediaDescription {
651 get {
652 return _mediaDescription;
653 }
654 set {
655 _mediaDescription = value;
656 }
657 }
589 658
590 public LandData() 659 public LandData()
591 { 660 {
@@ -635,6 +704,13 @@ namespace OpenSim.Framework
635 landData._userLookAt = _userLookAt; 704 landData._userLookAt = _userLookAt;
636 landData._otherCleanTime = _otherCleanTime; 705 landData._otherCleanTime = _otherCleanTime;
637 landData._dwell = _dwell; 706 landData._dwell = _dwell;
707 landData._mediaType = _mediaType;
708 landData._mediaDescription = _mediaDescription;
709 landData._mediaWidth = _mediaWidth;
710 landData._mediaHeight = _mediaHeight;
711 landData._mediaLoop = _mediaLoop;
712 landData._obscureMusic = _obscureMusic;
713 landData._obscureMedia = _obscureMedia;
638 714
639 landData._parcelAccessList.Clear(); 715 landData._parcelAccessList.Clear();
640 foreach (ParcelManager.ParcelAccessEntry entry in _parcelAccessList) 716 foreach (ParcelManager.ParcelAccessEntry entry in _parcelAccessList)
diff --git a/OpenSim/Framework/LandUpdateArgs.cs b/OpenSim/Framework/LandUpdateArgs.cs
index 9760a1d..ed496a1 100644
--- a/OpenSim/Framework/LandUpdateArgs.cs
+++ b/OpenSim/Framework/LandUpdateArgs.cs
@@ -49,5 +49,12 @@ namespace OpenSim.Framework
49 public UUID SnapshotID; 49 public UUID SnapshotID;
50 public Vector3 UserLocation; 50 public Vector3 UserLocation;
51 public Vector3 UserLookAt; 51 public Vector3 UserLookAt;
52 public string MediaType;
53 public string MediaDescription;
54 public int MediaHeight;
55 public int MediaWidth;
56 public bool MediaLoop;
57 public bool ObscureMusic;
58 public bool ObscureMedia;
52 } 59 }
53} 60}
diff --git a/OpenSim/Framework/RegionInfoForEstateMenuArgs.cs b/OpenSim/Framework/RegionInfoForEstateMenuArgs.cs
index fee3126..f274da2 100644
--- a/OpenSim/Framework/RegionInfoForEstateMenuArgs.cs
+++ b/OpenSim/Framework/RegionInfoForEstateMenuArgs.cs
@@ -47,5 +47,6 @@ namespace OpenSim.Framework
47 public bool useEstateSun; 47 public bool useEstateSun;
48 public float waterHeight; 48 public float waterHeight;
49 public string simName; 49 public string simName;
50 public string regionType;
50 } 51 }
51} \ No newline at end of file 52}
diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs
index 8d1212b..673cf20 100644
--- a/OpenSim/Framework/RegionSettings.cs
+++ b/OpenSim/Framework/RegionSettings.cs
@@ -33,8 +33,6 @@ namespace OpenSim.Framework
33{ 33{
34 public class RegionSettings 34 public class RegionSettings
35 { 35 {
36 private ConfigurationMember configMember;
37
38 public delegate void SaveDelegate(RegionSettings rs); 36 public delegate void SaveDelegate(RegionSettings rs);
39 37
40 public event SaveDelegate OnSave; 38 public event SaveDelegate OnSave;
@@ -47,202 +45,6 @@ namespace OpenSim.Framework
47 public static readonly UUID DEFAULT_TERRAIN_TEXTURE_3 = new UUID("179cdabd-398a-9b6b-1391-4dc333ba321f"); 45 public static readonly UUID DEFAULT_TERRAIN_TEXTURE_3 = new UUID("179cdabd-398a-9b6b-1391-4dc333ba321f");
48 public static readonly UUID DEFAULT_TERRAIN_TEXTURE_4 = new UUID("beb169c7-11ea-fff2-efe5-0f24dc881df2"); 46 public static readonly UUID DEFAULT_TERRAIN_TEXTURE_4 = new UUID("beb169c7-11ea-fff2-efe5-0f24dc881df2");
49 47
50 public RegionSettings()
51 {
52 if (configMember == null)
53 {
54 try
55 {
56 configMember = new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS", LoadConfigurationOptions, HandleIncomingConfiguration, true);
57 configMember.performConfigurationRetrieve();
58 }
59 catch (Exception)
60 {
61 }
62 }
63 }
64
65 public void LoadConfigurationOptions()
66 {
67 configMember.addConfigurationOption("region_flags",
68 ConfigurationOption.ConfigurationTypes.TYPE_UINT32,
69 String.Empty, "336723974", true);
70
71 configMember.addConfigurationOption("max_agents",
72 ConfigurationOption.ConfigurationTypes.TYPE_INT32,
73 String.Empty, "40", true);
74
75 configMember.addConfigurationOption("object_bonus_factor",
76 ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
77 String.Empty, "1.0", true);
78
79 configMember.addConfigurationOption("sim_access",
80 ConfigurationOption.ConfigurationTypes.TYPE_INT32,
81 String.Empty, "21", true);
82
83 configMember.addConfigurationOption("terrain_base_0",
84 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
85 String.Empty, DEFAULT_TERRAIN_TEXTURE_1.ToString(), true);
86
87 configMember.addConfigurationOption("terrain_base_1",
88 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
89 String.Empty, DEFAULT_TERRAIN_TEXTURE_2.ToString(), true);
90
91 configMember.addConfigurationOption("terrain_base_2",
92 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
93 String.Empty, DEFAULT_TERRAIN_TEXTURE_3.ToString(), true);
94
95 configMember.addConfigurationOption("terrain_base_3",
96 ConfigurationOption.ConfigurationTypes.TYPE_UUID,
97 String.Empty, DEFAULT_TERRAIN_TEXTURE_4.ToString(), true);
98
99 configMember.addConfigurationOption("terrain_start_height_0",
100 ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
101 String.Empty, "10.0", true);
102
103 configMember.addConfigurationOption("terrain_start_height_1",
104 ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
105 String.Empty, "10.0", true);
106
107 configMember.addConfigurationOption("terrain_start_height_2",
108 ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
109 String.Empty, "10.0", true);
110
111 configMember.addConfigurationOption("terrain_start_height_3",
112 ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
113 String.Empty, "10.0", true);
114
115 configMember.addConfigurationOption("terrain_height_range_0",
116 ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
117 String.Empty, "60.0", true);
118
119 configMember.addConfigurationOption("terrain_height_range_1",
120 ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
121 String.Empty, "60.0", true);
122
123 configMember.addConfigurationOption("terrain_height_range_2",
124 ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
125 String.Empty, "60.0", true);
126
127 configMember.addConfigurationOption("terrain_height_range_3",
128 ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
129 String.Empty, "60.0", true);
130
131 configMember.addConfigurationOption("region_water_height",
132 ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
133 String.Empty, "20.0", true);
134
135 configMember.addConfigurationOption("terrain_raise_limit",
136 ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
137 String.Empty, "100.0", true);
138
139 configMember.addConfigurationOption("terrain_lower_limit",
140 ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
141 String.Empty, "-100.0", true);
142
143 configMember.addConfigurationOption("sun_hour",
144 ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE,
145 String.Empty, "0.0", true);
146 }
147
148 public bool HandleIncomingConfiguration(string key, object value)
149 {
150 switch (key)
151 {
152 case "region_flags":
153 RegionFlags flags = (RegionFlags)(uint)value;
154
155 m_BlockTerraform =
156 (flags & RegionFlags.BlockTerraform) != 0;
157 m_BlockFly =
158 (flags & RegionFlags.NoFly) != 0;
159 m_AllowDamage =
160 (flags & RegionFlags.AllowDamage) != 0;
161 m_RestrictPushing =
162 (flags & RegionFlags.RestrictPushObject) != 0;
163 m_AllowLandResell =
164 (flags & RegionFlags.BlockLandResell) == 0;
165 m_AllowLandJoinDivide =
166 (flags & RegionFlags.AllowParcelChanges) != 0;
167 m_BlockShowInSearch =
168 ((uint)flags & (1 << 29)) != 0;
169 m_DisableScripts =
170 (flags & RegionFlags.SkipScripts) != 0;
171 m_DisableCollisions =
172 (flags & RegionFlags.SkipCollisions) != 0;
173 m_DisablePhysics =
174 (flags & RegionFlags.SkipPhysics) != 0;
175 m_FixedSun =
176 (flags & RegionFlags.SunFixed) != 0;
177 m_Sandbox =
178 (flags & RegionFlags.Sandbox) != 0;
179 break;
180 case "max_agents":
181 m_AgentLimit = (int)value;
182 break;
183 case "object_bonus_factor":
184 m_ObjectBonus = (double)value;
185 break;
186 case "sim_access":
187 int access = (int)value;
188 if (access <= 13)
189 m_Maturity = 0;
190 else
191 m_Maturity = 1;
192 break;
193 case "terrain_base_0":
194 m_TerrainTexture1 = (UUID)value;
195 break;
196 case "terrain_base_1":
197 m_TerrainTexture2 = (UUID)value;
198 break;
199 case "terrain_base_2":
200 m_TerrainTexture3 = (UUID)value;
201 break;
202 case "terrain_base_3":
203 m_TerrainTexture4 = (UUID)value;
204 break;
205 case "terrain_start_height_0":
206 m_Elevation1SW = (double)value;
207 break;
208 case "terrain_start_height_1":
209 m_Elevation1NW = (double)value;
210 break;
211 case "terrain_start_height_2":
212 m_Elevation1SE = (double)value;
213 break;
214 case "terrain_start_height_3":
215 m_Elevation1NE = (double)value;
216 break;
217 case "terrain_height_range_0":
218 m_Elevation2SW = (double)value;
219 break;
220 case "terrain_height_range_1":
221 m_Elevation2NW = (double)value;
222 break;
223 case "terrain_height_range_2":
224 m_Elevation2SE = (double)value;
225 break;
226 case "terrain_height_range_3":
227 m_Elevation2NE = (double)value;
228 break;
229 case "region_water_height":
230 m_WaterHeight = (double)value;
231 break;
232 case "terrain_raise_limit":
233 m_TerrainRaiseLimit = (double)value;
234 break;
235 case "terrain_lower_limit":
236 m_TerrainLowerLimit = (double)value;
237 break;
238 case "sun_hour":
239 m_SunPosition = (double)value;
240 break;
241 }
242
243 return true;
244 }
245
246 public void Save() 48 public void Save()
247 { 49 {
248 if (OnSave != null) 50 if (OnSave != null)
diff --git a/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs b/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs
index 92a6caa..f955df7 100644
--- a/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs
+++ b/OpenSim/Framework/Servers/HttpServer/SynchronousRestFormsRequester.cs
@@ -81,12 +81,17 @@ namespace OpenSim.Framework.Servers.HttpServer
81 } 81 }
82 catch (Exception e) 82 catch (Exception e)
83 { 83 {
84 m_log.DebugFormat("[FORMS]: exception occured on sending request to {0}: {1}", requestUrl, e.Message); 84 m_log.DebugFormat("[FORMS]: exception occured on sending request to {0}: " + e.ToString(), requestUrl);
85 } 85 }
86 finally 86 finally
87 { 87 {
88 if (requestStream != null) 88 // If this is closed, it will be disposed internally,
89 requestStream.Close(); 89 // but the above write is asynchronous and may hit after
90 // we're through here. So the thread handling that will
91 // throw and put us back into the catch above. Isn't
92 // .NET great?
93 //if (requestStream != null)
94 // requestStream.Close();
90 // Let's not close this 95 // Let's not close this
91 //buffer.Close(); 96 //buffer.Close();
92 97
@@ -112,7 +117,7 @@ namespace OpenSim.Framework.Servers.HttpServer
112 } 117 }
113 catch (Exception e) 118 catch (Exception e)
114 { 119 {
115 m_log.DebugFormat("[FORMS]: exception occured on receiving reply {0}", e.Message); 120 m_log.DebugFormat("[FORMS]: exception occured on receiving reply " + e.ToString());
116 } 121 }
117 finally 122 finally
118 { 123 {