aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs51
1 files changed, 41 insertions, 10 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 9c56c52..7a3cff1 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -227,6 +227,7 @@ namespace OpenSim.Region.ClientStack
227 private UpdatePrimGroupRotation handlerUpdatePrimGroupRotation = null; //OnUpdatePrimGroupMouseRotation; 227 private UpdatePrimGroupRotation handlerUpdatePrimGroupRotation = null; //OnUpdatePrimGroupMouseRotation;
228 private PacketStats handlerPacketStats = null; // OnPacketStats;# 228 private PacketStats handlerPacketStats = null; // OnPacketStats;#
229 private RequestAsset handlerRequestAsset = null; // OnRequestAsset; 229 private RequestAsset handlerRequestAsset = null; // OnRequestAsset;
230 private UUIDNameRequest handlerTeleportHomeRequest = null;
230 231
231 232
232 /* Properties */ 233 /* Properties */
@@ -776,6 +777,7 @@ namespace OpenSim.Region.ClientStack
776 public event MoneyBalanceRequest OnMoneyBalanceRequest; 777 public event MoneyBalanceRequest OnMoneyBalanceRequest;
777 public event ParcelBuy OnParcelBuy; 778 public event ParcelBuy OnParcelBuy;
778 779
780 public event UUIDNameRequest OnTeleportHomeRequest;
779 781
780 #region Scene/Avatar to Client 782 #region Scene/Avatar to Client
781 783
@@ -4188,19 +4190,48 @@ namespace OpenSim.Region.ClientStack
4188 case PacketType.TeleportLandmarkRequest: 4190 case PacketType.TeleportLandmarkRequest:
4189 TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack; 4191 TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack;
4190 LLUUID lmid = tpReq.Info.LandmarkID; 4192 LLUUID lmid = tpReq.Info.LandmarkID;
4191 AssetBase lma = m_assetCache.GetAsset(lmid, false); 4193 AssetLandmark lm;
4192 4194 if (lmid != LLUUID.Zero)
4193 if(lma == null)
4194 { 4195 {
4195 // Failed to find landmark 4196 AssetBase lma = m_assetCache.GetAsset(lmid, false);
4196 4197
4197 TeleportCancelPacket tpCancel = (TeleportCancelPacket)PacketPool.Instance.GetPacket(PacketType.TeleportCancel); 4198 if (lma == null)
4198 tpCancel.Info.SessionID = tpReq.Info.SessionID; 4199 {
4199 tpCancel.Info.AgentID = tpReq.Info.AgentID; 4200 // Failed to find landmark
4200 OutPacket(tpCancel, ThrottleOutPacketType.Task); 4201
4202 TeleportCancelPacket tpCancel = (TeleportCancelPacket)PacketPool.Instance.GetPacket(PacketType.TeleportCancel);
4203 tpCancel.Info.SessionID = tpReq.Info.SessionID;
4204 tpCancel.Info.AgentID = tpReq.Info.AgentID;
4205 OutPacket(tpCancel, ThrottleOutPacketType.Task);
4206 }
4207
4208
4209 try
4210 {
4211 lm = new AssetLandmark(lma);
4212 }
4213 catch (NullReferenceException)
4214 {
4215 // asset not found generates null ref inside the assetlandmark constructor.
4216 TeleportCancelPacket tpCancel = (TeleportCancelPacket)PacketPool.Instance.GetPacket(PacketType.TeleportCancel);
4217 tpCancel.Info.SessionID = tpReq.Info.SessionID;
4218 tpCancel.Info.AgentID = tpReq.Info.AgentID;
4219 OutPacket(tpCancel, ThrottleOutPacketType.Task);
4220 break;
4221 }
4222 }
4223 else
4224 {
4225
4226 // Teleport home request
4227 handlerTeleportHomeRequest = OnTeleportHomeRequest;
4228 if (handlerTeleportHomeRequest != null)
4229 {
4230 handlerTeleportHomeRequest(this.AgentId,this);
4231 }
4232 break;
4201 } 4233 }
4202 4234
4203 AssetLandmark lm = new AssetLandmark(lma);
4204 handlerTeleportLandmarkRequest = OnTeleportLandmarkRequest; 4235 handlerTeleportLandmarkRequest = OnTeleportLandmarkRequest;
4205 if (handlerTeleportLandmarkRequest != null) 4236 if (handlerTeleportLandmarkRequest != null)
4206 { 4237 {