aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorHomer Horwitz2008-10-01 21:30:48 +0000
committerHomer Horwitz2008-10-01 21:30:48 +0000
commitb1c1de2fbeeaba34f2daa96a34a14cc9cb4effa8 (patch)
treebf69f8cbf479207758b384f2ccc371996f4ea1c3 /OpenSim
parentstick a TODO in here about land tests, which really can't be done in (diff)
downloadopensim-SC-b1c1de2fbeeaba34f2daa96a34a14cc9cb4effa8.zip
opensim-SC-b1c1de2fbeeaba34f2daa96a34a14cc9cb4effa8.tar.gz
opensim-SC-b1c1de2fbeeaba34f2daa96a34a14cc9cb4effa8.tar.bz2
opensim-SC-b1c1de2fbeeaba34f2daa96a34a14cc9cb4effa8.tar.xz
- Added SendScriptTeleportRequest to IClientView and classes implementing it.
- Implemented llMapDestination.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/IClientAPI.cs1
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs4
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs13
5 files changed, 32 insertions, 2 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index ddd1cd3..ad4e22b 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -759,6 +759,7 @@ namespace OpenSim.Framework
759 759
760 void SendRegionHandle(UUID regoinID, ulong handle); 760 void SendRegionHandle(UUID regoinID, ulong handle);
761 void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y); 761 void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y);
762 void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt);
762 void KillEndDone(); 763 void KillEndDone();
763 } 764 }
764} 765}
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 1aff886..692de46 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -6631,6 +6631,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6631 OutPacket(reply, ThrottleOutPacketType.Land); 6631 OutPacket(reply, ThrottleOutPacketType.Land);
6632 } 6632 }
6633 6633
6634 public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt)
6635 {
6636 ScriptTeleportRequestPacket packet = (ScriptTeleportRequestPacket)PacketPool.Instance.GetPacket(PacketType.ScriptTeleportRequest);
6637
6638 packet.Data.ObjectName = Utils.StringToBytes(objName);
6639 packet.Data.SimName = Utils.StringToBytes(simName);
6640 packet.Data.SimPosition = pos;
6641 packet.Data.LookAt = lookAt;
6642
6643 OutPacket(packet, ThrottleOutPacketType.Task);
6644 }
6645
6634 public void SetClientOption(string option, string value) 6646 public void SetClientOption(string option, string value)
6635 { 6647 {
6636 switch (option) 6648 switch (option)
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index 9476571..9300b92 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -883,6 +883,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
883 return string.Empty; 883 return string.Empty;
884 } 884 }
885 885
886 public void SendScriptTeleportRequest (string objName, string simName, Vector3 pos, Vector3 lookAt)
887 {
888 }
889
886 public void KillEndDone() 890 public void KillEndDone()
887 { 891 {
888 } 892 }
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 1967318..2b8bcb1 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -880,6 +880,10 @@ namespace OpenSim.Region.Examples.SimpleModule
880 return string.Empty; 880 return string.Empty;
881 } 881 }
882 882
883 public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt)
884 {
885 }
886
883 public void KillEndDone() 887 public void KillEndDone()
884 { 888 {
885 } 889 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index c2b16cf..39e24b4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7624,10 +7624,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7624 } 7624 }
7625 } 7625 }
7626 7626
7627 public void llMapDestination(string simname, LSL_Vector pos, LSL_Vector look_at) 7627 public void llMapDestination(string simname, LSL_Vector pos, LSL_Vector lookAt)
7628 { 7628 {
7629 m_host.AddScriptLPS(1); 7629 m_host.AddScriptLPS(1);
7630 NotImplemented("llMapDestination"); 7630 DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, 0);
7631 if (d == null) return; // only works on the first detected avatar
7632
7633 ScenePresence avatar = World.GetScenePresence(d.Key);
7634 if (avatar != null)
7635 {
7636 avatar.ControllingClient.SendScriptTeleportRequest(m_host.Name, simname,
7637 new Vector3((float)pos.x, (float)pos.y, (float)pos.z),
7638 new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z));
7639 }
7631 // ScriptSleep(1000); 7640 // ScriptSleep(1000);
7632 } 7641 }
7633 7642