diff options
author | Melanie | 2011-11-10 17:35:35 +0000 |
---|---|---|
committer | Melanie | 2011-11-10 17:35:35 +0000 |
commit | a1426739a214d9cd04169bbb7a8855fdfd2ef588 (patch) | |
tree | 061416a45c8cdceb25273f9f79f078d2ba1ea8e5 /OpenSim | |
parent | Fix the ability to move the seated avatar via LSL (diff) | |
parent | Add GuduleLapointe to list of contributors (diff) | |
download | opensim-SC_OLD-a1426739a214d9cd04169bbb7a8855fdfd2ef588.zip opensim-SC_OLD-a1426739a214d9cd04169bbb7a8855fdfd2ef588.tar.gz opensim-SC_OLD-a1426739a214d9cd04169bbb7a8855fdfd2ef588.tar.bz2 opensim-SC_OLD-a1426739a214d9cd04169bbb7a8855fdfd2ef588.tar.xz |
Merge branch 'master' into bigmerge
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSim.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | 4 | ||||
-rw-r--r-- | OpenSim/Tools/pCampBot/Bot.cs | 37 | ||||
-rw-r--r-- | OpenSim/Tools/pCampBot/BotManager.cs | 16 |
6 files changed, 44 insertions, 34 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs index d9965b6..2206feb 100644 --- a/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs +++ b/OpenSim/Framework/Servers/HttpServer/PollServiceRequestManager.cs | |||
@@ -44,7 +44,6 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
44 | private uint m_WorkerThreadCount = 0; | 44 | private uint m_WorkerThreadCount = 0; |
45 | private Thread[] m_workerThreads; | 45 | private Thread[] m_workerThreads; |
46 | private PollServiceWorkerThread[] m_PollServiceWorkerThreads; | 46 | private PollServiceWorkerThread[] m_PollServiceWorkerThreads; |
47 | private Thread m_watcherThread; | ||
48 | private bool m_running = true; | 47 | private bool m_running = true; |
49 | 48 | ||
50 | public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout) | 49 | public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout) |
@@ -69,13 +68,12 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
69 | int.MaxValue); | 68 | int.MaxValue); |
70 | } | 69 | } |
71 | 70 | ||
72 | m_watcherThread | 71 | Watchdog.StartThread( |
73 | = Watchdog.StartThread( | 72 | this.ThreadStart, |
74 | this.ThreadStart, | 73 | "PollServiceWatcherThread", |
75 | "PollServiceWatcherThread", | 74 | ThreadPriority.Normal, |
76 | ThreadPriority.Normal, | 75 | false, |
77 | false, | 76 | 1000 * 60 * 10); |
78 | 1000 * 60 * 10); | ||
79 | } | 77 | } |
80 | 78 | ||
81 | internal void ReQueueEvent(PollServiceHttpRequest req) | 79 | internal void ReQueueEvent(PollServiceHttpRequest req) |
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index ae4aad3..beedf51 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -56,6 +56,7 @@ namespace OpenSim | |||
56 | protected bool m_gui = false; | 56 | protected bool m_gui = false; |
57 | protected string m_consoleType = "local"; | 57 | protected string m_consoleType = "local"; |
58 | protected uint m_consolePort = 0; | 58 | protected uint m_consolePort = 0; |
59 | protected string m_custom_prompt; | ||
59 | 60 | ||
60 | private string m_timedScript = "disabled"; | 61 | private string m_timedScript = "disabled"; |
61 | private Timer m_scriptTimer; | 62 | private Timer m_scriptTimer; |
@@ -108,6 +109,7 @@ namespace OpenSim | |||
108 | Util.FireAndForgetMethod = asyncCallMethod; | 109 | Util.FireAndForgetMethod = asyncCallMethod; |
109 | 110 | ||
110 | stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 15); | 111 | stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 15); |
112 | m_custom_prompt = startupConfig.GetString("custom_prompt", "Region"); | ||
111 | } | 113 | } |
112 | 114 | ||
113 | if (Util.FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool) | 115 | if (Util.FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool) |
@@ -828,10 +830,9 @@ namespace OpenSim | |||
828 | { | 830 | { |
829 | MainConsole.Instance.Output("Usage: change region <region name>"); | 831 | MainConsole.Instance.Output("Usage: change region <region name>"); |
830 | } | 832 | } |
831 | |||
832 | string regionName = (m_sceneManager.CurrentScene == null ? "root" : m_sceneManager.CurrentScene.RegionInfo.RegionName); | 833 | string regionName = (m_sceneManager.CurrentScene == null ? "root" : m_sceneManager.CurrentScene.RegionInfo.RegionName); |
833 | MainConsole.Instance.Output(String.Format("Currently selected region is {0}", regionName)); | 834 | MainConsole.Instance.Output(String.Format("Currently selected region is {0}", regionName)); |
834 | m_console.DefaultPrompt = String.Format("Region ({0}) ", regionName); | 835 | m_console.DefaultPrompt = String.Format("{0} ({1}) ", m_custom_prompt, regionName); |
835 | m_console.ConsoleScene = m_sceneManager.CurrentScene; | 836 | m_console.ConsoleScene = m_sceneManager.CurrentScene; |
836 | } | 837 | } |
837 | 838 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index a12a17c..a3ac756 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -3322,7 +3322,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3322 | } | 3322 | } |
3323 | 3323 | ||
3324 | /// <summary> | 3324 | /// <summary> |
3325 | /// Update the entire rotation of the group. | 3325 | /// Update the rotation of just the root prim of a linkset. |
3326 | /// </summary> | 3326 | /// </summary> |
3327 | /// <param name="rot"></param> | 3327 | /// <param name="rot"></param> |
3328 | public void UpdateRootRotation(Quaternion rot) | 3328 | public void UpdateRootRotation(Quaternion rot) |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index 6305d27..dce0ec8 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | |||
@@ -285,9 +285,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests | |||
285 | 285 | ||
286 | // FIXME: This is different for live avatars - z position is adjusted. This is half the height of the | 286 | // FIXME: This is different for live avatars - z position is adjusted. This is half the height of the |
287 | // default avatar. | 287 | // default avatar. |
288 | // Curiously, Vector3.ToString() will not display the last two places of the float. For example, | ||
289 | // printing out npc.AbsolutePosition will give <0, 0, 0.8454993> not <0, 0, 0.845499337> | ||
288 | Assert.That( | 290 | Assert.That( |
289 | npc.AbsolutePosition, | 291 | npc.AbsolutePosition, |
290 | Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, 0.8454993f))); | 292 | Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, 0.845499337f))); |
291 | 293 | ||
292 | npcModule.Stand(npc.UUID, scene); | 294 | npcModule.Stand(npc.UUID, scene); |
293 | 295 | ||
diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs index 1b30766..7f941a4 100644 --- a/OpenSim/Tools/pCampBot/Bot.cs +++ b/OpenSim/Tools/pCampBot/Bot.cs | |||
@@ -222,7 +222,7 @@ namespace pCampBot | |||
222 | } | 222 | } |
223 | else | 223 | else |
224 | { | 224 | { |
225 | MainConsole.Instance.OutputFormat( | 225 | m_log.ErrorFormat( |
226 | "{0} {1} cannot login: {2}", FirstName, LastName, Client.Network.LoginMessage); | 226 | "{0} {1} cannot login: {2}", FirstName, LastName, Client.Network.LoginMessage); |
227 | 227 | ||
228 | if (OnDisconnected != null) | 228 | if (OnDisconnected != null) |
@@ -266,12 +266,12 @@ namespace pCampBot | |||
266 | } | 266 | } |
267 | else | 267 | else |
268 | { | 268 | { |
269 | MainConsole.Instance.Output(String.Format("Failed to decode {0} asset {1}", asset.AssetType, asset.AssetID)); | 269 | m_log.WarnFormat("Failed to decode {0} asset {1}", asset.AssetType, asset.AssetID); |
270 | } | 270 | } |
271 | } | 271 | } |
272 | catch (Exception e) | 272 | catch (Exception e) |
273 | { | 273 | { |
274 | MainConsole.Instance.Output(String.Format("Exception: {0}",e.ToString())); | 274 | m_log.ErrorFormat("Exception: {0}{1}", e.Message, e.StackTrace); |
275 | } | 275 | } |
276 | } | 276 | } |
277 | } | 277 | } |
@@ -305,7 +305,7 @@ namespace pCampBot | |||
305 | if (wear == "yes") | 305 | if (wear == "yes") |
306 | { | 306 | { |
307 | //TODO: Implement random outfit picking | 307 | //TODO: Implement random outfit picking |
308 | MainConsole.Instance.Output("Picks a random outfit. Not yet implemented."); | 308 | m_log.DebugFormat("Picks a random outfit. Not yet implemented."); |
309 | } | 309 | } |
310 | else if (wear != "save") | 310 | else if (wear != "save") |
311 | saveDir = "MyAppearance/" + wear; | 311 | saveDir = "MyAppearance/" + wear; |
@@ -334,7 +334,9 @@ namespace pCampBot | |||
334 | listwearables.Add(item); | 334 | listwearables.Add(item); |
335 | } | 335 | } |
336 | else | 336 | else |
337 | MainConsole.Instance.Output(String.Format("Failed to create item {0}",item.Name)); | 337 | { |
338 | m_log.WarnFormat("Failed to create item {0}", item.Name); | ||
339 | } | ||
338 | } | 340 | } |
339 | ); | 341 | ); |
340 | } | 342 | } |
@@ -356,7 +358,9 @@ namespace pCampBot | |||
356 | listwearables.Add(item); | 358 | listwearables.Add(item); |
357 | } | 359 | } |
358 | else | 360 | else |
359 | MainConsole.Instance.Output(String.Format("Failed to create item {0}",item.Name)); | 361 | { |
362 | m_log.WarnFormat("Failed to create item {0}", item.Name); | ||
363 | } | ||
360 | } | 364 | } |
361 | ); | 365 | ); |
362 | } | 366 | } |
@@ -364,10 +368,12 @@ namespace pCampBot | |||
364 | Thread.Sleep(1000); | 368 | Thread.Sleep(1000); |
365 | 369 | ||
366 | if (listwearables == null || listwearables.Count == 0) | 370 | if (listwearables == null || listwearables.Count == 0) |
367 | MainConsole.Instance.Output("Nothing to send on this folder!"); | 371 | { |
372 | m_log.DebugFormat("Nothing to send on this folder!"); | ||
373 | } | ||
368 | else | 374 | else |
369 | { | 375 | { |
370 | MainConsole.Instance.Output(String.Format("Sending {0} wearables...",listwearables.Count)); | 376 | m_log.DebugFormat("Sending {0} wearables...", listwearables.Count); |
371 | Client.Appearance.WearOutfit(listwearables, false); | 377 | Client.Appearance.WearOutfit(listwearables, false); |
372 | } | 378 | } |
373 | } | 379 | } |
@@ -447,17 +453,20 @@ namespace pCampBot | |||
447 | 453 | ||
448 | for (int i = 0; i < prim.Textures.FaceTextures.Length; i++) | 454 | for (int i = 0; i < prim.Textures.FaceTextures.Length; i++) |
449 | { | 455 | { |
450 | UUID textureID = prim.Textures.FaceTextures[i].TextureID; | 456 | Primitive.TextureEntryFace face = prim.Textures.FaceTextures[i]; |
451 | 457 | ||
452 | if (textureID != UUID.Zero) | 458 | if (face != null) |
453 | GetTexture(textureID); | 459 | { |
460 | UUID textureID = prim.Textures.FaceTextures[i].TextureID; | ||
461 | |||
462 | if (textureID != UUID.Zero) | ||
463 | GetTexture(textureID); | ||
464 | } | ||
454 | } | 465 | } |
455 | } | 466 | } |
456 | 467 | ||
457 | if (prim.Sculpt.SculptTexture != UUID.Zero) | 468 | if (prim.Sculpt != null && prim.Sculpt.SculptTexture != UUID.Zero) |
458 | { | ||
459 | GetTexture(prim.Sculpt.SculptTexture); | 469 | GetTexture(prim.Sculpt.SculptTexture); |
460 | } | ||
461 | } | 470 | } |
462 | } | 471 | } |
463 | 472 | ||
diff --git a/OpenSim/Tools/pCampBot/BotManager.cs b/OpenSim/Tools/pCampBot/BotManager.cs index 704770a..c4c6f8f 100644 --- a/OpenSim/Tools/pCampBot/BotManager.cs +++ b/OpenSim/Tools/pCampBot/BotManager.cs | |||
@@ -51,7 +51,6 @@ namespace pCampBot | |||
51 | protected CommandConsole m_console; | 51 | protected CommandConsole m_console; |
52 | protected List<Bot> m_lBot; | 52 | protected List<Bot> m_lBot; |
53 | protected Random somthing = new Random(Environment.TickCount); | 53 | protected Random somthing = new Random(Environment.TickCount); |
54 | protected int numbots = 0; | ||
55 | public IConfig Config { get; private set; } | 54 | public IConfig Config { get; private set; } |
56 | 55 | ||
57 | /// <summary> | 56 | /// <summary> |
@@ -200,16 +199,17 @@ namespace pCampBot | |||
200 | { | 199 | { |
201 | case EventType.CONNECTED: | 200 | case EventType.CONNECTED: |
202 | m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Connected"); | 201 | m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Connected"); |
203 | numbots++; | ||
204 | // m_log.InfoFormat("NUMBOTS {0}", numbots); | ||
205 | break; | 202 | break; |
206 | case EventType.DISCONNECTED: | 203 | case EventType.DISCONNECTED: |
207 | m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Disconnected"); | 204 | m_log.Info("[" + callbot.FirstName + " " + callbot.LastName + "]: Disconnected"); |
208 | numbots--; | 205 | |
209 | // m_log.InfoFormat("NUMBOTS {0}", numbots); | 206 | lock (m_lBot) |
210 | if (numbots <= 0) | 207 | { |
211 | Environment.Exit(0); | 208 | if (m_lBot.TrueForAll(b => !b.IsConnected)) |
212 | break; | 209 | Environment.Exit(0); |
210 | |||
211 | break; | ||
212 | } | ||
213 | } | 213 | } |
214 | } | 214 | } |
215 | 215 | ||