aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/ClientView.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-04-16 14:10:54 +0000
committerTeravus Ovares2008-04-16 14:10:54 +0000
commit7c1f17b994ca987df2167101054f523cc33d7fb9 (patch)
tree19c74ddb0973e84fb6c2b31493efa4847a7b4f44 /OpenSim/Region/ClientStack/ClientView.cs
parentAfter reading Timer.cs in the mono source, I'm not (diff)
downloadopensim-SC_OLD-7c1f17b994ca987df2167101054f523cc33d7fb9.zip
opensim-SC_OLD-7c1f17b994ca987df2167101054f523cc33d7fb9.tar.gz
opensim-SC_OLD-7c1f17b994ca987df2167101054f523cc33d7fb9.tar.bz2
opensim-SC_OLD-7c1f17b994ca987df2167101054f523cc33d7fb9.tar.xz
* Applying melanie's Landmark patch. Thanks Melanie!
* To make a landmark, you currently have to enable admin options in the advanced menu first. We're working on this.. however use the admin options solution in the mean time.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs51
1 files changed, 19 insertions, 32 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index dba5b38..9c56c52 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -154,6 +154,7 @@ namespace OpenSim.Region.ClientStack
154 private FetchInventory handlerAgentDataUpdateRequest = null; //OnAgentDataUpdateRequest; 154 private FetchInventory handlerAgentDataUpdateRequest = null; //OnAgentDataUpdateRequest;
155 private FetchInventory handlerUserInfoRequest = null; //OnUserInfoRequest; 155 private FetchInventory handlerUserInfoRequest = null; //OnUserInfoRequest;
156 private TeleportLocationRequest handlerSetStartLocationRequest = null; //OnSetStartLocationRequest; 156 private TeleportLocationRequest handlerSetStartLocationRequest = null; //OnSetStartLocationRequest;
157 private TeleportLandmarkRequest handlerTeleportLandmarkRequest = null; //OnTeleportLandmarkRequest;
157 private LinkObjects handlerLinkObjects = null; //OnLinkObjects; 158 private LinkObjects handlerLinkObjects = null; //OnLinkObjects;
158 private DelinkObjects handlerDelinkObjects = null; //OnDelinkObjects; 159 private DelinkObjects handlerDelinkObjects = null; //OnDelinkObjects;
159 private AddNewPrim handlerAddPrim = null; //OnAddPrim; 160 private AddNewPrim handlerAddPrim = null; //OnAddPrim;
@@ -716,6 +717,7 @@ namespace OpenSim.Region.ClientStack
716 public event RequestMapBlocks OnRequestMapBlocks; 717 public event RequestMapBlocks OnRequestMapBlocks;
717 public event RequestMapName OnMapNameRequest; 718 public event RequestMapName OnMapNameRequest;
718 public event TeleportLocationRequest OnTeleportLocationRequest; 719 public event TeleportLocationRequest OnTeleportLocationRequest;
720 public event TeleportLandmarkRequest OnTeleportLandmarkRequest;
719 public event DisconnectUser OnDisconnectUser; 721 public event DisconnectUser OnDisconnectUser;
720 public event RequestAvatarProperties OnRequestAvatarProperties; 722 public event RequestAvatarProperties OnRequestAvatarProperties;
721 public event SetAlwaysRun OnSetAlwaysRun; 723 public event SetAlwaysRun OnSetAlwaysRun;
@@ -4185,50 +4187,35 @@ namespace OpenSim.Region.ClientStack
4185 break; 4187 break;
4186 case PacketType.TeleportLandmarkRequest: 4188 case PacketType.TeleportLandmarkRequest:
4187 TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack; 4189 TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack;
4188
4189 TeleportStartPacket tpStart = (TeleportStartPacket)PacketPool.Instance.GetPacket(PacketType.TeleportStart);
4190 tpStart.Info.TeleportFlags = 8; // tp via lm
4191 OutPacket(tpStart, ThrottleOutPacketType.Task);
4192
4193 TeleportProgressPacket tpProgress = (TeleportProgressPacket)PacketPool.Instance.GetPacket(PacketType.TeleportProgress);
4194 tpProgress.Info.Message = (new UTF8Encoding()).GetBytes("sending_landmark");
4195 tpProgress.Info.TeleportFlags = 8;
4196 tpProgress.AgentData.AgentID = tpReq.Info.AgentID;
4197 OutPacket(tpProgress, ThrottleOutPacketType.Task);
4198
4199 // Fetch landmark
4200 LLUUID lmid = tpReq.Info.LandmarkID; 4190 LLUUID lmid = tpReq.Info.LandmarkID;
4201 AssetBase lma = m_assetCache.GetAsset(lmid, false); 4191 AssetBase lma = m_assetCache.GetAsset(lmid, false);
4202 if (lma != null) 4192
4193 if(lma == null)
4203 { 4194 {
4204 AssetLandmark lm = new AssetLandmark(lma); 4195 // Failed to find landmark
4205 4196
4206 if (lm.RegionID == m_scene.RegionInfo.RegionID) 4197 TeleportCancelPacket tpCancel = (TeleportCancelPacket)PacketPool.Instance.GetPacket(PacketType.TeleportCancel);
4207 { 4198 tpCancel.Info.SessionID = tpReq.Info.SessionID;
4208 TeleportLocalPacket tpLocal = (TeleportLocalPacket)PacketPool.Instance.GetPacket(PacketType.TeleportLocal); 4199 tpCancel.Info.AgentID = tpReq.Info.AgentID;
4200 OutPacket(tpCancel, ThrottleOutPacketType.Task);
4201 }
4209 4202
4210 tpLocal.Info.AgentID = tpReq.Info.AgentID; 4203 AssetLandmark lm = new AssetLandmark(lma);
4211 tpLocal.Info.TeleportFlags = 8; // Teleport via landmark 4204 handlerTeleportLandmarkRequest = OnTeleportLandmarkRequest;
4212 tpLocal.Info.LocationID = 2; 4205 if (handlerTeleportLandmarkRequest != null)
4213 tpLocal.Info.Position = lm.Position; 4206 {
4214 OutPacket(tpLocal, ThrottleOutPacketType.Task); 4207 handlerTeleportLandmarkRequest(this, lm.RegionHandle, lm.Position);
4215 }
4216 else
4217 {
4218 TeleportCancelPacket tpCancel = (TeleportCancelPacket)PacketPool.Instance.GetPacket(PacketType.TeleportCancel);
4219 tpCancel.Info.AgentID = tpReq.Info.AgentID;
4220 tpCancel.Info.SessionID = tpReq.Info.SessionID;
4221 OutPacket(tpCancel, ThrottleOutPacketType.Task);
4222 }
4223 } 4208 }
4224 else 4209 else
4225 { 4210 {
4226 Console.WriteLine("Cancelling Teleport - fetch asset not yet implemented"); 4211 //no event handler so cancel request
4212
4227 4213
4228 TeleportCancelPacket tpCancel = (TeleportCancelPacket)PacketPool.Instance.GetPacket(PacketType.TeleportCancel); 4214 TeleportCancelPacket tpCancel = (TeleportCancelPacket)PacketPool.Instance.GetPacket(PacketType.TeleportCancel);
4229 tpCancel.Info.AgentID = tpReq.Info.AgentID; 4215 tpCancel.Info.AgentID = tpReq.Info.AgentID;
4230 tpCancel.Info.SessionID = tpReq.Info.SessionID; 4216 tpCancel.Info.SessionID = tpReq.Info.SessionID;
4231 OutPacket(tpCancel, ThrottleOutPacketType.Task); 4217 OutPacket(tpCancel, ThrottleOutPacketType.Task);
4218
4232 } 4219 }
4233 break; 4220 break;
4234 case PacketType.TeleportLocationRequest: 4221 case PacketType.TeleportLocationRequest: