aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs7
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneManager.cs25
2 files changed, 14 insertions, 18 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 802adcd..ac6a5c1 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -1085,14 +1085,16 @@ namespace OpenSim
1085 1085
1086 /// <summary> 1086 /// <summary>
1087 /// Runs the best matching plugin command 1087 /// Runs the best matching plugin command
1088 ///
1089 /// returns true if a match was found, false otherwise.
1090 /// </summary> 1088 /// </summary>
1089 /// <param name="cmd"></param>
1090 /// <param name="withParams"></param>
1091 /// <returns>true if a match was found, false otherwise</returns>
1091 public bool RunPluginCommands(string cmd, string[] withParams) 1092 public bool RunPluginCommands(string cmd, string[] withParams)
1092 { 1093 {
1093 ConsolePluginCommand bestMatch = null; 1094 ConsolePluginCommand bestMatch = null;
1094 int bestLength = 0; 1095 int bestLength = 0;
1095 String cmdWithParams = cmd + " " + String.Join(" ",withParams); 1096 String cmdWithParams = cmd + " " + String.Join(" ",withParams);
1097
1096 foreach (ConsolePluginCommand cmdinfo in m_PluginCommandInfos) 1098 foreach (ConsolePluginCommand cmdinfo in m_PluginCommandInfos)
1097 { 1099 {
1098 int matchLen = cmdinfo.matchLength(cmdWithParams); 1100 int matchLen = cmdinfo.matchLength(cmdWithParams);
@@ -1102,6 +1104,7 @@ namespace OpenSim
1102 bestLength = matchLen; 1104 bestLength = matchLen;
1103 } 1105 }
1104 } 1106 }
1107
1105 if (bestMatch == null) return false; 1108 if (bestMatch == null) return false;
1106 bestMatch.Run(cmd,withParams);//.Substring(bestLength)); 1109 bestMatch.Run(cmd,withParams);//.Substring(bestLength));
1107 return true; 1110 return true;
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs
index 884bd79..b28eef2 100644
--- a/OpenSim/Region/Environment/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs
@@ -264,13 +264,6 @@ namespace OpenSim.Region.Environment.Scenes
264 CurrentOrFirstScene.Heightmap.LoadFromXmlString(mapData); 264 CurrentOrFirstScene.Heightmap.LoadFromXmlString(mapData);
265 } 265 }
266 266
267 [Obsolete("TODO: Remove this warning by 0.7")]
268 public bool RunTerrainCmdOnCurrentScene(string[] cmdparams, ref string result)
269 {
270 m_log.Warn("DEPRECATED: The terrain engine has been replaced with a new terrain plugin module. Please type 'plugin terrain help' for new commands.");
271 return false;
272 }
273
274 public void SendCommandToPluginModules(string[] cmdparams) 267 public void SendCommandToPluginModules(string[] cmdparams)
275 { 268 {
276 ForEachCurrentScene(delegate(Scene scene) { scene.SendCommandToPlugins(cmdparams); }); 269 ForEachCurrentScene(delegate(Scene scene) { scene.SendCommandToPlugins(cmdparams); });
@@ -377,6 +370,7 @@ namespace OpenSim.Region.Environment.Scenes
377 return true; 370 return true;
378 } 371 }
379 } 372 }
373
380 scene = null; 374 scene = null;
381 return false; 375 return false;
382 } 376 }
@@ -392,6 +386,7 @@ namespace OpenSim.Region.Environment.Scenes
392 return true; 386 return true;
393 } 387 }
394 } 388 }
389
395 scene = null; 390 scene = null;
396 return false; 391 return false;
397 } 392 }
@@ -407,6 +402,7 @@ namespace OpenSim.Region.Environment.Scenes
407 return true; 402 return true;
408 } 403 }
409 } 404 }
405
410 scene = null; 406 scene = null;
411 return false; 407 return false;
412 } 408 }
@@ -602,18 +598,18 @@ namespace OpenSim.Region.Environment.Scenes
602 } 598 }
603 #endregion 599 #endregion
604 600
605 int entries_per_thread = (assetRequestList.Count/threads) + 1; 601 int entries_per_thread = (assetRequestList.Count / threads) + 1;
606 602
607 UUID[] arrAssetRequestList = assetRequestList.ToArray(); 603 UUID[] arrAssetRequestList = assetRequestList.ToArray();
608 604
609 List<UUID[]> arrvalus = new List<UUID[]>(); 605 List<UUID[]> arrvalus = new List<UUID[]>();
610 606
611 //split into separate arrays 607 //split into separate arrays
612 for (int j=0;j<threads;j++) 608 for (int j = 0; j < threads; j++)
613 { 609 {
614 List<UUID> val = new List<UUID>(); 610 List<UUID> val = new List<UUID>();
615 611
616 for (int k=j*entries_per_thread; k < ((j+1)* entries_per_thread);k++) 612 for (int k = j * entries_per_thread; k < ((j + 1) * entries_per_thread); k++)
617 { 613 {
618 if (k < arrAssetRequestList.Length) 614 if (k < arrAssetRequestList.Length)
619 { 615 {
@@ -624,7 +620,7 @@ namespace OpenSim.Region.Environment.Scenes
624 arrvalus.Add(val.ToArray()); 620 arrvalus.Add(val.ToArray());
625 } 621 }
626 622
627 for (int l=0;l<arrvalus.Count;l++) 623 for (int l = 0; l < arrvalus.Count; l++)
628 { 624 {
629 DecodeThreadContents threadworkItem = new DecodeThreadContents(); 625 DecodeThreadContents threadworkItem = new DecodeThreadContents();
630 threadworkItem.sn = m_localScenes[0]; 626 threadworkItem.sn = m_localScenes[0];
@@ -637,16 +633,14 @@ namespace OpenSim.Region.Environment.Scenes
637 threadworkItem.SetThread(decodethread); 633 threadworkItem.SetThread(decodethread);
638 634
639 decodethread.Priority = System.Threading.ThreadPriority.Lowest; 635 decodethread.Priority = System.Threading.ThreadPriority.Lowest;
640 decodethread.Name = "J2kCacheDecodeThread_" + l+1; 636 decodethread.Name = "J2kCacheDecodeThread_" + l + 1;
641 ThreadTracker.Add(decodethread); 637 ThreadTracker.Add(decodethread);
642 decodethread.Start(); 638 decodethread.Start();
643 639
644 } 640 }
645
646
647
648 } 641 }
649 } 642 }
643
650 public class DecodeThreadContents 644 public class DecodeThreadContents
651 { 645 {
652 public Scene sn; 646 public Scene sn;
@@ -671,6 +665,5 @@ namespace OpenSim.Region.Environment.Scenes
671 { 665 {
672 thisthread = thr; 666 thisthread = thr;
673 } 667 }
674
675 } 668 }
676} 669}