aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/RestClient/RestClient.cs101
-rw-r--r--OpenSim/Framework/Data.MSSQL/MSSQLDataStore.cs13
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLDataStore.cs78
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteManager.cs134
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteUserData.cs27
-rw-r--r--OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs19
-rw-r--r--OpenSim/Region/Environment/Modules/AssetDownloadModule.cs204
-rw-r--r--OpenSim/Region/Environment/Modules/DynamicTextureModule.cs9
-rw-r--r--OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/FlattenSphere.cs65
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs39
-rw-r--r--OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs35
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs59
-rw-r--r--OpenSim/Region/Physics/Meshing/SimpleHull.cs11
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs41
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs11
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs82
-rw-r--r--OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs13
-rw-r--r--OpenSim/Region/ScriptEngine/LSOEngine/LSO/IL_common_functions.cs27
-rw-r--r--OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_OPCODE_IL_processor.cs9
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs48
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs85
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/NavierStokes.cs13
22 files changed, 572 insertions, 551 deletions
diff --git a/OpenSim/Framework/Communications/RestClient/RestClient.cs b/OpenSim/Framework/Communications/RestClient/RestClient.cs
index 7212e5e..1178fed 100644
--- a/OpenSim/Framework/Communications/RestClient/RestClient.cs
+++ b/OpenSim/Framework/Communications/RestClient/RestClient.cs
@@ -195,15 +195,16 @@ namespace OpenSim.Framework.Communications
195 return s.Substring(s.Length - 1, 1) == "/"; 195 return s.Substring(s.Length - 1, 1) == "/";
196 } 196 }
197 197
198 /// <summary> 198// TODO: unused
199 /// return a slash or blank. A slash will be returned if the string does not contain one 199// /// <summary>
200 /// </summary> 200// /// return a slash or blank. A slash will be returned if the string does not contain one
201 /// <param name="s">stromg to be examined</param> 201// /// </summary>
202 /// <returns>slash '/' if not already present</returns> 202// /// <param name="s">stromg to be examined</param>
203 private string slash(string s) 203// /// <returns>slash '/' if not already present</returns>
204 { 204// private string slash(string s)
205 return isSlashed(s) ? String.Empty : "/"; 205// {
206 } 206// return isSlashed(s) ? String.Empty : "/";
207// }
207 208
208 /// <summary> 209 /// <summary>
209 /// Build a Uri based on the initial Url, path elements and parameters 210 /// Build a Uri based on the initial Url, path elements and parameters
@@ -278,46 +279,48 @@ namespace OpenSim.Framework.Communications
278 } 279 }
279 } 280 }
280 281
281 /// <summary> 282// TODO: unused
282 /// Async method, invoked when the initial response if received from the server 283// /// <summary>
283 /// </summary> 284// /// Async method, invoked when the initial response if received from the server
284 /// <param name="ar"></param> 285// /// </summary>
285 private void ResponseIsReadyDelegate(IAsyncResult ar) 286// /// <param name="ar"></param>
286 { 287// private void ResponseIsReadyDelegate(IAsyncResult ar)
287 try 288// {
288 { 289// try
289 // grab response 290// {
290 WebRequest wr = (WebRequest) ar.AsyncState; 291// // grab response
291 _response = (HttpWebResponse) wr.EndGetResponse(ar); 292// WebRequest wr = (WebRequest) ar.AsyncState;
292 293// _response = (HttpWebResponse) wr.EndGetResponse(ar);
293 // get response stream, and setup async reading 294
294 Stream s = _response.GetResponseStream(); 295// // get response stream, and setup async reading
295 IAsyncResult asynchronousResult = 296// Stream s = _response.GetResponseStream();
296 s.BeginRead(_readbuf, 0, BufferSize, new AsyncCallback(StreamIsReadyDelegate), s); 297// IAsyncResult asynchronousResult =
297 298// s.BeginRead(_readbuf, 0, BufferSize, new AsyncCallback(StreamIsReadyDelegate), s);
298 // TODO! Implement timeout, without killing the server 299
299 // wait until completed, or we timed out 300// // TODO! Implement timeout, without killing the server
300 // ThreadPool.RegisterWaitForSingleObject(asynchronousResult.AsyncWaitHandle, new WaitOrTimerCallback(TimeoutCallback), _request, DefaultTimeout, true); 301// // wait until completed, or we timed out
301 } 302// // ThreadPool.RegisterWaitForSingleObject(asynchronousResult.AsyncWaitHandle, new WaitOrTimerCallback(TimeoutCallback), _request, DefaultTimeout, true);
302 catch (Exception e) 303// }
303 { 304// catch (Exception e)
304 _allDone.Set(); 305// {
305 _asyncException = e; 306// _allDone.Set();
306 } 307// _asyncException = e;
307 } 308// }
308 309// }
309 // Abort the request if the timer fires. 310
310 private static void TimeoutCallback(object state, bool timedOut) 311// TODO: unused
311 { 312// // Abort the request if the timer fires.
312 if (timedOut) 313// private static void TimeoutCallback(object state, bool timedOut)
313 { 314// {
314 HttpWebRequest request = state as HttpWebRequest; 315// if (timedOut)
315 if (request != null) 316// {
316 { 317// HttpWebRequest request = state as HttpWebRequest;
317 request.Abort(); 318// if (request != null)
318 } 319// {
319 } 320// request.Abort();
320 } 321// }
322// }
323// }
321 324
322 #endregion Async communications with server 325 #endregion Async communications with server
323 326
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLDataStore.cs b/OpenSim/Framework/Data.MSSQL/MSSQLDataStore.cs
index c86cfb6..d34abe3 100644
--- a/OpenSim/Framework/Data.MSSQL/MSSQLDataStore.cs
+++ b/OpenSim/Framework/Data.MSSQL/MSSQLDataStore.cs
@@ -1351,12 +1351,13 @@ namespace OpenSim.Framework.Data.MSSQL
1351 return param; 1351 return param;
1352 } 1352 }
1353 1353
1354 private SqlParameter createParamWithValue(string name, Type type, Object o) 1354// TODO: unused
1355 { 1355// private SqlParameter createParamWithValue(string name, Type type, Object o)
1356 SqlParameter param = createSqlParameter(name, type); 1356// {
1357 param.Value = o; 1357// SqlParameter param = createSqlParameter(name, type);
1358 return param; 1358// param.Value = o;
1359 } 1359// return param;
1360// }
1360 1361
1361 private void setupPrimCommands(SqlDataAdapter da, SqlConnection conn) 1362 private void setupPrimCommands(SqlDataAdapter da, SqlConnection conn)
1362 { 1363 {
diff --git a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
index b1ab42fd..eaa7f14 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
@@ -478,38 +478,39 @@ namespace OpenSim.Framework.Data.MySQL
478 return landDataForRegion; 478 return landDataForRegion;
479 } 479 }
480 480
481 private void DisplayDataSet(DataSet ds, string title) 481// TODO: unused
482 { 482// private void DisplayDataSet(DataSet ds, string title)
483 Debug.WriteLine(title); 483// {
484 //--- Loop through the DataTables 484// Debug.WriteLine(title);
485 foreach (DataTable table in ds.Tables) 485// //--- Loop through the DataTables
486 { 486// foreach (DataTable table in ds.Tables)
487 Debug.WriteLine("*** DataTable: " + table.TableName + "***"); 487// {
488 //--- Loop through each DataTable's DataRows 488// Debug.WriteLine("*** DataTable: " + table.TableName + "***");
489 foreach (DataRow row in table.Rows) 489// //--- Loop through each DataTable's DataRows
490 { 490// foreach (DataRow row in table.Rows)
491 //--- Display the original values, if there are any. 491// {
492 if (row.HasVersion(DataRowVersion.Original)) 492// //--- Display the original values, if there are any.
493 { 493// if (row.HasVersion(DataRowVersion.Original))
494 Debug.Write("Original Row Values ===> "); 494// {
495 foreach (DataColumn column in table.Columns) 495// Debug.Write("Original Row Values ===> ");
496 Debug.Write(column.ColumnName + " = " + 496// foreach (DataColumn column in table.Columns)
497 row[column, DataRowVersion.Original] + ", "); 497// Debug.Write(column.ColumnName + " = " +
498 Debug.WriteLine(String.Empty); 498// row[column, DataRowVersion.Original] + ", ");
499 } 499// Debug.WriteLine(String.Empty);
500 //--- Display the current values, if there are any. 500// }
501 if (row.HasVersion(DataRowVersion.Current)) 501// //--- Display the current values, if there are any.
502 { 502// if (row.HasVersion(DataRowVersion.Current))
503 Debug.Write("Current Row Values ====> "); 503// {
504 foreach (DataColumn column in table.Columns) 504// Debug.Write("Current Row Values ====> ");
505 Debug.Write(column.ColumnName + " = " + 505// foreach (DataColumn column in table.Columns)
506 row[column, DataRowVersion.Current] + ", "); 506// Debug.Write(column.ColumnName + " = " +
507 Debug.WriteLine(String.Empty); 507// row[column, DataRowVersion.Current] + ", ");
508 } 508// Debug.WriteLine(String.Empty);
509 Debug.WriteLine(String.Empty); 509// }
510 } 510// Debug.WriteLine(String.Empty);
511 } 511// }
512 } 512// }
513// }
513 514
514 public void Commit() 515 public void Commit()
515 { 516 {
@@ -1397,12 +1398,13 @@ namespace OpenSim.Framework.Data.MySQL
1397 return param; 1398 return param;
1398 } 1399 }
1399 1400
1400 private MySqlParameter createParamWithValue(string name, Type type, Object o) 1401// TODO: unused
1401 { 1402// private MySqlParameter createParamWithValue(string name, Type type, Object o)
1402 MySqlParameter param = createMySqlParameter(name, type); 1403// {
1403 param.Value = o; 1404// MySqlParameter param = createMySqlParameter(name, type);
1404 return param; 1405// param.Value = o;
1405 } 1406// return param;
1407// }
1406 1408
1407 private void SetupPrimCommands(MySqlDataAdapter da, MySqlConnection conn) 1409 private void SetupPrimCommands(MySqlDataAdapter da, MySqlConnection conn)
1408 { 1410 {
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
index 4dd89f5..bec0cd8 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
@@ -92,72 +92,74 @@ namespace OpenSim.Framework.Data.SQLite
92 return (IDbCommand) dbcommand; 92 return (IDbCommand) dbcommand;
93 } 93 }
94 94
95 private bool TestTables(SQLiteConnection conn) 95// TODO: unused
96 { 96// private bool TestTables(SQLiteConnection conn)
97 SQLiteCommand cmd = new SQLiteCommand("SELECT * FROM regions", conn); 97// {
98 SQLiteDataAdapter pDa = new SQLiteDataAdapter(cmd); 98// SQLiteCommand cmd = new SQLiteCommand("SELECT * FROM regions", conn);
99 DataSet tmpDS = new DataSet(); 99// SQLiteDataAdapter pDa = new SQLiteDataAdapter(cmd);
100 try 100// DataSet tmpDS = new DataSet();
101 { 101// try
102 pDa.Fill(tmpDS, "regions"); 102// {
103 } 103// pDa.Fill(tmpDS, "regions");
104 catch (SqliteSyntaxException) 104// }
105 { 105// catch (SqliteSyntaxException)
106 m_log.Info("[DATASTORE]: SQLite Database doesn't exist... creating"); 106// {
107 InitDB(conn); 107// m_log.Info("[DATASTORE]: SQLite Database doesn't exist... creating");
108 } 108// InitDB(conn);
109 return true; 109// }
110 } 110// return true;
111 111// }
112 private DataTable createRegionsTable() 112
113 { 113// TODO: unused
114 DataTable regions = new DataTable("regions"); 114// private DataTable createRegionsTable()
115 115// {
116 createCol(regions, "regionHandle", typeof (ulong)); 116// DataTable regions = new DataTable("regions");
117 createCol(regions, "regionName", typeof (String)); 117
118 createCol(regions, "uuid", typeof (String)); 118// createCol(regions, "regionHandle", typeof (ulong));
119 119// createCol(regions, "regionName", typeof (String));
120 createCol(regions, "regionRecvKey", typeof (String)); 120// createCol(regions, "uuid", typeof (String));
121 createCol(regions, "regionSecret", typeof (String)); 121
122 createCol(regions, "regionSendKey", typeof (String)); 122// createCol(regions, "regionRecvKey", typeof (String));
123 123// createCol(regions, "regionSecret", typeof (String));
124 createCol(regions, "regionDataURI", typeof (String)); 124// createCol(regions, "regionSendKey", typeof (String));
125 createCol(regions, "serverIP", typeof (String)); 125
126 createCol(regions, "serverPort", typeof (String)); 126// createCol(regions, "regionDataURI", typeof (String));
127 createCol(regions, "serverURI", typeof (String)); 127// createCol(regions, "serverIP", typeof (String));
128 128// createCol(regions, "serverPort", typeof (String));
129 129// createCol(regions, "serverURI", typeof (String));
130 createCol(regions, "locX", typeof (uint)); 130
131 createCol(regions, "locY", typeof (uint)); 131
132 createCol(regions, "locZ", typeof (uint)); 132// createCol(regions, "locX", typeof (uint));
133 133// createCol(regions, "locY", typeof (uint));
134 createCol(regions, "eastOverrideHandle", typeof (ulong)); 134// createCol(regions, "locZ", typeof (uint));
135 createCol(regions, "westOverrideHandle", typeof (ulong)); 135
136 createCol(regions, "southOverrideHandle", typeof (ulong)); 136// createCol(regions, "eastOverrideHandle", typeof (ulong));
137 createCol(regions, "northOverrideHandle", typeof (ulong)); 137// createCol(regions, "westOverrideHandle", typeof (ulong));
138 138// createCol(regions, "southOverrideHandle", typeof (ulong));
139 createCol(regions, "regionAssetURI", typeof (String)); 139// createCol(regions, "northOverrideHandle", typeof (ulong));
140 createCol(regions, "regionAssetRecvKey", typeof (String)); 140
141 createCol(regions, "regionAssetSendKey", typeof (String)); 141// createCol(regions, "regionAssetURI", typeof (String));
142 142// createCol(regions, "regionAssetRecvKey", typeof (String));
143 createCol(regions, "regionUserURI", typeof (String)); 143// createCol(regions, "regionAssetSendKey", typeof (String));
144 createCol(regions, "regionUserRecvKey", typeof (String)); 144
145 createCol(regions, "regionUserSendKey", typeof (String)); 145// createCol(regions, "regionUserURI", typeof (String));
146 146// createCol(regions, "regionUserRecvKey", typeof (String));
147 // Add in contraints 147// createCol(regions, "regionUserSendKey", typeof (String));
148 regions.PrimaryKey = new DataColumn[] {regions.Columns["UUID"]}; 148
149 return regions; 149// // Add in contraints
150 } 150// regions.PrimaryKey = new DataColumn[] {regions.Columns["UUID"]};
151 151// return regions;
152 private void InitDB(SQLiteConnection conn) 152// }
153 { 153
154 string createUsers = defineTable(createRegionsTable()); 154// TODO: unused
155 SQLiteCommand pcmd = new SQLiteCommand(createUsers, conn); 155// private void InitDB(SQLiteConnection conn)
156 conn.Open(); 156// {
157 pcmd.ExecuteNonQuery(); 157// string createUsers = defineTable(createRegionsTable());
158 conn.Close(); 158// SQLiteCommand pcmd = new SQLiteCommand(createUsers, conn);
159 } 159// conn.Open();
160 160// pcmd.ExecuteNonQuery();
161// conn.Close();
162// }
161 163
162 /// <summary> 164 /// <summary>
163 /// Reads a region row from a database reader 165 /// Reads a region row from a database reader
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
index d65e8d5..0b2df9d 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
@@ -624,19 +624,20 @@ namespace OpenSim.Framework.Data.SQLite
624 return user; 624 return user;
625 } 625 }
626 626
627 private void fillFriendRow(DataRow row, LLUUID ownerID, LLUUID friendID, uint perms) 627// TODO: unused
628 { 628// private void fillFriendRow(DataRow row, LLUUID ownerID, LLUUID friendID, uint perms)
629 row["ownerID"] = ownerID.UUID.ToString(); 629// {
630 row["friendID"] = friendID.UUID.ToString(); 630// row["ownerID"] = ownerID.UUID.ToString();
631 row["friendPerms"] = perms; 631// row["friendID"] = friendID.UUID.ToString();
632 foreach (DataColumn col in ds.Tables["userfriends"].Columns) 632// row["friendPerms"] = perms;
633 { 633// foreach (DataColumn col in ds.Tables["userfriends"].Columns)
634 if (row[col] == null) 634// {
635 { 635// if (row[col] == null)
636 row[col] = String.Empty; 636// {
637 } 637// row[col] = String.Empty;
638 } 638// }
639 } 639// }
640// }
640 641
641 private void fillUserRow(DataRow row, UserProfileData user) 642 private void fillUserRow(DataRow row, UserProfileData user)
642 { 643 {
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs
index c0cce93..a3d014d 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs
@@ -41,16 +41,17 @@ namespace OpenSim.Grid.ScriptServer
41 m_Connection = Connection; 41 m_Connection = Connection;
42 } 42 }
43 43
44 private void DataReceived(object objectID, object scriptID) 44// TODO: unused:
45 { 45// private void DataReceived(object objectID, object scriptID)
46 // TODO: HOW DO WE RECEIVE DATA? ASYNC? 46// {
47 // ANYHOW WE END UP HERE? 47// // TODO: HOW DO WE RECEIVE DATA? ASYNC?
48// // ANYHOW WE END UP HERE?
48 49
49 // NEW SCRIPT? ASK SCRIPTENGINE TO INITIALIZE IT 50// // NEW SCRIPT? ASK SCRIPTENGINE TO INITIALIZE IT
50 ScriptRez(); 51// ScriptRez();
51 52
52 // EVENT? DELIVER EVENT DIRECTLY TO SCRIPTENGINE 53// // EVENT? DELIVER EVENT DIRECTLY TO SCRIPTENGINE
53 touch_start(); 54// touch_start();
54 } 55// }
55 } 56 }
56} 57}
diff --git a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs
index 07f13ce..d5f1b36 100644
--- a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs
@@ -175,117 +175,119 @@ namespace OpenSim.Region.Environment.Modules
175 } 175 }
176 } 176 }
177 177
178 private void RunAssetQueue() 178// TODO: unused
179 { 179// private void RunAssetQueue()
180 while (true) 180// {
181 { 181// while (true)
182 try 182// {
183 { 183// try
184 ProcessAssetQueue(); 184// {
185 Thread.Sleep(500); 185// ProcessAssetQueue();
186 } 186// Thread.Sleep(500);
187 catch (Exception) 187// }
188 { 188// catch (Exception)
189 // m_log.Error("[ASSET CACHE]: " + e.ToString()); 189// {
190 } 190// // m_log.Error("[ASSET CACHE]: " + e.ToString());
191 } 191// }
192 } 192// }
193// }
193 194
194 /// <summary> 195// TODO: unused
195 /// Process the asset queue which sends packets directly back to the client. 196// /// <summary>
196 /// </summary> 197// /// Process the asset queue which sends packets directly back to the client.
197 private void ProcessAssetQueue() 198// /// </summary>
198 { 199// private void ProcessAssetQueue()
199 //should move the asset downloading to a module, like has been done with texture downloading 200// {
200 if (AssetRequests.Count == 0) 201// //should move the asset downloading to a module, like has been done with texture downloading
201 { 202// if (AssetRequests.Count == 0)
202 //no requests waiting 203// {
203 return; 204// //no requests waiting
204 } 205// return;
205 // if less than 5, do all of them 206// }
206 int num = Math.Min(5, AssetRequests.Count); 207// // if less than 5, do all of them
208// int num = Math.Min(5, AssetRequests.Count);
207 209
208 AssetRequest req; 210// AssetRequest req;
209 for (int i = 0; i < num; i++) 211// for (int i = 0; i < num; i++)
210 { 212// {
211 req = (AssetRequest)AssetRequests[i]; 213// req = (AssetRequest)AssetRequests[i];
212 //Console.WriteLine("sending asset " + req.RequestAssetID); 214// //Console.WriteLine("sending asset " + req.RequestAssetID);
213 TransferInfoPacket Transfer = new TransferInfoPacket(); 215// TransferInfoPacket Transfer = new TransferInfoPacket();
214 Transfer.TransferInfo.ChannelType = 2; 216// Transfer.TransferInfo.ChannelType = 2;
215 Transfer.TransferInfo.Status = 0; 217// Transfer.TransferInfo.Status = 0;
216 Transfer.TransferInfo.TargetType = 0; 218// Transfer.TransferInfo.TargetType = 0;
217 if (req.AssetRequestSource == 2) 219// if (req.AssetRequestSource == 2)
218 { 220// {
219 Transfer.TransferInfo.Params = new byte[20]; 221// Transfer.TransferInfo.Params = new byte[20];
220 Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); 222// Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16);
221 int assType = (int)req.AssetInf.Type; 223// int assType = (int)req.AssetInf.Type;
222 Array.Copy(Helpers.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4); 224// Array.Copy(Helpers.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4);
223 } 225// }
224 else if (req.AssetRequestSource == 3) 226// else if (req.AssetRequestSource == 3)
225 { 227// {
226 Transfer.TransferInfo.Params = req.Params; 228// Transfer.TransferInfo.Params = req.Params;
227 // Transfer.TransferInfo.Params = new byte[100]; 229// // Transfer.TransferInfo.Params = new byte[100];
228 //Array.Copy(req.RequestUser.AgentId.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16); 230// //Array.Copy(req.RequestUser.AgentId.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16);
229 //Array.Copy(req.RequestUser.SessionId.GetBytes(), 0, Transfer.TransferInfo.Params, 16, 16); 231// //Array.Copy(req.RequestUser.SessionId.GetBytes(), 0, Transfer.TransferInfo.Params, 16, 16);
230 } 232// }
231 Transfer.TransferInfo.Size = (int)req.AssetInf.Data.Length; 233// Transfer.TransferInfo.Size = (int)req.AssetInf.Data.Length;
232 Transfer.TransferInfo.TransferID = req.TransferRequestID; 234// Transfer.TransferInfo.TransferID = req.TransferRequestID;
233 req.RequestUser.OutPacket(Transfer, ThrottleOutPacketType.Asset); 235// req.RequestUser.OutPacket(Transfer, ThrottleOutPacketType.Asset);
234 236
235 if (req.NumPackets == 1) 237// if (req.NumPackets == 1)
236 { 238// {
237 TransferPacketPacket TransferPacket = new TransferPacketPacket(); 239// TransferPacketPacket TransferPacket = new TransferPacketPacket();
238 TransferPacket.TransferData.Packet = 0; 240// TransferPacket.TransferData.Packet = 0;
239 TransferPacket.TransferData.ChannelType = 2; 241// TransferPacket.TransferData.ChannelType = 2;
240 TransferPacket.TransferData.TransferID = req.TransferRequestID; 242// TransferPacket.TransferData.TransferID = req.TransferRequestID;
241 TransferPacket.TransferData.Data = req.AssetInf.Data; 243// TransferPacket.TransferData.Data = req.AssetInf.Data;
242 TransferPacket.TransferData.Status = 1; 244// TransferPacket.TransferData.Status = 1;
243 req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset); 245// req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset);
244 } 246// }
245 else 247// else
246 { 248// {
247 int processedLength = 0; 249// int processedLength = 0;
248 // libsecondlife hardcodes 1500 as the maximum data chunk size 250// // libsecondlife hardcodes 1500 as the maximum data chunk size
249 int maxChunkSize = 1250; 251// int maxChunkSize = 1250;
250 int packetNumber = 0; 252// int packetNumber = 0;
251 253
252 while (processedLength < req.AssetInf.Data.Length) 254// while (processedLength < req.AssetInf.Data.Length)
253 { 255// {
254 TransferPacketPacket TransferPacket = new TransferPacketPacket(); 256// TransferPacketPacket TransferPacket = new TransferPacketPacket();
255 TransferPacket.TransferData.Packet = packetNumber; 257// TransferPacket.TransferData.Packet = packetNumber;
256 TransferPacket.TransferData.ChannelType = 2; 258// TransferPacket.TransferData.ChannelType = 2;
257 TransferPacket.TransferData.TransferID = req.TransferRequestID; 259// TransferPacket.TransferData.TransferID = req.TransferRequestID;
258 260
259 int chunkSize = Math.Min(req.AssetInf.Data.Length - processedLength, maxChunkSize); 261// int chunkSize = Math.Min(req.AssetInf.Data.Length - processedLength, maxChunkSize);
260 byte[] chunk = new byte[chunkSize]; 262// byte[] chunk = new byte[chunkSize];
261 Array.Copy(req.AssetInf.Data, processedLength, chunk, 0, chunk.Length); 263// Array.Copy(req.AssetInf.Data, processedLength, chunk, 0, chunk.Length);
262 264
263 TransferPacket.TransferData.Data = chunk; 265// TransferPacket.TransferData.Data = chunk;
264 266
265 // 0 indicates more packets to come, 1 indicates last packet 267// // 0 indicates more packets to come, 1 indicates last packet
266 if (req.AssetInf.Data.Length - processedLength > maxChunkSize) 268// if (req.AssetInf.Data.Length - processedLength > maxChunkSize)
267 { 269// {
268 TransferPacket.TransferData.Status = 0; 270// TransferPacket.TransferData.Status = 0;
269 } 271// }
270 else 272// else
271 { 273// {
272 TransferPacket.TransferData.Status = 1; 274// TransferPacket.TransferData.Status = 1;
273 } 275// }
274 276
275 req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset); 277// req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset);
276 278
277 processedLength += chunkSize; 279// processedLength += chunkSize;
278 packetNumber++; 280// packetNumber++;
279 } 281// }
280 } 282// }
281 } 283// }
282 284
283 //remove requests that have been completed 285// //remove requests that have been completed
284 for (int i = 0; i < num; i++) 286// for (int i = 0; i < num; i++)
285 { 287// {
286 AssetRequests.RemoveAt(0); 288// AssetRequests.RemoveAt(0);
287 } 289// }
288 } 290// }
289 291
290 /// <summary> 292 /// <summary>
291 /// Calculate the number of packets required to send the asset to the client. 293 /// Calculate the number of packets required to send the asset to the client.
diff --git a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
index e16eb92..ee84499 100644
--- a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
+++ b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
@@ -228,10 +228,11 @@ namespace OpenSim.Region.Environment.Modules
228 part.ScheduleFullUpdate(); 228 part.ScheduleFullUpdate();
229 } 229 }
230 230
231 private byte[] BlendTextures(byte[] frontImage, byte[] backImage) 231// TODO: unused
232 { 232// private byte[] BlendTextures(byte[] frontImage, byte[] backImage)
233 return BlendTextures(frontImage, backImage, false, 0); 233// {
234 } 234// return BlendTextures(frontImage, backImage, false, 0);
235// }
235 236
236 private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha) 237 private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha)
237 { 238 {
diff --git a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/FlattenSphere.cs b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/FlattenSphere.cs
index 6cbd390..9bfb981 100644
--- a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/FlattenSphere.cs
+++ b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/FlattenSphere.cs
@@ -37,38 +37,39 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes
37 return z; 37 return z;
38 } 38 }
39 39
40 private double GetBilinearInterpolate(double x, double y, ITerrainChannel map) 40// TODO: unused
41 { 41// private double GetBilinearInterpolate(double x, double y, ITerrainChannel map)
42 int w = map.Width; 42// {
43 int h = map.Height; 43// int w = map.Width;
44 44// int h = map.Height;
45 if (x > w - 2.0) 45
46 x = w - 2.0; 46// if (x > w - 2.0)
47 if (y > h - 2.0) 47// x = w - 2.0;
48 y = h - 2.0; 48// if (y > h - 2.0)
49 if (x < 0.0) 49// y = h - 2.0;
50 x = 0.0; 50// if (x < 0.0)
51 if (y < 0.0) 51// x = 0.0;
52 y = 0.0; 52// if (y < 0.0)
53 53// y = 0.0;
54 int stepSize = 1; 54
55 double h00 = map[(int)x, (int)y]; 55// int stepSize = 1;
56 double h10 = map[(int)x + stepSize, (int)y]; 56// double h00 = map[(int)x, (int)y];
57 double h01 = map[(int)x, (int)y + stepSize]; 57// double h10 = map[(int)x + stepSize, (int)y];
58 double h11 = map[(int)x + stepSize, (int)y + stepSize]; 58// double h01 = map[(int)x, (int)y + stepSize];
59 double h1 = h00; 59// double h11 = map[(int)x + stepSize, (int)y + stepSize];
60 double h2 = h10; 60// double h1 = h00;
61 double h3 = h01; 61// double h2 = h10;
62 double h4 = h11; 62// double h3 = h01;
63 double a00 = h1; 63// double h4 = h11;
64 double a10 = h2 - h1; 64// double a00 = h1;
65 double a01 = h3 - h1; 65// double a10 = h2 - h1;
66 double a11 = h1 - h2 - h3 + h4; 66// double a01 = h3 - h1;
67 double partialx = x - (int)x; 67// double a11 = h1 - h2 - h3 + h4;
68 double partialz = y - (int)y; 68// double partialx = x - (int)x;
69 double hi = a00 + (a10 * partialx) + (a01 * partialz) + (a11 * partialx * partialz); 69// double partialz = y - (int)y;
70 return hi; 70// double hi = a00 + (a10 * partialx) + (a01 * partialz) + (a11 * partialx * partialz);
71 } 71// return hi;
72// }
72 73
73 #region ITerrainPaintableEffect Members 74 #region ITerrainPaintableEffect Members
74 75
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index e8708a1..bba5ae1 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -790,25 +790,26 @@ namespace OpenSim.Region.Environment.Scenes
790 } 790 }
791 791
792 //Updates the time in the viewer. 792 //Updates the time in the viewer.
793 private void UpdateInWorldTime() 793// TODO: unused
794 { 794// private void UpdateInWorldTime()
795 m_timeUpdateCount++; 795// {
796 if (m_timeUpdateCount > 600) 796// m_timeUpdateCount++;
797 { 797// if (m_timeUpdateCount > 600)
798 List<ScenePresence> avatars = GetAvatars(); 798// {
799 foreach (ScenePresence avatar in avatars) 799// List<ScenePresence> avatars = GetAvatars();
800 { 800// foreach (ScenePresence avatar in avatars)
801 avatar.ControllingClient.SendViewerTime(m_timePhase); 801// {
802 } 802// avatar.ControllingClient.SendViewerTime(m_timePhase);
803 803// }
804 m_timeUpdateCount = 0; 804
805 m_timePhase++; 805// m_timeUpdateCount = 0;
806 if (m_timePhase > 94) 806// m_timePhase++;
807 { 807// if (m_timePhase > 94)
808 m_timePhase = 0; 808// {
809 } 809// m_timePhase = 0;
810 } 810// }
811 } 811// }
812// }
812 813
813 private void SendSimStatsPackets(SimStatsPacket pack) 814 private void SendSimStatsPackets(SimStatsPacket pack)
814 { 815 {
diff --git a/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs b/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs
index 529ff6d..00a7df3 100644
--- a/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs
+++ b/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/Examples/ExportRegionToLSL.cs
@@ -72,22 +72,23 @@ namespace OpenSim.Region.ExtensionsScriptModule.CSharp.Examples
72 }*/ 72 }*/
73 } 73 }
74 74
75 private string processPrimitiveToString(SceneObjectPart prim) 75// TODO: unused
76 { 76// private string processPrimitiveToString(SceneObjectPart prim)
77 /*string desc = prim.Description; 77// {
78 string name = prim.Name; 78// /*string desc = prim.Description;
79 LLVector3 pos = prim.Pos; 79// string name = prim.Name;
80 LLQuaternion rot = new LLQuaternion(prim.Rotation.x, prim.Rotation.y, prim.Rotation.z, prim.Rotation.w); 80// LLVector3 pos = prim.Pos;
81 LLVector3 scale = prim.Scale; 81// LLQuaternion rot = new LLQuaternion(prim.Rotation.x, prim.Rotation.y, prim.Rotation.z, prim.Rotation.w);
82 LLVector3 rootPos = prim.WorldPos; 82// LLVector3 scale = prim.Scale;
83 83// LLVector3 rootPos = prim.WorldPos;
84 string setPrimParams = String.Empty; 84
85 85// string setPrimParams = String.Empty;
86 setPrimParams += "[PRIM_SCALE, " + scale.ToString() + ", PRIM_POS, " + rootPos.ToString() + ", PRIM_ROTATION, " + rot.ToString() + "]\n"; 86
87 87// setPrimParams += "[PRIM_SCALE, " + scale.ToString() + ", PRIM_POS, " + rootPos.ToString() + ", PRIM_ROTATION, " + rot.ToString() + "]\n";
88 return setPrimParams; 88
89 */ 89// return setPrimParams;
90 return System.String.Empty; 90// */
91 } 91// return System.String.Empty;
92// }
92 } 93 }
93} 94}
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index 48a1c0e..ce46dae 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -59,35 +59,36 @@ namespace OpenSim.Region.Physics.Meshing
59 // const string baseDir = "rawFiles"; 59 // const string baseDir = "rawFiles";
60 private const string baseDir = null; //"rawFiles"; 60 private const string baseDir = null; //"rawFiles";
61 61
62 private static void IntersectionParameterPD(PhysicsVector p1, PhysicsVector r1, PhysicsVector p2, 62// TODO: unused
63 PhysicsVector r2, ref float lambda, ref float mu) 63// private static void IntersectionParameterPD(PhysicsVector p1, PhysicsVector r1, PhysicsVector p2,
64 { 64// PhysicsVector r2, ref float lambda, ref float mu)
65 // p1, p2, points on the straight 65// {
66 // r1, r2, directional vectors of the straight. Not necessarily of length 1! 66// // p1, p2, points on the straight
67 // note, that l, m can be scaled such, that the range 0..1 is mapped to the area between two points, 67// // r1, r2, directional vectors of the straight. Not necessarily of length 1!
68 // thus allowing to decide whether an intersection is between two points 68// // note, that l, m can be scaled such, that the range 0..1 is mapped to the area between two points,
69 69// // thus allowing to decide whether an intersection is between two points
70 float r1x = r1.X; 70
71 float r1y = r1.Y; 71// float r1x = r1.X;
72 float r2x = r2.X; 72// float r1y = r1.Y;
73 float r2y = r2.Y; 73// float r2x = r2.X;
74 74// float r2y = r2.Y;
75 float denom = r1y*r2x - r1x*r2y; 75
76 76// float denom = r1y*r2x - r1x*r2y;
77 if (denom == 0.0) 77
78 { 78// if (denom == 0.0)
79 lambda = Single.NaN; 79// {
80 mu = Single.NaN; 80// lambda = Single.NaN;
81 return; 81// mu = Single.NaN;
82 } 82// return;
83 83// }
84 float p1x = p1.X; 84
85 float p1y = p1.Y; 85// float p1x = p1.X;
86 float p2x = p2.X; 86// float p1y = p1.Y;
87 float p2y = p2.Y; 87// float p2x = p2.X;
88 lambda = (-p2x*r2y + p1x*r2y + (p2y - p1y)*r2x)/denom; 88// float p2y = p2.Y;
89 mu = (-p2x*r1y + p1x*r1y + (p2y - p1y)*r1x)/denom; 89// lambda = (-p2x*r2y + p1x*r2y + (p2y - p1y)*r2x)/denom;
90 } 90// mu = (-p2x*r1y + p1x*r1y + (p2y - p1y)*r1x)/denom;
91// }
91 92
92 private static List<Triangle> FindInfluencedTriangles(List<Triangle> triangles, Vertex v) 93 private static List<Triangle> FindInfluencedTriangles(List<Triangle> triangles, Vertex v)
93 { 94 {
diff --git a/OpenSim/Region/Physics/Meshing/SimpleHull.cs b/OpenSim/Region/Physics/Meshing/SimpleHull.cs
index 3d3f42c..c518b78 100644
--- a/OpenSim/Region/Physics/Meshing/SimpleHull.cs
+++ b/OpenSim/Region/Physics/Meshing/SimpleHull.cs
@@ -170,11 +170,12 @@ namespace OpenSim.Region.Physics.Meshing
170 return result; 170 return result;
171 } 171 }
172 172
173 private bool InsertVertex(Vertex v, int iAfter) 173// TODO: unused
174 { 174// private bool InsertVertex(Vertex v, int iAfter)
175 vertices.Insert(iAfter + 1, v); 175// {
176 return true; 176// vertices.Insert(iAfter + 1, v);
177 } 177// return true;
178// }
178 179
179 private Vertex getNextVertex(Vertex currentVertex) 180 private Vertex getNextVertex(Vertex currentVertex)
180 { 181 {
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index b870a77..62978fd 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -504,26 +504,27 @@ namespace OpenSim.Region.Physics.OdePlugin
504 { 504 {
505 505
506 } 506 }
507 private void standupStraight() 507
508 { 508// TODO: unused:
509 509// private void standupStraight()
510 // The purpose of this routine here is to quickly stabilize the Body while it's popped up in the air. 510// {
511 // The amotor needs a few seconds to stabilize so without it, the avatar shoots up sky high when you 511// // The purpose of this routine here is to quickly stabilize the Body while it's popped up in the air.
512 // change appearance and when you enter the simulator 512// // The amotor needs a few seconds to stabilize so without it, the avatar shoots up sky high when you
513 // After this routine is done, the amotor stabilizes much quicker 513// // change appearance and when you enter the simulator
514 d.Vector3 feet; 514// // After this routine is done, the amotor stabilizes much quicker
515 d.Vector3 head; 515// d.Vector3 feet;
516 d.BodyGetRelPointPos(Body, 0.0f, 0.0f, -1.0f, out feet); 516// d.Vector3 head;
517 d.BodyGetRelPointPos(Body, 0.0f, 0.0f, 1.0f, out head); 517// d.BodyGetRelPointPos(Body, 0.0f, 0.0f, -1.0f, out feet);
518 float posture = head.Z - feet.Z; 518// d.BodyGetRelPointPos(Body, 0.0f, 0.0f, 1.0f, out head);
519 519// float posture = head.Z - feet.Z;
520 // restoring force proportional to lack of posture: 520
521 float servo = (2.5f - posture) * POSTURE_SERVO; 521// // restoring force proportional to lack of posture:
522 d.BodyAddForceAtRelPos(Body, 0.0f, 0.0f, servo, 0.0f, 0.0f, 1.0f); 522// float servo = (2.5f - posture) * POSTURE_SERVO;
523 d.BodyAddForceAtRelPos(Body, 0.0f, 0.0f, -servo, 0.0f, 0.0f, -1.0f); 523// d.BodyAddForceAtRelPos(Body, 0.0f, 0.0f, servo, 0.0f, 0.0f, 1.0f);
524 //d.Matrix3 bodyrotation = d.BodyGetRotation(Body); 524// d.BodyAddForceAtRelPos(Body, 0.0f, 0.0f, -servo, 0.0f, 0.0f, -1.0f);
525 //m_log.Info("[PHYSICSAV]: Rotation: " + bodyrotation.M00 + " : " + bodyrotation.M01 + " : " + bodyrotation.M02 + " : " + bodyrotation.M10 + " : " + bodyrotation.M11 + " : " + bodyrotation.M12 + " : " + bodyrotation.M20 + " : " + bodyrotation.M21 + " : " + bodyrotation.M22); 525// //d.Matrix3 bodyrotation = d.BodyGetRotation(Body);
526 } 526// //m_log.Info("[PHYSICSAV]: Rotation: " + bodyrotation.M00 + " : " + bodyrotation.M01 + " : " + bodyrotation.M02 + " : " + bodyrotation.M10 + " : " + bodyrotation.M11 + " : " + bodyrotation.M12 + " : " + bodyrotation.M20 + " : " + bodyrotation.M21 + " : " + bodyrotation.M22);
527// }
527 528
528 public override PhysicsVector Force 529 public override PhysicsVector Force
529 { 530 {
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index abac967..8529234 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -981,12 +981,11 @@ namespace OpenSim.Region.Physics.OdePlugin
981 981
982 #endregion 982 #endregion
983 983
984 private float GetTerrainHeightAtXY(float x, float y) 984// TODO: unused
985 { 985// private float GetTerrainHeightAtXY(float x, float y)
986 return (float)_origheightmap[(int)y * Constants.RegionSize + (int)x]; 986// {
987 987// return (float)_origheightmap[(int)y * Constants.RegionSize + (int)x];
988 988// }
989 }
990 989
991 #region Add/Remove Entities 990 #region Add/Remove Entities
992 991
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
index 04de990..09f84d6 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
@@ -141,26 +141,27 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
141 } 141 }
142 142
143 private static int privateThreadCount = 0; 143 private static int privateThreadCount = 0;
144 private Thread StartScriptLoadUnloadThread() 144// TODO: unused
145 { 145// private Thread StartScriptLoadUnloadThread()
146 Thread t = new Thread(ScriptLoadUnloadThreadLoop); 146// {
147 string name = "ScriptLoadUnloadThread:"; 147// Thread t = new Thread(ScriptLoadUnloadThreadLoop);
148 if (PrivateThread) 148// string name = "ScriptLoadUnloadThread:";
149 { 149// if (PrivateThread)
150 name += "Private:" + privateThreadCount; 150// {
151 privateThreadCount++; 151// name += "Private:" + privateThreadCount;
152 } 152// privateThreadCount++;
153 else 153// }
154 { 154// else
155 name += "Shared"; 155// {
156 } 156// name += "Shared";
157 t.Name = name; 157// }
158 t.IsBackground = true; 158// t.Name = name;
159 t.Priority = ThreadPriority.Normal; 159// t.IsBackground = true;
160 t.Start(); 160// t.Priority = ThreadPriority.Normal;
161 OpenSim.Framework.ThreadTracker.Add(t); 161// t.Start();
162 return t; 162// OpenSim.Framework.ThreadTracker.Add(t);
163 } 163// return t;
164// }
164 165
165 ~ScriptManager() 166 ~ScriptManager()
166 { 167 {
@@ -184,26 +185,27 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
184 185
185 #region Load / Unload scripts (Thread loop) 186 #region Load / Unload scripts (Thread loop)
186 187
187 private void ScriptLoadUnloadThreadLoop() 188// TODO: unused
188 { 189// private void ScriptLoadUnloadThreadLoop()
189 try 190// {
190 { 191// try
191 while (true) 192// {
192 { 193// while (true)
193 if (LUQueue.Count == 0) 194// {
194 Thread.Sleep(scriptLoadUnloadThread_IdleSleepms); 195// if (LUQueue.Count == 0)
195 //if (PleaseShutdown) 196// Thread.Sleep(scriptLoadUnloadThread_IdleSleepms);
196 // return; 197// //if (PleaseShutdown)
197 DoScriptLoadUnload(); 198// // return;
198 } 199// DoScriptLoadUnload();
199 } 200// }
200 catch (ThreadAbortException tae) 201// }
201 { 202// catch (ThreadAbortException tae)
202 string a = tae.ToString(); 203// {
203 a = String.Empty; 204// string a = tae.ToString();
204 // Expected 205// a = String.Empty;
205 } 206// // Expected
206 } 207// }
208// }
207 209
208 public void DoScriptLoadUnload() 210 public void DoScriptLoadUnload()
209 { 211 {
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs
index 1187287..7689d69 100644
--- a/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs
+++ b/OpenSim/Region/ScriptEngine/Common/TRPC/TCPClient.cs
@@ -74,12 +74,13 @@ namespace OpenSim.Region.ScriptEngine.Common.TRPC
74 Clients[ID].Disconnect(); 74 Clients[ID].Disconnect();
75 } 75 }
76 76
77 void asyncConnected(IAsyncResult iar) 77// TODO: unused
78 { 78// void asyncConnected(IAsyncResult iar)
79 Socket client = (Socket)iar.AsyncState; 79// {
80 client.EndConnect(iar); 80// Socket client = (Socket)iar.AsyncState;
81 ProcessConnection(client); 81// client.EndConnect(iar);
82 } 82// ProcessConnection(client);
83// }
83 84
84 private int ProcessConnection(Socket client) 85 private int ProcessConnection(Socket client)
85 { 86 {
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/IL_common_functions.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/IL_common_functions.cs
index a36ab1b..60d68f5 100644
--- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/IL_common_functions.cs
+++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/IL_common_functions.cs
@@ -34,18 +34,19 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
34{ 34{
35 internal partial class LSO_Parser 35 internal partial class LSO_Parser
36 { 36 {
37 private static TypeBuilder CreateType(ModuleBuilder modBuilder, string typeName) 37// TODO: unused:
38 { 38// private static TypeBuilder CreateType(ModuleBuilder modBuilder, string typeName)
39 TypeBuilder typeBuilder = modBuilder.DefineType(typeName, 39// {
40 TypeAttributes.Public | 40// TypeBuilder typeBuilder = modBuilder.DefineType(typeName,
41 TypeAttributes.Class | 41// TypeAttributes.Public |
42 TypeAttributes.AutoClass | 42// TypeAttributes.Class |
43 TypeAttributes.AnsiClass | 43// TypeAttributes.AutoClass |
44 TypeAttributes.BeforeFieldInit | 44// TypeAttributes.AnsiClass |
45 TypeAttributes.AutoLayout, 45// TypeAttributes.BeforeFieldInit |
46 typeof (object), 46// TypeAttributes.AutoLayout,
47 new Type[] {typeof (object)}); 47// typeof (object),
48 return typeBuilder; 48// new Type[] {typeof (object)});
49 } 49// return typeBuilder;
50// }
50 } 51 }
51} 52}
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_OPCODE_IL_processor.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_OPCODE_IL_processor.cs
index ff0fe77..34a784c 100644
--- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_OPCODE_IL_processor.cs
+++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_OPCODE_IL_processor.cs
@@ -342,10 +342,11 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
342 return false; 342 return false;
343 } 343 }
344 344
345 private void IL_PopToStack(ILGenerator il) 345// TODO: unused
346 { 346// private void IL_PopToStack(ILGenerator il)
347 IL_PopToStack(il, 1); 347// {
348 } 348// IL_PopToStack(il, 1);
349// }
349 350
350 private void IL_PopToStack(ILGenerator il, int count) 351 private void IL_PopToStack(ILGenerator il, int count)
351 { 352 {
diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
index 308f35b..4ab535b 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
@@ -310,37 +310,33 @@ namespace OpenSim.Region.Terrain
310 } 310 }
311 } 311 }
312 312
313
314 lastEdit = DateTime.Now; 313 lastEdit = DateTime.Now;
315 314
316 return; 315 return;
317 } 316 }
318 317
319 318// TODO: unused
320 319// /// <summary>
321 320// /// Checks to make sure the terrain is within baked values +/- maxRaise/minLower
322 /// <summary> 321// /// </summary>
323 /// Checks to make sure the terrain is within baked values +/- maxRaise/minLower 322// private void SetTerrainWithinBounds()
324 /// </summary> 323// {
325 private void SetTerrainWithinBounds() 324// int x, y;
326 { 325// for (x = 0; x < w; x++)
327 int x, y; 326// {
328 for (x = 0; x < w; x++) 327// for (y = 0; y < h; y++)
329 { 328// {
330 for (y = 0; y < h; y++) 329// if ((heightmap.Get(x, y) > revertmap.Get(x, y) + maxRaise))
331 { 330// {
332 if ((heightmap.Get(x, y) > revertmap.Get(x, y) + maxRaise)) 331// heightmap.map[x, y] = revertmap.Get(x, y) + maxRaise;
333 { 332// }
334 heightmap.map[x, y] = revertmap.Get(x, y) + maxRaise; 333// if ((heightmap.Get(x, y) > revertmap.Get(x, y) - minLower))
335 } 334// {
336 if ((heightmap.Get(x, y) > revertmap.Get(x, y) - minLower)) 335// heightmap.map[x, y] = revertmap.Get(x, y) - minLower;
337 { 336// }
338 heightmap.map[x, y] = revertmap.Get(x, y) - minLower; 337// }
339 } 338// }
340 } 339// }
341 }
342 }
343
344 340
345 /// <summary> 341 /// <summary>
346 /// Converts the heightmap to a 65536 value 1D floating point array 342 /// Converts the heightmap to a 65536 value 1D floating point array
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs
index aa102b8..ba076c2 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs
@@ -70,48 +70,49 @@ namespace libTerrain
70 Blend(flat, temp); 70 Blend(flat, temp);
71 } 71 }
72 72
73 private void FlattenFast(double rx, double ry, double size, double amount) 73// TODO: unused
74 { 74// private void FlattenFast(double rx, double ry, double size, double amount)
75 int x, y; 75// {
76 double avg = 0; 76// int x, y;
77 double div = 0; 77// double avg = 0;
78 78// double div = 0;
79 int minX = Math.Max(0, (int) (rx - (size + 1))); 79
80 int maxX = Math.Min(w, (int) (rx + (size + 1))); 80// int minX = Math.Max(0, (int) (rx - (size + 1)));
81 int minY = Math.Max(0, (int) (ry - (size + 1))); 81// int maxX = Math.Min(w, (int) (rx + (size + 1)));
82 int maxY = Math.Min(h, (int) (ry + (size + 1))); 82// int minY = Math.Max(0, (int) (ry - (size + 1)));
83 83// int maxY = Math.Min(h, (int) (ry + (size + 1)));
84 for (x = minX; x < maxX; x++) 84
85 { 85// for (x = minX; x < maxX; x++)
86 for (y = minY; y < maxY; y++) 86// {
87 { 87// for (y = minY; y < maxY; y++)
88 double z = size; 88// {
89 z *= z; 89// double z = size;
90 z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry)); 90// z *= z;
91 91// z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry));
92 if (z < 0) 92
93 z = 0; 93// if (z < 0)
94 94// z = 0;
95 avg += z*amount; 95
96 div += z; 96// avg += z*amount;
97 } 97// div += z;
98 } 98// }
99 99// }
100 double height = avg/div; 100
101 101// double height = avg/div;
102 for (x = minX; x < maxX; x++) 102
103 { 103// for (x = minX; x < maxX; x++)
104 for (y = minY; y < maxY; y++) 104// {
105 { 105// for (y = minY; y < maxY; y++)
106 double z = size; 106// {
107 z *= z; 107// double z = size;
108 z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry)); 108// z *= z;
109 109// z -= ((x - rx)*(x - rx)) + ((y - ry)*(y - ry));
110 if (z > 0.0) 110
111 Set(x, y, Tools.LinearInterpolate(map[x, y], height, z)); 111// if (z > 0.0)
112 } 112// Set(x, y, Tools.LinearInterpolate(map[x, y], height, z));
113 } 113// }
114 } 114// }
115// }
115 116
116 public void Flatten(Channel mask, double amount) 117 public void Flatten(Channel mask, double amount)
117 { 118 {
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/NavierStokes.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/NavierStokes.cs
index 7840f8b..8f12637 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/NavierStokes.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/NavierStokes.cs
@@ -40,12 +40,13 @@ namespace libTerrain
40 return ((i) + (N + 2)*(j)); 40 return ((i) + (N + 2)*(j));
41 } 41 }
42 42
43 private static void nsSwap(ref double x0, ref double x) 43// TODO: unused
44 { 44// private static void nsSwap(ref double x0, ref double x)
45 double tmp = x0; 45// {
46 x0 = x; 46// double tmp = x0;
47 x = tmp; 47// x0 = x;
48 } 48// x = tmp;
49// }
49 50
50 private static void nsSwap(ref double[] x0, ref double[] x) 51 private static void nsSwap(ref double[] x0, ref double[] x)
51 { 52 {