aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs53
1 files changed, 51 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index af9c650..1a9313b 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -373,7 +373,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
373 public virtual void HandleMapItemRequest(IClientAPI remoteClient, uint flags, 373 public virtual void HandleMapItemRequest(IClientAPI remoteClient, uint flags,
374 uint EstateID, bool godlike, uint itemtype, ulong regionhandle) 374 uint EstateID, bool godlike, uint itemtype, ulong regionhandle)
375 { 375 {
376// m_log.DebugFormat("[WORLD MAP]: Handle MapItem request {0} {1}", regionhandle, itemtype); 376 m_log.DebugFormat("[WORLD MAP]: Handle MapItem request {0} {1}", regionhandle, itemtype);
377 377
378 lock (m_rootAgents) 378 lock (m_rootAgents)
379 { 379 {
@@ -429,7 +429,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
429 // ensures that the blockingqueue doesn't get borked if the GetAgents() timing changes. 429 // ensures that the blockingqueue doesn't get borked if the GetAgents() timing changes.
430 RequestMapItems("",remoteClient.AgentId,flags,EstateID,godlike,itemtype,regionhandle); 430 RequestMapItems("",remoteClient.AgentId,flags,EstateID,godlike,itemtype,regionhandle);
431 } 431 }
432 } else if (itemtype == 7) // Service 7 (MAP_ITEM_LAND_FOR_SALE) 432 }
433 else if (itemtype == 7) // Service 7 (MAP_ITEM_LAND_FOR_SALE)
433 { 434 {
434 if (regionhandle == 0 || regionhandle == m_scene.RegionInfo.RegionHandle) 435 if (regionhandle == 0 || regionhandle == m_scene.RegionInfo.RegionHandle)
435 { 436 {
@@ -481,6 +482,32 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
481 RequestMapItems("",remoteClient.AgentId,flags,EstateID,godlike,itemtype,regionhandle); 482 RequestMapItems("",remoteClient.AgentId,flags,EstateID,godlike,itemtype,regionhandle);
482 } 483 }
483 } 484 }
485 else if (itemtype == 1) // Service 1 (MAP_ITEM_TELEHUB)
486 {
487 if (regionhandle == 0 || regionhandle == m_scene.RegionInfo.RegionHandle)
488 {
489 List<mapItemReply> mapitems = new List<mapItemReply>();
490 mapItemReply mapitem = new mapItemReply();
491
492 SceneObjectPart sop = m_scene.GetSceneObjectPart(m_scene.RegionInfo.RegionSettings.TelehubObject);
493
494 mapitem = new mapItemReply();
495 mapitem.x = (uint)(xstart + sop.AbsolutePosition.X);
496 mapitem.y = (uint)(ystart + sop.AbsolutePosition.Y);
497 mapitem.id = UUID.Zero;
498 mapitem.name = sop.Name;
499 mapitem.Extra = 0; // color (not used)
500 mapitem.Extra2 = 0; // 0 = telehub / 1 = infohub
501 mapitems.Add(mapitem);
502
503 remoteClient.SendMapItemReply(mapitems.ToArray(), itemtype, flags);
504 }
505 else
506 {
507 // Remote Map Item Request
508 RequestMapItems("",remoteClient.AgentId,flags,EstateID,godlike,itemtype,regionhandle);
509 }
510 }
484 } 511 }
485 512
486 private int nAsyncRequests = 0; 513 private int nAsyncRequests = 0;
@@ -620,6 +647,28 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
620 } 647 }
621 av.ControllingClient.SendMapItemReply(returnitems.ToArray(), itemtype, mrs.flags); 648 av.ControllingClient.SendMapItemReply(returnitems.ToArray(), itemtype, mrs.flags);
622 } 649 }
650
651 // Service 1 (MAP_ITEM_TELEHUB)
652 itemtype = 1;
653
654 if (response.ContainsKey(itemtype.ToString()))
655 {
656 List<mapItemReply> returnitems = new List<mapItemReply>();
657 OSDArray itemarray = (OSDArray)response[itemtype.ToString()];
658 for (int i = 0; i < itemarray.Count; i++)
659 {
660 OSDMap mapitem = (OSDMap)itemarray[i];
661 mapItemReply mi = new mapItemReply();
662 mi.x = (uint)mapitem["X"].AsInteger();
663 mi.y = (uint)mapitem["Y"].AsInteger();
664 mi.id = mapitem["ID"].AsUUID();
665 mi.Extra = mapitem["Extra"].AsInteger();
666 mi.Extra2 = mapitem["Extra2"].AsInteger();
667 mi.name = mapitem["Name"].AsString();
668 returnitems.Add(mi);
669 }
670 av.ControllingClient.SendMapItemReply(returnitems.ToArray(), itemtype, mrs.flags);
671 }
623 } 672 }
624 } 673 }
625 } 674 }