aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer/SimClient.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim.RegionServer/SimClient.cs')
-rw-r--r--OpenSim.RegionServer/SimClient.cs35
1 files changed, 33 insertions, 2 deletions
diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs
index 76bf46e..ab13b02 100644
--- a/OpenSim.RegionServer/SimClient.cs
+++ b/OpenSim.RegionServer/SimClient.cs
@@ -144,7 +144,7 @@ namespace OpenSim
144 144
145 public void CrossSimBorder(LLVector3 avatarpos) 145 public void CrossSimBorder(LLVector3 avatarpos)
146 { // VERY VERY BASIC 146 { // VERY VERY BASIC
147 147
148 LLVector3 newpos = avatarpos; 148 LLVector3 newpos = avatarpos;
149 uint neighbourx = this.m_regionData.RegionLocX; 149 uint neighbourx = this.m_regionData.RegionLocX;
150 uint neighboury = this.m_regionData.RegionLocY; 150 uint neighboury = this.m_regionData.RegionLocY;
@@ -642,6 +642,13 @@ namespace OpenSim
642 } 642 }
643 } 643 }
644 break; 644 break;
645 case PacketType.MapLayerRequest:
646 this.RequestMapLayer();
647 break;
648 case PacketType.MapBlockRequest:
649 MapBlockRequestPacket MapRequest = (MapBlockRequestPacket)Pack;
650 this.RequestMapBlock( MapRequest.PositionData.MinX, MapRequest.PositionData.MinY, MapRequest.PositionData.MaxX, MapRequest.PositionData.MaxY);
651 break;
645 652
646 } 653 }
647 } 654 }
@@ -1101,7 +1108,7 @@ namespace OpenSim
1101 1108
1102 case 3: // Landmark 1109 case 3: // Landmark
1103 String content; 1110 String content;
1104 content = "Landmark version 2\n"; 1111 content = "Landmark version 2\n";
1105 content += "region_id " + m_regionData.SimUUID + "\n"; 1112 content += "region_id " + m_regionData.SimUUID + "\n";
1106 String strPos = String.Format("%.2f %.2f %.2f>", 1113 String strPos = String.Format("%.2f %.2f %.2f>",
1107 this.ClientAvatar.Pos.X, 1114 this.ClientAvatar.Pos.X,
@@ -1116,5 +1123,29 @@ namespace OpenSim
1116 m_assetCache.AddAsset(asset); 1123 m_assetCache.AddAsset(asset);
1117 m_inventoryCache.AddNewInventoryItem(this, packet.InventoryBlock.FolderID, asset); 1124 m_inventoryCache.AddNewInventoryItem(this, packet.InventoryBlock.FolderID, asset);
1118 } 1125 }
1126
1127 public void RequestMapLayer() //should be getting the map layer from the grid server
1128 {
1129 //send a layer covering the 800,800 - 1200,1200 area (should be covering the requested area)
1130 MapLayerReplyPacket mapReply = new MapLayerReplyPacket();
1131 mapReply.AgentData.AgentID = this.AgentID;
1132 mapReply.AgentData.Flags = 0;
1133 mapReply.LayerData = new MapLayerReplyPacket.LayerDataBlock[1];
1134 mapReply.LayerData[0] = new MapLayerReplyPacket.LayerDataBlock();
1135 mapReply.LayerData[0].Bottom = 800;
1136 mapReply.LayerData[0].Left = 800;
1137 mapReply.LayerData[0].Top = 1200;
1138 mapReply.LayerData[0].Right = 1200;
1139 mapReply.LayerData[0].ImageID = new LLUUID("00000000-0000-0000-9999-000000000001");
1140 this.OutPacket(mapReply);
1141 }
1142
1143 public void RequestMapBlock( int minX, int minY, int maxX, int maxY)
1144 {
1145 //check if our own map was requested
1146 this.m_world.RequestMapBlock(this, minX, minY, maxX, maxY);
1147
1148 //now should get other regions maps from gridserver
1149 }
1119 } 1150 }
1120} 1151}