diff options
author | Melanie | 2012-01-25 15:24:25 +0000 |
---|---|---|
committer | Melanie | 2012-01-25 15:24:25 +0000 |
commit | 2ca80add14477f3ce679e2fc7ae11ba4953cf60e (patch) | |
tree | 1883d782479623e08691b628223e6ea168f07627 | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-2ca80add14477f3ce679e2fc7ae11ba4953cf60e.zip opensim-SC_OLD-2ca80add14477f3ce679e2fc7ae11ba4953cf60e.tar.gz opensim-SC_OLD-2ca80add14477f3ce679e2fc7ae11ba4953cf60e.tar.bz2 opensim-SC_OLD-2ca80add14477f3ce679e2fc7ae11ba4953cf60e.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/Framework/Scenes/SceneGraph.cs
-rw-r--r-- | OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 81 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 6 |
2 files changed, 66 insertions, 21 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 63dadb9..021a669 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 | } |
@@ -1252,20 +1301,22 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
1252 | 1301 | ||
1253 | if (m_scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero) | 1302 | if (m_scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero) |
1254 | { | 1303 | { |
1255 | SceneObjectPart sop = m_scene.GetSceneObjectPart(m_scene.RegionInfo.RegionSettings.TelehubObject); | 1304 | SceneObjectGroup sog = m_scene.GetSceneObjectGroup(m_scene.RegionInfo.RegionSettings.TelehubObject); |
1256 | 1305 | if (sog != null) | |
1257 | OSDArray responsearr = new OSDArray(); | 1306 | { |
1258 | OSDMap responsemapdata = new OSDMap(); | 1307 | OSDArray responsearr = new OSDArray(); |
1259 | responsemapdata["X"] = OSD.FromInteger((int)(xstart + sop.AbsolutePosition.X)); | 1308 | OSDMap responsemapdata = new OSDMap(); |
1260 | responsemapdata["Y"] = OSD.FromInteger((int)(ystart + sop.AbsolutePosition.Y)); | 1309 | responsemapdata["X"] = OSD.FromInteger((int)(xstart + sog.AbsolutePosition.X)); |
1261 | // responsemapdata["Z"] = OSD.FromInteger((int)m_scene.GetGroundHeight(x,y)); | 1310 | responsemapdata["Y"] = OSD.FromInteger((int)(ystart + sog.AbsolutePosition.Y)); |
1262 | responsemapdata["ID"] = OSD.FromUUID(sop.UUID); | 1311 | // responsemapdata["Z"] = OSD.FromInteger((int)m_scene.GetGroundHeight(x,y)); |
1263 | responsemapdata["Name"] = OSD.FromString(sop.Name); | 1312 | responsemapdata["ID"] = OSD.FromUUID(sog.UUID); |
1264 | responsemapdata["Extra"] = OSD.FromInteger(0); // color (unused) | 1313 | responsemapdata["Name"] = OSD.FromString(sog.Name); |
1265 | responsemapdata["Extra2"] = OSD.FromInteger(0); // 0 = telehub / 1 = infohub | 1314 | responsemapdata["Extra"] = OSD.FromInteger(0); // color (unused) |
1266 | responsearr.Add(responsemapdata); | 1315 | responsemapdata["Extra2"] = OSD.FromInteger(0); // 0 = telehub / 1 = infohub |
1316 | responsearr.Add(responsemapdata); | ||
1267 | 1317 | ||
1268 | responsemap["1"] = responsearr; | 1318 | responsemap["1"] = responsearr; |
1319 | } | ||
1269 | } | 1320 | } |
1270 | 1321 | ||
1271 | return responsemap; | 1322 | return responsemap; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index c4dd655..5e8227d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -41,18 +41,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
41 | { | 41 | { |
42 | public delegate void PhysicsCrash(); | 42 | public delegate void PhysicsCrash(); |
43 | 43 | ||
44 | public delegate void ObjectDuplicateDelegate(EntityBase original, EntityBase clone); | ||
45 | |||
46 | public delegate void AttachToBackupDelegate(SceneObjectGroup sog); | 44 | public delegate void AttachToBackupDelegate(SceneObjectGroup sog); |
47 | 45 | ||
48 | public delegate void DetachFromBackupDelegate(SceneObjectGroup sog); | 46 | public delegate void DetachFromBackupDelegate(SceneObjectGroup sog); |
49 | 47 | ||
50 | public delegate void ChangedBackupDelegate(SceneObjectGroup sog); | 48 | public delegate void ChangedBackupDelegate(SceneObjectGroup sog); |
51 | 49 | ||
52 | public delegate void ObjectCreateDelegate(EntityBase obj); | ||
53 | |||
54 | public delegate void ObjectDeleteDelegate(EntityBase obj); | ||
55 | |||
56 | /// <summary> | 50 | /// <summary> |
57 | /// This class used to be called InnerScene and may not yet truly be a SceneGraph. The non scene graph components | 51 | /// This class used to be called InnerScene and may not yet truly be a SceneGraph. The non scene graph components |
58 | /// should be migrated out over time. | 52 | /// should be migrated out over time. |