* minor: remove deprecated and unused terrain method from SceneManager

* other minor tidy up
0.6.3-post-fixes
Justin Clarke Casey 2009-02-04 20:37:20 +00:00
parent a1da605706
commit 577064fb9d
2 changed files with 14 additions and 18 deletions

View File

@ -1085,14 +1085,16 @@ namespace OpenSim
/// <summary> /// <summary>
/// Runs the best matching plugin command /// Runs the best matching plugin command
///
/// returns true if a match was found, false otherwise.
/// </summary> /// </summary>
/// <param name="cmd"></param>
/// <param name="withParams"></param>
/// <returns>true if a match was found, false otherwise</returns>
public bool RunPluginCommands(string cmd, string[] withParams) public bool RunPluginCommands(string cmd, string[] withParams)
{ {
ConsolePluginCommand bestMatch = null; ConsolePluginCommand bestMatch = null;
int bestLength = 0; int bestLength = 0;
String cmdWithParams = cmd + " " + String.Join(" ",withParams); String cmdWithParams = cmd + " " + String.Join(" ",withParams);
foreach (ConsolePluginCommand cmdinfo in m_PluginCommandInfos) foreach (ConsolePluginCommand cmdinfo in m_PluginCommandInfos)
{ {
int matchLen = cmdinfo.matchLength(cmdWithParams); int matchLen = cmdinfo.matchLength(cmdWithParams);
@ -1102,6 +1104,7 @@ namespace OpenSim
bestLength = matchLen; bestLength = matchLen;
} }
} }
if (bestMatch == null) return false; if (bestMatch == null) return false;
bestMatch.Run(cmd,withParams);//.Substring(bestLength)); bestMatch.Run(cmd,withParams);//.Substring(bestLength));
return true; return true;

View File

@ -264,13 +264,6 @@ namespace OpenSim.Region.Environment.Scenes
CurrentOrFirstScene.Heightmap.LoadFromXmlString(mapData); CurrentOrFirstScene.Heightmap.LoadFromXmlString(mapData);
} }
[Obsolete("TODO: Remove this warning by 0.7")]
public bool RunTerrainCmdOnCurrentScene(string[] cmdparams, ref string result)
{
m_log.Warn("DEPRECATED: The terrain engine has been replaced with a new terrain plugin module. Please type 'plugin terrain help' for new commands.");
return false;
}
public void SendCommandToPluginModules(string[] cmdparams) public void SendCommandToPluginModules(string[] cmdparams)
{ {
ForEachCurrentScene(delegate(Scene scene) { scene.SendCommandToPlugins(cmdparams); }); ForEachCurrentScene(delegate(Scene scene) { scene.SendCommandToPlugins(cmdparams); });
@ -377,6 +370,7 @@ namespace OpenSim.Region.Environment.Scenes
return true; return true;
} }
} }
scene = null; scene = null;
return false; return false;
} }
@ -392,6 +386,7 @@ namespace OpenSim.Region.Environment.Scenes
return true; return true;
} }
} }
scene = null; scene = null;
return false; return false;
} }
@ -407,6 +402,7 @@ namespace OpenSim.Region.Environment.Scenes
return true; return true;
} }
} }
scene = null; scene = null;
return false; return false;
} }
@ -602,18 +598,18 @@ namespace OpenSim.Region.Environment.Scenes
} }
#endregion #endregion
int entries_per_thread = (assetRequestList.Count/threads) + 1; int entries_per_thread = (assetRequestList.Count / threads) + 1;
UUID[] arrAssetRequestList = assetRequestList.ToArray(); UUID[] arrAssetRequestList = assetRequestList.ToArray();
List<UUID[]> arrvalus = new List<UUID[]>(); List<UUID[]> arrvalus = new List<UUID[]>();
//split into separate arrays //split into separate arrays
for (int j=0;j<threads;j++) for (int j = 0; j < threads; j++)
{ {
List<UUID> val = new List<UUID>(); List<UUID> val = new List<UUID>();
for (int k=j*entries_per_thread; k < ((j+1)* entries_per_thread);k++) for (int k = j * entries_per_thread; k < ((j + 1) * entries_per_thread); k++)
{ {
if (k < arrAssetRequestList.Length) if (k < arrAssetRequestList.Length)
{ {
@ -624,7 +620,7 @@ namespace OpenSim.Region.Environment.Scenes
arrvalus.Add(val.ToArray()); arrvalus.Add(val.ToArray());
} }
for (int l=0;l<arrvalus.Count;l++) for (int l = 0; l < arrvalus.Count; l++)
{ {
DecodeThreadContents threadworkItem = new DecodeThreadContents(); DecodeThreadContents threadworkItem = new DecodeThreadContents();
threadworkItem.sn = m_localScenes[0]; threadworkItem.sn = m_localScenes[0];
@ -637,16 +633,14 @@ namespace OpenSim.Region.Environment.Scenes
threadworkItem.SetThread(decodethread); threadworkItem.SetThread(decodethread);
decodethread.Priority = System.Threading.ThreadPriority.Lowest; decodethread.Priority = System.Threading.ThreadPriority.Lowest;
decodethread.Name = "J2kCacheDecodeThread_" + l+1; decodethread.Name = "J2kCacheDecodeThread_" + l + 1;
ThreadTracker.Add(decodethread); ThreadTracker.Add(decodethread);
decodethread.Start(); decodethread.Start();
} }
} }
} }
public class DecodeThreadContents public class DecodeThreadContents
{ {
public Scene sn; public Scene sn;
@ -671,6 +665,5 @@ namespace OpenSim.Region.Environment.Scenes
{ {
thisthread = thr; thisthread = thr;
} }
} }
} }