- Added SendScriptTeleportRequest to IClientView and classes implementing it.
- Implemented llMapDestination.0.6.0-stable
							parent
							
								
									9d7a9d3461
								
							
						
					
					
						commit
						b1c1de2fbe
					
				| 
						 | 
				
			
			@ -759,6 +759,7 @@ namespace OpenSim.Framework
 | 
			
		|||
 | 
			
		||||
        void SendRegionHandle(UUID regoinID, ulong handle);
 | 
			
		||||
        void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y);
 | 
			
		||||
        void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt);
 | 
			
		||||
        void KillEndDone();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6631,6 +6631,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
 | 
			
		|||
            OutPacket(reply, ThrottleOutPacketType.Land);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt)
 | 
			
		||||
        {
 | 
			
		||||
            ScriptTeleportRequestPacket packet = (ScriptTeleportRequestPacket)PacketPool.Instance.GetPacket(PacketType.ScriptTeleportRequest);
 | 
			
		||||
 | 
			
		||||
            packet.Data.ObjectName = Utils.StringToBytes(objName);
 | 
			
		||||
            packet.Data.SimName = Utils.StringToBytes(simName);
 | 
			
		||||
            packet.Data.SimPosition = pos;
 | 
			
		||||
            packet.Data.LookAt = lookAt;
 | 
			
		||||
 | 
			
		||||
            OutPacket(packet, ThrottleOutPacketType.Task);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void SetClientOption(string option, string value)
 | 
			
		||||
        {
 | 
			
		||||
            switch (option)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -883,6 +883,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
 | 
			
		|||
            return string.Empty;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void SendScriptTeleportRequest (string objName, string simName, Vector3 pos, Vector3 lookAt)
 | 
			
		||||
        {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void KillEndDone()
 | 
			
		||||
        {
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -880,6 +880,10 @@ namespace OpenSim.Region.Examples.SimpleModule
 | 
			
		|||
            return string.Empty;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt)
 | 
			
		||||
        {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void KillEndDone()
 | 
			
		||||
        {
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7624,10 +7624,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
 | 
			
		|||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void llMapDestination(string simname, LSL_Vector pos, LSL_Vector look_at)
 | 
			
		||||
        public void llMapDestination(string simname, LSL_Vector pos, LSL_Vector lookAt)
 | 
			
		||||
        {
 | 
			
		||||
            m_host.AddScriptLPS(1);
 | 
			
		||||
            NotImplemented("llMapDestination");
 | 
			
		||||
            DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, 0);
 | 
			
		||||
            if (d == null) return; // only works on the first detected avatar
 | 
			
		||||
 | 
			
		||||
            ScenePresence avatar = World.GetScenePresence(d.Key);
 | 
			
		||||
            if (avatar != null)
 | 
			
		||||
            {
 | 
			
		||||
                avatar.ControllingClient.SendScriptTeleportRequest(m_host.Name, simname,
 | 
			
		||||
                                                                   new Vector3((float)pos.x, (float)pos.y, (float)pos.z),
 | 
			
		||||
                                                                   new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z));
 | 
			
		||||
            }
 | 
			
		||||
            // ScriptSleep(1000);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue