aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs1
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs362
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs69
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs18
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs68
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneManager.cs24
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs4
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs2
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs6
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs1
15 files changed, 313 insertions, 263 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
index b93a41b..8f0ae76 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
@@ -134,7 +134,6 @@ namespace OpenSim.Region.ClientStack.Linden
134 AddNewInventoryItem = m_Scene.AddUploadedInventoryItem; 134 AddNewInventoryItem = m_Scene.AddUploadedInventoryItem;
135 ItemUpdatedCall = m_Scene.CapsUpdateInventoryItemAsset; 135 ItemUpdatedCall = m_Scene.CapsUpdateInventoryItemAsset;
136 TaskScriptUpdatedCall = m_Scene.CapsUpdateTaskInventoryScriptAsset; 136 TaskScriptUpdatedCall = m_Scene.CapsUpdateTaskInventoryScriptAsset;
137 CAPSFetchInventoryDescendents = m_Scene.HandleFetchInventoryDescendentsCAPS;
138 GetClient = m_Scene.SceneGraph.GetControllingClient; 137 GetClient = m_Scene.SceneGraph.GetControllingClient;
139 } 138 }
140 139
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
index 7d73b3e..5c721d4 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
@@ -39,6 +39,7 @@ using OpenMetaverse.Messages.Linden;
39using OpenMetaverse.Packets; 39using OpenMetaverse.Packets;
40using OpenMetaverse.StructuredData; 40using OpenMetaverse.StructuredData;
41using OpenSim.Framework; 41using OpenSim.Framework;
42using OpenSim.Framework.Console;
42using OpenSim.Framework.Servers; 43using OpenSim.Framework.Servers;
43using OpenSim.Framework.Servers.HttpServer; 44using OpenSim.Framework.Servers.HttpServer;
44using OpenSim.Region.Framework.Interfaces; 45using OpenSim.Region.Framework.Interfaces;
@@ -58,9 +59,15 @@ namespace OpenSim.Region.ClientStack.Linden
58 public class EventQueueGetModule : IEventQueue, IRegionModule 59 public class EventQueueGetModule : IEventQueue, IRegionModule
59 { 60 {
60 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 61 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
61 protected Scene m_scene = null; 62
63 /// <value>
64 /// Debug level.
65 /// </value>
66 public int DebugLevel { get; set; }
67
68 protected Scene m_scene;
62 private IConfigSource m_gConfig; 69 private IConfigSource m_gConfig;
63 bool enabledYN = false; 70 bool enabledYN;
64 71
65 private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>(); 72 private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>();
66 73
@@ -97,6 +104,15 @@ namespace OpenSim.Region.ClientStack.Linden
97 scene.EventManager.OnClientClosed += ClientClosed; 104 scene.EventManager.OnClientClosed += ClientClosed;
98 scene.EventManager.OnMakeChildAgent += MakeChildAgent; 105 scene.EventManager.OnMakeChildAgent += MakeChildAgent;
99 scene.EventManager.OnRegisterCaps += OnRegisterCaps; 106 scene.EventManager.OnRegisterCaps += OnRegisterCaps;
107
108 MainConsole.Instance.Commands.AddCommand(
109 "event queue",
110 false,
111 "debug eq",
112 "debug eq [0|1]",
113 "debug eq 1 will turn on event queue debugging. This will log all outgoing event queue messages to clients.\n"
114 + "debug eq 1 will turn off event queue debugging.",
115 HandleDebugEq);
100 } 116 }
101 else 117 else
102 { 118 {
@@ -128,6 +144,22 @@ namespace OpenSim.Region.ClientStack.Linden
128 } 144 }
129 #endregion 145 #endregion
130 146
147 protected void HandleDebugEq(string module, string[] args)
148 {
149 int debugLevel;
150
151 if (!(args.Length == 3 && int.TryParse(args[2], out debugLevel)))
152 {
153 MainConsole.Instance.OutputFormat("Usage: debug eq [0|1]");
154 }
155 else
156 {
157 DebugLevel = debugLevel;
158 MainConsole.Instance.OutputFormat(
159 "Set event queue debug level to {0} in {1}", DebugLevel, m_scene.RegionInfo.RegionName);
160 }
161 }
162
131 /// <summary> 163 /// <summary>
132 /// Always returns a valid queue 164 /// Always returns a valid queue
133 /// </summary> 165 /// </summary>
@@ -314,16 +346,22 @@ namespace OpenSim.Region.ClientStack.Linden
314 } 346 }
315 347
316 // Register this as a caps handler 348 // Register this as a caps handler
349 // FIXME: Confusingly, we need to register separate as a capability so that the client is told about
350 // EventQueueGet when it receive capability information, but then we replace the rest handler immediately
351 // afterwards with the poll service. So for now, we'll pass a null instead to simplify code reading, but
352 // really it should be possible to directly register the poll handler as a capability.
317 caps.RegisterHandler("EventQueueGet", 353 caps.RegisterHandler("EventQueueGet",
318 new RestHTTPHandler("POST", capsBase + EventQueueGetUUID.ToString() + "/", 354 new RestHTTPHandler("POST", capsBase + EventQueueGetUUID.ToString() + "/", null));
319 delegate(Hashtable m_dhttpMethod) 355// delegate(Hashtable m_dhttpMethod)
320 { 356// {
321 return ProcessQueue(m_dhttpMethod, agentID, caps); 357// return ProcessQueue(m_dhttpMethod, agentID, caps);
322 })); 358// }));
323 359
324 // This will persist this beyond the expiry of the caps handlers 360 // This will persist this beyond the expiry of the caps handlers
325 MainServer.Instance.AddPollServiceHTTPHandler( 361 MainServer.Instance.AddPollServiceHTTPHandler(
326 capsBase + EventQueueGetUUID.ToString() + "/", EventQueuePoll, new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID)); 362 capsBase + EventQueueGetUUID.ToString() + "/",
363 EventQueuePoll,
364 new PollServiceEventArgs(null, HasEvents, GetEvents, NoEvents, agentID));
327 365
328 Random rnd = new Random(Environment.TickCount); 366 Random rnd = new Random(Environment.TickCount);
329 lock (m_ids) 367 lock (m_ids)
@@ -348,6 +386,8 @@ namespace OpenSim.Region.ClientStack.Linden
348 386
349 public Hashtable GetEvents(UUID requestID, UUID pAgentId, string request) 387 public Hashtable GetEvents(UUID requestID, UUID pAgentId, string request)
350 { 388 {
389// m_log.DebugFormat("[EVENT QUEUE GET MODULE]: Invoked GetEvents() for {0}", pAgentId);
390
351 Queue<OSD> queue = TryGetQueue(pAgentId); 391 Queue<OSD> queue = TryGetQueue(pAgentId);
352 OSD element; 392 OSD element;
353 lock (queue) 393 lock (queue)
@@ -370,12 +410,31 @@ namespace OpenSim.Region.ClientStack.Linden
370 } 410 }
371 else 411 else
372 { 412 {
413 if (DebugLevel > 0 && element is OSDMap)
414 {
415 OSDMap ev = (OSDMap)element;
416 m_log.DebugFormat(
417 "[EVENT QUEUE GET MODULE]: Eq OUT {0} to {1}",
418 ev["message"], m_scene.GetScenePresence(pAgentId).Name);
419 }
420
373 array.Add(element); 421 array.Add(element);
422
374 lock (queue) 423 lock (queue)
375 { 424 {
376 while (queue.Count > 0) 425 while (queue.Count > 0)
377 { 426 {
378 array.Add(queue.Dequeue()); 427 element = queue.Dequeue();
428
429 if (DebugLevel > 0 && element is OSDMap)
430 {
431 OSDMap ev = (OSDMap)element;
432 m_log.DebugFormat(
433 "[EVENT QUEUE GET MODULE]: Eq OUT {0} to {1}",
434 ev["message"], m_scene.GetScenePresence(pAgentId).Name);
435 }
436
437 array.Add(element);
379 thisID++; 438 thisID++;
380 } 439 }
381 } 440 }
@@ -412,148 +471,166 @@ namespace OpenSim.Region.ClientStack.Linden
412 return responsedata; 471 return responsedata;
413 } 472 }
414 473
415 public Hashtable ProcessQueue(Hashtable request, UUID agentID, Caps caps) 474// public Hashtable ProcessQueue(Hashtable request, UUID agentID, Caps caps)
416 { 475// {
417 // TODO: this has to be redone to not busy-wait (and block the thread), 476// // TODO: this has to be redone to not busy-wait (and block the thread),
418 // TODO: as soon as we have a non-blocking way to handle HTTP-requests. 477// // TODO: as soon as we have a non-blocking way to handle HTTP-requests.
419 478//
420// if (m_log.IsDebugEnabled) 479//// if (m_log.IsDebugEnabled)
421// { 480//// {
422// String debug = "[EVENTQUEUE]: Got request for agent {0} in region {1} from thread {2}: [ "; 481//// String debug = "[EVENTQUEUE]: Got request for agent {0} in region {1} from thread {2}: [ ";
423// foreach (object key in request.Keys) 482//// foreach (object key in request.Keys)
483//// {
484//// debug += key.ToString() + "=" + request[key].ToString() + " ";
485//// }
486//// m_log.DebugFormat(debug + " ]", agentID, m_scene.RegionInfo.RegionName, System.Threading.Thread.CurrentThread.Name);
487//// }
488//
489// Queue<OSD> queue = TryGetQueue(agentID);
490// OSD element;
491//
492// lock (queue)
493// element = queue.Dequeue(); // 15s timeout
494//
495// Hashtable responsedata = new Hashtable();
496//
497// int thisID = 0;
498// lock (m_ids)
499// thisID = m_ids[agentID];
500//
501// if (element == null)
502// {
503// //m_log.ErrorFormat("[EVENTQUEUE]: Nothing to process in " + m_scene.RegionInfo.RegionName);
504// if (thisID == -1) // close-request
424// { 505// {
425// debug += key.ToString() + "=" + request[key].ToString() + " "; 506// m_log.ErrorFormat("[EVENTQUEUE]: 404 in " + m_scene.RegionInfo.RegionName);
507// responsedata["int_response_code"] = 404; //501; //410; //404;
508// responsedata["content_type"] = "text/plain";
509// responsedata["keepalive"] = false;
510// responsedata["str_response_string"] = "Closed EQG";
511// return responsedata;
426// } 512// }
427// m_log.DebugFormat(debug + " ]", agentID, m_scene.RegionInfo.RegionName, System.Threading.Thread.CurrentThread.Name); 513// responsedata["int_response_code"] = 502;
514// responsedata["content_type"] = "text/plain";
515// responsedata["keepalive"] = false;
516// responsedata["str_response_string"] = "Upstream error: ";
517// responsedata["error_status_text"] = "Upstream error:";
518// responsedata["http_protocol_version"] = "HTTP/1.0";
519// return responsedata;
428// } 520// }
429 521//
430 Queue<OSD> queue = TryGetQueue(agentID); 522// OSDArray array = new OSDArray();
431 OSD element; 523// if (element == null) // didn't have an event in 15s
432 524// {
433 lock (queue) 525// // Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say!
434 element = queue.Dequeue(); // 15s timeout 526// array.Add(EventQueueHelper.KeepAliveEvent());
435 527// //m_log.DebugFormat("[EVENTQUEUE]: adding fake event for {0} in region {1}", agentID, m_scene.RegionInfo.RegionName);
436 Hashtable responsedata = new Hashtable(); 528// }
437 529// else
438 int thisID = 0; 530// {
439 lock (m_ids) 531// array.Add(element);
440 thisID = m_ids[agentID]; 532//
441 533// if (element is OSDMap)
442 if (element == null) 534// {
443 { 535// OSDMap ev = (OSDMap)element;
444 //m_log.ErrorFormat("[EVENTQUEUE]: Nothing to process in " + m_scene.RegionInfo.RegionName); 536// m_log.DebugFormat(
445 if (thisID == -1) // close-request 537// "[EVENT QUEUE GET MODULE]: Eq OUT {0} to {1}",
446 { 538// ev["message"], m_scene.GetScenePresence(agentID).Name);
447 m_log.ErrorFormat("[EVENTQUEUE]: 404 in " + m_scene.RegionInfo.RegionName); 539// }
448 responsedata["int_response_code"] = 404; //501; //410; //404; 540//
449 responsedata["content_type"] = "text/plain"; 541// lock (queue)
450 responsedata["keepalive"] = false; 542// {
451 responsedata["str_response_string"] = "Closed EQG"; 543// while (queue.Count > 0)
452 return responsedata; 544// {
453 } 545// element = queue.Dequeue();
454 responsedata["int_response_code"] = 502; 546//
455 responsedata["content_type"] = "text/plain"; 547// if (element is OSDMap)
456 responsedata["keepalive"] = false; 548// {
457 responsedata["str_response_string"] = "Upstream error: "; 549// OSDMap ev = (OSDMap)element;
458 responsedata["error_status_text"] = "Upstream error:"; 550// m_log.DebugFormat(
459 responsedata["http_protocol_version"] = "HTTP/1.0"; 551// "[EVENT QUEUE GET MODULE]: Eq OUT {0} to {1}",
460 return responsedata; 552// ev["message"], m_scene.GetScenePresence(agentID).Name);
461 } 553// }
462 554//
463 OSDArray array = new OSDArray(); 555// array.Add(element);
464 if (element == null) // didn't have an event in 15s 556// thisID++;
465 { 557// }
466 // Send it a fake event to keep the client polling! It doesn't like 502s like the proxys say! 558// }
467 array.Add(EventQueueHelper.KeepAliveEvent()); 559// }
468 //m_log.DebugFormat("[EVENTQUEUE]: adding fake event for {0} in region {1}", agentID, m_scene.RegionInfo.RegionName); 560//
469 } 561// OSDMap events = new OSDMap();
470 else 562// events.Add("events", array);
471 { 563//
472 array.Add(element); 564// events.Add("id", new OSDInteger(thisID));
473 565// lock (m_ids)
474 lock (queue) 566// {
475 { 567// m_ids[agentID] = thisID + 1;
476 while (queue.Count > 0) 568// }
477 { 569//
478 array.Add(queue.Dequeue()); 570// responsedata["int_response_code"] = 200;
479 thisID++; 571// responsedata["content_type"] = "application/xml";
480 } 572// responsedata["keepalive"] = false;
481 } 573// responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events);
482 } 574//
483 575// m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
484 OSDMap events = new OSDMap(); 576//
485 events.Add("events", array); 577// return responsedata;
486 578// }
487 events.Add("id", new OSDInteger(thisID));
488 lock (m_ids)
489 {
490 m_ids[agentID] = thisID + 1;
491 }
492
493 responsedata["int_response_code"] = 200;
494 responsedata["content_type"] = "application/xml";
495 responsedata["keepalive"] = false;
496 responsedata["str_response_string"] = OSDParser.SerializeLLSDXmlString(events);
497 //m_log.DebugFormat("[EVENTQUEUE]: sending response for {0} in region {1}: {2}", agentID, m_scene.RegionInfo.RegionName, responsedata["str_response_string"]);
498
499 return responsedata;
500 }
501 579
502 public Hashtable EventQueuePoll(Hashtable request) 580 public Hashtable EventQueuePoll(Hashtable request)
503 { 581 {
504 return new Hashtable(); 582 return new Hashtable();
505 } 583 }
506 584
507 public Hashtable EventQueuePath2(Hashtable request) 585// public Hashtable EventQueuePath2(Hashtable request)
508 { 586// {
509 string capuuid = (string)request["uri"]; //path.Replace("/CAPS/EQG/",""); 587// string capuuid = (string)request["uri"]; //path.Replace("/CAPS/EQG/","");
510 // pull off the last "/" in the path. 588// // pull off the last "/" in the path.
511 Hashtable responsedata = new Hashtable(); 589// Hashtable responsedata = new Hashtable();
512 capuuid = capuuid.Substring(0, capuuid.Length - 1); 590// capuuid = capuuid.Substring(0, capuuid.Length - 1);
513 capuuid = capuuid.Replace("/CAPS/EQG/", ""); 591// capuuid = capuuid.Replace("/CAPS/EQG/", "");
514 UUID AvatarID = UUID.Zero; 592// UUID AvatarID = UUID.Zero;
515 UUID capUUID = UUID.Zero; 593// UUID capUUID = UUID.Zero;
516 594//
517 // parse the path and search for the avatar with it registered 595// // parse the path and search for the avatar with it registered
518 if (UUID.TryParse(capuuid, out capUUID)) 596// if (UUID.TryParse(capuuid, out capUUID))
519 { 597// {
520 lock (m_QueueUUIDAvatarMapping) 598// lock (m_QueueUUIDAvatarMapping)
521 { 599// {
522 if (m_QueueUUIDAvatarMapping.ContainsKey(capUUID)) 600// if (m_QueueUUIDAvatarMapping.ContainsKey(capUUID))
523 { 601// {
524 AvatarID = m_QueueUUIDAvatarMapping[capUUID]; 602// AvatarID = m_QueueUUIDAvatarMapping[capUUID];
525 } 603// }
526 } 604// }
527 605//
528 if (AvatarID != UUID.Zero) 606// if (AvatarID != UUID.Zero)
529 { 607// {
530 return ProcessQueue(request, AvatarID, m_scene.CapsModule.GetCapsForUser(AvatarID)); 608// return ProcessQueue(request, AvatarID, m_scene.CapsModule.GetCapsForUser(AvatarID));
531 } 609// }
532 else 610// else
533 { 611// {
534 responsedata["int_response_code"] = 404; 612// responsedata["int_response_code"] = 404;
535 responsedata["content_type"] = "text/plain"; 613// responsedata["content_type"] = "text/plain";
536 responsedata["keepalive"] = false; 614// responsedata["keepalive"] = false;
537 responsedata["str_response_string"] = "Not Found"; 615// responsedata["str_response_string"] = "Not Found";
538 responsedata["error_status_text"] = "Not Found"; 616// responsedata["error_status_text"] = "Not Found";
539 responsedata["http_protocol_version"] = "HTTP/1.0"; 617// responsedata["http_protocol_version"] = "HTTP/1.0";
540 return responsedata; 618// return responsedata;
541 // return 404 619// // return 404
542 } 620// }
543 } 621// }
544 else 622// else
545 { 623// {
546 responsedata["int_response_code"] = 404; 624// responsedata["int_response_code"] = 404;
547 responsedata["content_type"] = "text/plain"; 625// responsedata["content_type"] = "text/plain";
548 responsedata["keepalive"] = false; 626// responsedata["keepalive"] = false;
549 responsedata["str_response_string"] = "Not Found"; 627// responsedata["str_response_string"] = "Not Found";
550 responsedata["error_status_text"] = "Not Found"; 628// responsedata["error_status_text"] = "Not Found";
551 responsedata["http_protocol_version"] = "HTTP/1.0"; 629// responsedata["http_protocol_version"] = "HTTP/1.0";
552 return responsedata; 630// return responsedata;
553 // return 404 631// // return 404
554 } 632// }
555 633// }
556 }
557 634
558 public OSD EventQueueFallBack(string path, OSD request, string endpoint) 635 public OSD EventQueueFallBack(string path, OSD request, string endpoint)
559 { 636 {
@@ -717,6 +794,7 @@ namespace OpenSim.Region.ClientStack.Linden
717 OSD item = EventQueueHelper.GroupMembership(groupUpdate); 794 OSD item = EventQueueHelper.GroupMembership(groupUpdate);
718 Enqueue(item, avatarID); 795 Enqueue(item, avatarID);
719 } 796 }
797
720 public void QueryReply(PlacesReplyPacket groupUpdate, UUID avatarID) 798 public void QueryReply(PlacesReplyPacket groupUpdate, UUID avatarID)
721 { 799 {
722 OSD item = EventQueueHelper.PlacesQuery(groupUpdate); 800 OSD item = EventQueueHelper.PlacesQuery(groupUpdate);
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
index 94629a2..10f43d1 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs
@@ -42,18 +42,25 @@ using OpenSim.Capabilities.Handlers;
42 42
43namespace OpenSim.Region.ClientStack.Linden 43namespace OpenSim.Region.ClientStack.Linden
44{ 44{
45 45 /// <summary>
46 /// This module implements both WebFetchInventoryDescendents and FetchInventoryDescendents2 capabilities.
47 /// </summary>
46 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] 48 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
47 public class WebFetchInvDescModule : INonSharedRegionModule 49 public class WebFetchInvDescModule : INonSharedRegionModule
48 { 50 {
49 private static readonly ILog m_log = 51// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 52
51 private Scene m_scene; 53 private Scene m_scene;
52 54
53 private IInventoryService m_InventoryService; 55 private IInventoryService m_InventoryService;
54 private ILibraryService m_LibraryService; 56 private ILibraryService m_LibraryService;
55 private bool m_Enabled = false; 57
56 private string m_URL; 58 private bool m_Enabled;
59
60 private string m_fetchInventoryDescendents2Url;
61 private string m_webFetchInventoryDescendentsUrl;
62
63 private WebFetchInvDescHandler m_webFetchHandler;
57 64
58 #region ISharedRegionModule Members 65 #region ISharedRegionModule Members
59 66
@@ -63,10 +70,13 @@ namespace OpenSim.Region.ClientStack.Linden
63 if (config == null) 70 if (config == null)
64 return; 71 return;
65 72
66 m_URL = config.GetString("Cap_WebFetchInventoryDescendents", string.Empty); 73 m_fetchInventoryDescendents2Url = config.GetString("Cap_FetchInventoryDescendents2", string.Empty);
67 // Cap doesn't exist 74 m_webFetchInventoryDescendentsUrl = config.GetString("Cap_WebFetchInventoryDescendents", string.Empty);
68 if (m_URL != string.Empty) 75
76 if (m_fetchInventoryDescendents2Url != string.Empty || m_webFetchInventoryDescendentsUrl != string.Empty)
77 {
69 m_Enabled = true; 78 m_Enabled = true;
79 }
70 } 80 }
71 81
72 public void AddRegion(Scene s) 82 public void AddRegion(Scene s)
@@ -91,8 +101,13 @@ namespace OpenSim.Region.ClientStack.Linden
91 if (!m_Enabled) 101 if (!m_Enabled)
92 return; 102 return;
93 103
94 m_InventoryService = m_scene.InventoryService; ; 104 m_InventoryService = m_scene.InventoryService;
95 m_LibraryService = m_scene.LibraryService; 105 m_LibraryService = m_scene.LibraryService;
106
107 // We'll reuse the same handler for all requests.
108 if (m_fetchInventoryDescendents2Url == "localhost" || m_webFetchInventoryDescendentsUrl == "localhost")
109 m_webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService);
110
96 m_scene.EventManager.OnRegisterCaps += RegisterCaps; 111 m_scene.EventManager.OnRegisterCaps += RegisterCaps;
97 } 112 }
98 113
@@ -111,24 +126,38 @@ namespace OpenSim.Region.ClientStack.Linden
111 126
112 #endregion 127 #endregion
113 128
114 public void RegisterCaps(UUID agentID, Caps caps) 129 private void RegisterCaps(UUID agentID, Caps caps)
115 { 130 {
116 UUID capID = UUID.Random(); 131 if (m_webFetchInventoryDescendentsUrl != "")
132 RegisterFetchCap(agentID, caps, "WebFetchInventoryDescendents", m_webFetchInventoryDescendentsUrl);
117 133
118 //caps.RegisterHandler("GetTexture", new StreamHandler("GET", "/CAPS/" + capID, ProcessGetTexture)); 134 if (m_fetchInventoryDescendents2Url != "")
119 if (m_URL == "localhost") 135 RegisterFetchCap(agentID, caps, "FetchInventoryDescendents2", m_fetchInventoryDescendents2Url);
136 }
137
138 private void RegisterFetchCap(UUID agentID, Caps caps, string capName, string url)
139 {
140 string capUrl;
141
142 if (url == "localhost")
120 { 143 {
121 m_log.InfoFormat("[WEBFETCHINVENTORYDESCENDANTS]: /CAPS/{0} in region {1}", capID, m_scene.RegionInfo.RegionName); 144 capUrl = "/CAPS/" + UUID.Random();
122 WebFetchInvDescHandler webFetchHandler = new WebFetchInvDescHandler(m_InventoryService, m_LibraryService); 145
123 IRequestHandler reqHandler = new RestStreamHandler("POST", "/CAPS/" + UUID.Random(), webFetchHandler.FetchInventoryDescendentsRequest); 146 IRequestHandler reqHandler
124 caps.RegisterHandler("WebFetchInventoryDescendents", reqHandler); 147 = new RestStreamHandler("POST", capUrl, m_webFetchHandler.FetchInventoryDescendentsRequest);
148
149 caps.RegisterHandler(capName, reqHandler);
125 } 150 }
126 else 151 else
127 { 152 {
128 m_log.InfoFormat("[WEBFETCHINVENTORYDESCENDANTS]: {0} in region {1}", m_URL, m_scene.RegionInfo.RegionName); 153 capUrl = url;
129 caps.RegisterHandler("WebFetchInventoryDescendents", m_URL); 154
155 caps.RegisterHandler(capName, capUrl);
130 } 156 }
131 }
132 157
158// m_log.DebugFormat(
159// "[WEB FETCH INV DESC MODULE]: Registered capability {0} at {1} in region {2} for {3}",
160// capName, capUrl, m_scene.RegionInfo.RegionName, agentID);
161 }
133 } 162 }
134} 163}
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 8fdbe7b..3186dff 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -11730,7 +11730,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11730 logPacket = false; 11730 logPacket = false;
11731 11731
11732 if (logPacket) 11732 if (logPacket)
11733 m_log.DebugFormat("[CLIENT]: Packet OUT {0} to {1}", packet.Type, Name); 11733 m_log.DebugFormat(
11734 "[CLIENT]: PACKET OUT to {0} ({1}) in {2} - {3}",
11735 Name, ChildAgentStatus() ? "child" : "root ", m_scene.RegionInfo.RegionName, packet.Type);
11734 } 11736 }
11735 11737
11736 m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method); 11738 m_udpServer.SendPacket(m_udpClient, packet, throttlePacketType, doAutomaticSplitting, method);
@@ -11773,19 +11775,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11773 { 11775 {
11774 if (DebugPacketLevel > 0) 11776 if (DebugPacketLevel > 0)
11775 { 11777 {
11776 bool outputPacket = true; 11778 bool logPacket = true;
11777 11779
11778 if (DebugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate) 11780 if (DebugPacketLevel <= 255 && packet.Type == PacketType.AgentUpdate)
11779 outputPacket = false; 11781 logPacket = false;
11780 11782
11781 if (DebugPacketLevel <= 200 && packet.Type == PacketType.RequestImage) 11783 if (DebugPacketLevel <= 200 && packet.Type == PacketType.RequestImage)
11782 outputPacket = false; 11784 logPacket = false;
11783 11785
11784 if (DebugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation)) 11786 if (DebugPacketLevel <= 100 && (packet.Type == PacketType.ViewerEffect || packet.Type == PacketType.AgentAnimation))
11785 outputPacket = false; 11787 logPacket = false;
11786 11788
11787 if (outputPacket) 11789 if (logPacket)
11788 m_log.DebugFormat("[CLIENT]: Packet IN {0} from {1}", packet.Type, Name); 11790 m_log.DebugFormat(
11791 "[CLIENT]: PACKET IN from {0} ({1}) in {2} - {3}",
11792 Name, ChildAgentStatus() ? "child" : "root ", m_scene.RegionInfo.RegionName, packet.Type);
11789 } 11793 }
11790 11794
11791 if (!ProcessPacketMethod(packet)) 11795 if (!ProcessPacketMethod(packet))
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
index c13e9c6..44475a5 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
@@ -92,7 +92,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
92 return; 92 return;
93 } 93 }
94 94
95m_log.DebugFormat("MAP NAME=({0})", mapName); 95//m_log.DebugFormat("MAP NAME=({0})", mapName);
96 96
97 // try to fetch from GridServer 97 // try to fetch from GridServer
98 List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20); 98 List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 575079f..59170df 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -330,7 +330,7 @@ namespace OpenSim.Region.Framework.Scenes
330 } 330 }
331 } 331 }
332 } 332 }
333 } 333 }
334 334
335 public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs) 335 public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
336 { 336 {
@@ -487,6 +487,7 @@ namespace OpenSim.Region.Framework.Scenes
487 // can be handled transparently). 487 // can be handled transparently).
488 InventoryFolderImpl fold = null; 488 InventoryFolderImpl fold = null;
489 if (LibraryService != null && LibraryService.LibraryRootFolder != null) 489 if (LibraryService != null && LibraryService.LibraryRootFolder != null)
490 {
490 if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null) 491 if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null)
491 { 492 {
492 remoteClient.SendInventoryFolderDetails( 493 remoteClient.SendInventoryFolderDetails(
@@ -494,6 +495,7 @@ namespace OpenSim.Region.Framework.Scenes
494 fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems); 495 fold.RequestListOfFolders(), fold.Version, fetchFolders, fetchItems);
495 return; 496 return;
496 } 497 }
498 }
497 499
498 // We're going to send the reply async, because there may be 500 // We're going to send the reply async, because there may be
499 // an enormous quantity of packets -- basically the entire inventory! 501 // an enormous quantity of packets -- basically the entire inventory!
@@ -514,64 +516,6 @@ namespace OpenSim.Region.Framework.Scenes
514 SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState; 516 SendInventoryDelegate d = (SendInventoryDelegate)iar.AsyncState;
515 d.EndInvoke(iar); 517 d.EndInvoke(iar);
516 } 518 }
517
518 /// <summary>
519 /// Handle the caps inventory descendents fetch.
520 ///
521 /// Since the folder structure is sent to the client on login, I believe we only need to handle items.
522 /// Diva comment 8/13/2009: what if someone gave us a folder in the meantime??
523 /// </summary>
524 /// <param name="agentID"></param>
525 /// <param name="folderID"></param>
526 /// <param name="ownerID"></param>
527 /// <param name="fetchFolders"></param>
528 /// <param name="fetchItems"></param>
529 /// <param name="sortOrder"></param>
530 /// <returns>null if the inventory look up failed</returns>
531 public InventoryCollection HandleFetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID,
532 bool fetchFolders, bool fetchItems, int sortOrder, out int version)
533 {
534 m_log.DebugFormat(
535 "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}",
536 fetchFolders, fetchItems, folderID, agentID);
537
538 // FIXME MAYBE: We're not handling sortOrder!
539
540 // TODO: This code for looking in the folder for the library should be folded back into the
541 // CachedUserInfo so that this class doesn't have to know the details (and so that multiple libraries, etc.
542 // can be handled transparently).
543 InventoryFolderImpl fold;
544 if (LibraryService != null && LibraryService.LibraryRootFolder != null)
545 if ((fold = LibraryService.LibraryRootFolder.FindFolder(folderID)) != null)
546 {
547 version = 0;
548 InventoryCollection ret = new InventoryCollection();
549 ret.Folders = new List<InventoryFolderBase>();
550 ret.Items = fold.RequestListOfItems();
551
552 return ret;
553 }
554
555 InventoryCollection contents = new InventoryCollection();
556
557 if (folderID != UUID.Zero)
558 {
559 contents = InventoryService.GetFolderContent(agentID, folderID);
560 InventoryFolderBase containingFolder = new InventoryFolderBase();
561 containingFolder.ID = folderID;
562 containingFolder.Owner = agentID;
563 containingFolder = InventoryService.GetFolder(containingFolder);
564 version = containingFolder.Version;
565 }
566 else
567 {
568 // Lost itemsm don't really need a version
569 version = 1;
570 }
571
572 return contents;
573
574 }
575 519
576 /// <summary> 520 /// <summary>
577 /// Handle an inventory folder creation request from the client. 521 /// Handle an inventory folder creation request from the client.
@@ -646,14 +590,13 @@ namespace OpenSim.Region.Framework.Scenes
646 } 590 }
647 } 591 }
648 592
593 delegate void PurgeFolderDelegate(UUID userID, UUID folder);
594
649 /// <summary> 595 /// <summary>
650 /// This should delete all the items and folders in the given directory. 596 /// This should delete all the items and folders in the given directory.
651 /// </summary> 597 /// </summary>
652 /// <param name="remoteClient"></param> 598 /// <param name="remoteClient"></param>
653 /// <param name="folderID"></param> 599 /// <param name="folderID"></param>
654
655 delegate void PurgeFolderDelegate(UUID userID, UUID folder);
656
657 public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID) 600 public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID)
658 { 601 {
659 PurgeFolderDelegate d = PurgeFolderAsync; 602 PurgeFolderDelegate d = PurgeFolderAsync;
@@ -667,7 +610,6 @@ namespace OpenSim.Region.Framework.Scenes
667 } 610 }
668 } 611 }
669 612
670
671 private void PurgeFolderAsync(UUID userID, UUID folderID) 613 private void PurgeFolderAsync(UUID userID, UUID folderID)
672 { 614 {
673 InventoryFolderBase folder = new InventoryFolderBase(folderID, userID); 615 InventoryFolderBase folder = new InventoryFolderBase(folderID, userID);
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 66341a1..2323335 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4838,9 +4838,6 @@ namespace OpenSim.Region.Framework.Scenes
4838 4838
4839 public Vector3? GetNearestAllowedPosition(ScenePresence avatar) 4839 public Vector3? GetNearestAllowedPosition(ScenePresence avatar)
4840 { 4840 {
4841 //simulate to make sure we have pretty up to date positions
4842 PhysicsScene.Simulate(0);
4843
4844 ILandObject nearestParcel = GetNearestAllowedParcel(avatar.UUID, avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y); 4841 ILandObject nearestParcel = GetNearestAllowedParcel(avatar.UUID, avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
4845 4842
4846 if (nearestParcel != null) 4843 if (nearestParcel != null)
@@ -4867,12 +4864,13 @@ namespace OpenSim.Region.Framework.Scenes
4867 //Ultimate backup if we have no idea where they are 4864 //Ultimate backup if we have no idea where they are
4868 Debug.WriteLine("Have no idea where they are, sending them to: " + avatar.lastKnownAllowedPosition.ToString()); 4865 Debug.WriteLine("Have no idea where they are, sending them to: " + avatar.lastKnownAllowedPosition.ToString());
4869 return avatar.lastKnownAllowedPosition; 4866 return avatar.lastKnownAllowedPosition;
4870
4871 } 4867 }
4872 4868
4873 //Go to the edge, this happens in teleporting to a region with no available parcels 4869 //Go to the edge, this happens in teleporting to a region with no available parcels
4874 Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar); 4870 Vector3 nearestRegionEdgePoint = GetNearestRegionEdgePosition(avatar);
4871
4875 //Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString()); 4872 //Debug.WriteLine("They are really in a place they don't belong, sending them to: " + nearestRegionEdgePoint.ToString());
4873
4876 return nearestRegionEdgePoint; 4874 return nearestRegionEdgePoint;
4877 } 4875 }
4878 4876
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs
index eeb087f..82458e2 100644
--- a/OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -448,29 +448,25 @@ namespace OpenSim.Region.Framework.Scenes
448 } 448 }
449 449
450 /// <summary> 450 /// <summary>
451 /// Set the debug packet level on the current scene. This level governs which packets are printed out to the 451 /// Set the debug packet level on each current scene. This level governs which packets are printed out to the
452 /// console. 452 /// console.
453 /// </summary> 453 /// </summary>
454 /// <param name="newDebug"></param> 454 /// <param name="newDebug"></param>
455 /// <param name="name">Name of avatar to debug</param> 455 /// <param name="name">Name of avatar to debug</param>
456 public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name) 456 public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name)
457 { 457 {
458 ForEachCurrentScene( 458 ForEachCurrentScene(scene =>
459 delegate(Scene scene) 459 scene.ForEachScenePresence(sp =>
460 { 460 {
461 scene.ForEachRootClient(delegate(IClientAPI client) 461 if (name == null || sp.Name == name)
462 { 462 {
463 if (name == null || client.Name == name) 463 m_log.DebugFormat(
464 { 464 "Packet debug for {0} ({1}) set to {2}",
465 m_log.DebugFormat("Packet debug for {0} {1} set to {2}", 465 sp.Name, sp.IsChildAgent ? "child" : "root", newDebug);
466 client.FirstName,
467 client.LastName,
468 newDebug);
469 466
470 client.DebugPacketLevel = newDebug; 467 sp.ControllingClient.DebugPacketLevel = newDebug;
471 } 468 }
472 }); 469 })
473 }
474 ); 470 );
475 } 471 }
476 472
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index c485e87..2335ad5 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -1085,8 +1085,8 @@ namespace OpenSim.Region.Framework.Scenes
1085 invString.AddNameValueLine("asset_id", item.AssetID.ToString()); 1085 invString.AddNameValueLine("asset_id", item.AssetID.ToString());
1086 else 1086 else
1087 invString.AddNameValueLine("asset_id", UUID.Zero.ToString()); 1087 invString.AddNameValueLine("asset_id", UUID.Zero.ToString());
1088 invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]); 1088 invString.AddNameValueLine("type", Utils.AssetTypeToString((AssetType)item.Type));
1089 invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]); 1089 invString.AddNameValueLine("inv_type", Utils.InventoryTypeToString((InventoryType)item.InvType));
1090 invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags)); 1090 invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags));
1091 1091
1092 invString.AddSaleStart(); 1092 invString.AddSaleStart();
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index 1f631ee..514d9ad 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -56,7 +56,7 @@ namespace OpenSim.Region.Physics.Manager
56 56
57 public abstract class PhysicsScene 57 public abstract class PhysicsScene
58 { 58 {
59 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 59// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
60 60
61 /// <summary> 61 /// <summary>
62 /// Name of this scene. Useful in debug messages to distinguish one OdeScene instance from another. 62 /// Name of this scene. Useful in debug messages to distinguish one OdeScene instance from another.
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 489a23a..73c1c02 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -86,7 +86,7 @@ namespace OpenSim.Region.Physics.OdePlugin
86 private float CAPSULE_RADIUS = 0.37f; 86 private float CAPSULE_RADIUS = 0.37f;
87 private float CAPSULE_LENGTH = 2.140599f; 87 private float CAPSULE_LENGTH = 2.140599f;
88 private float m_tensor = 3800000f; 88 private float m_tensor = 3800000f;
89 private float heightFudgeFactor = 0.52f; 89// private float heightFudgeFactor = 0.52f;
90 private float walkDivisor = 1.3f; 90 private float walkDivisor = 1.3f;
91 private float runDivisor = 0.8f; 91 private float runDivisor = 0.8f;
92 private bool flying = false; 92 private bool flying = false;
@@ -149,7 +149,7 @@ namespace OpenSim.Region.Physics.OdePlugin
149 149
150 public OdeCharacter( 150 public OdeCharacter(
151 String avName, OdeScene parent_scene, Vector3 pos, Vector3 size, float pid_d, float pid_p, 151 String avName, OdeScene parent_scene, Vector3 pos, Vector3 size, float pid_d, float pid_p,
152 float capsule_radius, float tensor, float density, float height_fudge_factor, 152 float capsule_radius, float tensor, float density,
153 float walk_divisor, float rundivisor) 153 float walk_divisor, float rundivisor)
154 { 154 {
155 m_uuid = UUID.Random(); 155 m_uuid = UUID.Random();
@@ -187,7 +187,7 @@ namespace OpenSim.Region.Physics.OdePlugin
187 CAPSULE_RADIUS = capsule_radius; 187 CAPSULE_RADIUS = capsule_radius;
188 m_tensor = tensor; 188 m_tensor = tensor;
189 m_density = density; 189 m_density = density;
190 heightFudgeFactor = height_fudge_factor; 190// heightFudgeFactor = height_fudge_factor;
191 walkDivisor = walk_divisor; 191 walkDivisor = walk_divisor;
192 runDivisor = rundivisor; 192 runDivisor = rundivisor;
193 193
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index 0456f56..5b28e7c 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Physics.OdePlugin
156 private bool avCapsuleTilted = true; // true = old compatibility mode with leaning capsule; false = new corrected mode 156 private bool avCapsuleTilted = true; // true = old compatibility mode with leaning capsule; false = new corrected mode
157 public bool IsAvCapsuleTilted { get { return avCapsuleTilted; } set { avCapsuleTilted = value; } } 157 public bool IsAvCapsuleTilted { get { return avCapsuleTilted; } set { avCapsuleTilted = value; } }
158 private float avDensity = 80f; 158 private float avDensity = 80f;
159 private float avHeightFudgeFactor = 0.52f; 159// private float avHeightFudgeFactor = 0.52f;
160 private float avMovementDivisorWalk = 1.3f; 160 private float avMovementDivisorWalk = 1.3f;
161 private float avMovementDivisorRun = 0.8f; 161 private float avMovementDivisorRun = 0.8f;
162 private float minimumGroundFlightOffset = 3f; 162 private float minimumGroundFlightOffset = 3f;
@@ -316,7 +316,7 @@ namespace OpenSim.Region.Physics.OdePlugin
316 private int m_physicsiterations = 10; 316 private int m_physicsiterations = 10;
317 private const float m_SkipFramesAtms = 0.40f; // Drop frames gracefully at a 400 ms lag 317 private const float m_SkipFramesAtms = 0.40f; // Drop frames gracefully at a 400 ms lag
318 private readonly PhysicsActor PANull = new NullPhysicsActor(); 318 private readonly PhysicsActor PANull = new NullPhysicsActor();
319 private float step_time = 0.0f; 319// private float step_time = 0.0f;
320//Ckrinke: Comment out until used. We declare it, initialize it, but do not use it 320//Ckrinke: Comment out until used. We declare it, initialize it, but do not use it
321//Ckrinke private int ms = 0; 321//Ckrinke private int ms = 0;
322 public IntPtr world; 322 public IntPtr world;
@@ -479,7 +479,7 @@ namespace OpenSim.Region.Physics.OdePlugin
479 m_physicsiterations = physicsconfig.GetInt("world_internal_steps_without_collisions", 10); 479 m_physicsiterations = physicsconfig.GetInt("world_internal_steps_without_collisions", 10);
480 480
481 avDensity = physicsconfig.GetFloat("av_density", 80f); 481 avDensity = physicsconfig.GetFloat("av_density", 80f);
482 avHeightFudgeFactor = physicsconfig.GetFloat("av_height_fudge_factor", 0.52f); 482// avHeightFudgeFactor = physicsconfig.GetFloat("av_height_fudge_factor", 0.52f);
483 avMovementDivisorWalk = physicsconfig.GetFloat("av_movement_divisor_walk", 1.3f); 483 avMovementDivisorWalk = physicsconfig.GetFloat("av_movement_divisor_walk", 1.3f);
484 avMovementDivisorRun = physicsconfig.GetFloat("av_movement_divisor_run", 0.8f); 484 avMovementDivisorRun = physicsconfig.GetFloat("av_movement_divisor_run", 0.8f);
485 avCapRadius = physicsconfig.GetFloat("av_capsule_radius", 0.37f); 485 avCapRadius = physicsconfig.GetFloat("av_capsule_radius", 0.37f);
@@ -1706,7 +1706,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1706 OdeCharacter newAv 1706 OdeCharacter newAv
1707 = new OdeCharacter( 1707 = new OdeCharacter(
1708 avName, this, pos, size, avPIDD, avPIDP, 1708 avName, this, pos, size, avPIDD, avPIDP,
1709 avCapRadius, avStandupTensor, avDensity, avHeightFudgeFactor, 1709 avCapRadius, avStandupTensor, avDensity,
1710 avMovementDivisorWalk, avMovementDivisorRun); 1710 avMovementDivisorWalk, avMovementDivisorRun);
1711 1711
1712 newAv.Flying = isFlying; 1712 newAv.Flying = isFlying;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 04f10c6..7518d01 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -8695,6 +8695,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8695 case (int)ScriptBaseClass.PRIM_ROT_LOCAL: 8695 case (int)ScriptBaseClass.PRIM_ROT_LOCAL:
8696 res.Add(new LSL_Rotation(part.RotationOffset.X, part.RotationOffset.Y, part.RotationOffset.Z, part.RotationOffset.W)); 8696 res.Add(new LSL_Rotation(part.RotationOffset.X, part.RotationOffset.Y, part.RotationOffset.Z, part.RotationOffset.W));
8697 break; 8697 break;
8698 case (int)ScriptBaseClass.PRIM_POS_LOCAL:
8699 res.Add(new LSL_Vector(GetPartLocalPos(part)));
8700 break;
8698 } 8701 }
8699 } 8702 }
8700 return res; 8703 return res;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index ed5a2fe..4da8fe7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -140,7 +140,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
140 List<SenseRepeatClass> NewSensors = new List<SenseRepeatClass>(); 140 List<SenseRepeatClass> NewSensors = new List<SenseRepeatClass>();
141 foreach (SenseRepeatClass ts in SenseRepeaters) 141 foreach (SenseRepeatClass ts in SenseRepeaters)
142 { 142 {
143 if (ts.localID != m_localID && ts.itemID != m_itemID) 143 if (ts.localID != m_localID || ts.itemID != m_itemID)
144 { 144 {
145 NewSensors.Add(ts); 145 NewSensors.Add(ts);
146 } 146 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index a1cf3df..0ad3f78 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -323,6 +323,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
323 public const int PRIM_DESC = 28; 323 public const int PRIM_DESC = 28;
324 public const int PRIM_ROT_LOCAL = 29; 324 public const int PRIM_ROT_LOCAL = 29;
325 public const int PRIM_OMEGA = 32; 325 public const int PRIM_OMEGA = 32;
326 public const int PRIM_POS_LOCAL = 33;
326 public const int PRIM_LINK_TARGET = 34; 327 public const int PRIM_LINK_TARGET = 34;
327 public const int PRIM_TEXGEN_DEFAULT = 0; 328 public const int PRIM_TEXGEN_DEFAULT = 0;
328 public const int PRIM_TEXGEN_PLANAR = 1; 329 public const int PRIM_TEXGEN_PLANAR = 1;