aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs')
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs47
1 files changed, 29 insertions, 18 deletions
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
index 4cf6ac2..f8425da 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
@@ -158,7 +158,6 @@ namespace OpenSim
158 } 158 }
159 break; 159 break;
160 case PacketType.CompleteAgentMovement: 160 case PacketType.CompleteAgentMovement:
161 if (this.m_child) this.UpgradeClient();
162 if (OnCompleteMovementToRegion != null) 161 if (OnCompleteMovementToRegion != null)
163 { 162 {
164 OnCompleteMovementToRegion(); 163 OnCompleteMovementToRegion();
@@ -396,8 +395,11 @@ namespace OpenSim
396 break; 395 break;
397 case PacketType.MapBlockRequest: 396 case PacketType.MapBlockRequest:
398 MapBlockRequestPacket MapRequest = (MapBlockRequestPacket)Pack; 397 MapBlockRequestPacket MapRequest = (MapBlockRequestPacket)Pack;
399 398 if (OnRequestMapBlocks != null)
400 this.RequestMapBlocks(MapRequest.PositionData.MinX, MapRequest.PositionData.MinY, MapRequest.PositionData.MaxX, MapRequest.PositionData.MaxY); 399 {
400 OnRequestMapBlocks(this, MapRequest.PositionData.MinX, MapRequest.PositionData.MinY, MapRequest.PositionData.MaxX, MapRequest.PositionData.MaxY);
401 }
402 //this.RequestMapBlocks(MapRequest.PositionData.MinX, MapRequest.PositionData.MinY, MapRequest.PositionData.MaxX, MapRequest.PositionData.MaxY);
401 break; 403 break;
402 case PacketType.TeleportLandmarkRequest: 404 case PacketType.TeleportLandmarkRequest:
403 TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack; 405 TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack;
@@ -449,16 +451,25 @@ namespace OpenSim
449 break; 451 break;
450 case PacketType.TeleportLocationRequest: 452 case PacketType.TeleportLocationRequest:
451 TeleportLocationRequestPacket tpLocReq = (TeleportLocationRequestPacket)Pack; 453 TeleportLocationRequestPacket tpLocReq = (TeleportLocationRequestPacket)Pack;
452 Console.WriteLine(tpLocReq.ToString()); 454 // Console.WriteLine(tpLocReq.ToString());
453 455
454 tpStart = new TeleportStartPacket(); 456 if (OnTeleportLocationRequest != null)
455 tpStart.Info.TeleportFlags = 16; // Teleport via location 457 {
456 Console.WriteLine(tpStart.ToString()); 458 OnTeleportLocationRequest(this, tpLocReq.Info.RegionHandle, tpLocReq.Info.Position, tpLocReq.Info.LookAt, 16);
457 OutPacket(tpStart); 459 }
460 else
461 {
462 //no event handler so cancel request
463 TeleportCancelPacket tpCancel = new TeleportCancelPacket();
464 tpCancel.Info.SessionID = tpLocReq.AgentData.SessionID;
465 tpCancel.Info.AgentID = tpLocReq.AgentData.AgentID;
458 466
459 if (m_regionData.RegionHandle != tpLocReq.Info.RegionHandle) 467 OutPacket(tpCancel);
468 }
469
470 /* if (m_regionData.RegionHandle != tpLocReq.Info.RegionHandle)
460 { 471 {
461 /* m_gridServer.getRegion(tpLocReq.Info.RegionHandle); */ 472 // m_gridServer.getRegion(tpLocReq.Info.RegionHandle);
462 Console.WriteLine("Inter-sim teleport not yet implemented"); 473 Console.WriteLine("Inter-sim teleport not yet implemented");
463 TeleportCancelPacket tpCancel = new TeleportCancelPacket(); 474 TeleportCancelPacket tpCancel = new TeleportCancelPacket();
464 tpCancel.Info.SessionID = tpLocReq.AgentData.SessionID; 475 tpCancel.Info.SessionID = tpLocReq.AgentData.SessionID;
@@ -469,15 +480,15 @@ namespace OpenSim
469 else 480 else
470 { 481 {
471 Console.WriteLine("Local teleport"); 482 Console.WriteLine("Local teleport");
472 TeleportLocalPacket tpLocal = new TeleportLocalPacket(); 483 TeleportLocalPacket tpLocal2 = new TeleportLocalPacket();
473 tpLocal.Info.AgentID = tpLocReq.AgentData.AgentID; 484 tpLocal2.Info.AgentID = tpLocReq.AgentData.AgentID;
474 tpLocal.Info.TeleportFlags = tpStart.Info.TeleportFlags; 485 tpLocal2.Info.TeleportFlags = tpStart.Info.TeleportFlags;
475 tpLocal.Info.LocationID = 2; 486 tpLocal2.Info.LocationID = 2;
476 tpLocal.Info.LookAt = tpLocReq.Info.LookAt; 487 tpLocal2.Info.LookAt = tpLocReq.Info.LookAt;
477 tpLocal.Info.Position = tpLocReq.Info.Position; 488 tpLocal2.Info.Position = tpLocReq.Info.Position;
478 OutPacket(tpLocal); 489 OutPacket(tpLocal2);
479 490
480 } 491 }*/
481 break; 492 break;
482 #endregion 493 #endregion
483 494