From 6821ace3c6b6eb5a38e49f38ba3fd492eda15843 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 26 Oct 2015 21:56:02 +0000 Subject: add basic SendFindAgent() to lludp. Future use may require a list of pairs (X,Y). For now one pair is good enough. --- OpenSim/Framework/IClientAPI.cs | 2 ++ .../Region/ClientStack/Linden/UDP/LLClientView.cs | 20 ++++++++++++++++++-- .../InternetRelayClientView/Server/IRCClientView.cs | 4 ++++ .../Region/OptionalModules/World/NPC/NPCAvatar.cs | 12 +++++++++--- OpenSim/Tests/Common/Mock/TestClient.cs | 9 +++++++-- 5 files changed, 40 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index a76c89e..85edce3 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -1392,6 +1392,8 @@ namespace OpenSim.Framework void SendAgentOnline(UUID[] agentIDs); + void SendFindAgent(UUID HunterID, UUID PreyID, double GlobalX, double GlobalY); + void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook); diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 6667c35..51c59e9 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -2705,8 +2705,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(offp, ThrottleOutPacketType.Task); } - public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, - Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) + public void SendFindAgent(UUID HunterID, UUID PreyID, double GlobalX, double GlobalY) + { + FindAgentPacket fap = new FindAgentPacket(); + fap.AgentBlock.Hunter = HunterID; + fap.AgentBlock.Prey = PreyID; + fap.AgentBlock.SpaceIP = 0; + + fap.LocationBlock = new FindAgentPacket.LocationBlockBlock[1]; + fap.LocationBlock[0] = new FindAgentPacket.LocationBlockBlock(); + fap.LocationBlock[0].GlobalX = GlobalX; + fap.LocationBlock[0].GlobalY = GlobalY; + + OutPacket(fap, ThrottleOutPacketType.Task); + } + + public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, + Quaternion SitOrientation, bool autopilot, + Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) { AvatarSitResponsePacket avatarSitResponse = new AvatarSitResponsePacket(); avatarSitResponse.SitObject.ID = TargetID; diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 6a96d4d..6611744 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1375,6 +1375,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } + public void SendFindAgent(UUID HunterID, UUID PreyID, double GlobalX, double GlobalY) + { + } + public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) { diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 15e3884..7228348 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -191,9 +191,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC { } - - public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, - Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) + + public void SendFindAgent(UUID HunterID, UUID PreyID, double GlobalX, double GlobalY) + { + + } + + public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, + Quaternion SitOrientation, bool autopilot, + Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) { } diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 76ee5c2..ff7ba00 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs @@ -943,8 +943,13 @@ namespace OpenSim.Tests.Common ReceivedOnlineNotifications.AddRange(agentIDs); } - public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, - Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) + public void SendFindAgent(UUID HunterID, UUID PreyID, double GlobalX, double GlobalY) + { + } + + public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, + Quaternion SitOrientation, bool autopilot, + Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) { } -- cgit v1.1