From 22f25fae387a801e8545f6ab6e2c9700926ae6e4 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 29 Jun 2011 00:28:22 +0100 Subject: Hack around with the NPC module to get osNpcCreate() partially working again. This now creates an avatar but appearance is always cloudy. Move doesn't work. Really, creating an NPC should only involve a ScenePresence rather than doing anything with IClientAPI, since an NPC has no viewer to communicate with! --- OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs | 2 +- OpenSim/Region/Framework/Scenes/Scene.cs | 4 +++- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 ++---- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs b/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs index 22795fc..d0e5609 100644 --- a/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs +++ b/OpenSim/Region/Framework/Interfaces/IAvatarFactory.cs @@ -36,4 +36,4 @@ namespace OpenSim.Region.Framework.Interfaces void QueueAppearanceSend(UUID agentid); void QueueAppearanceSave(UUID agentid); } -} +} \ No newline at end of file diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index bdf3d1d..ad41e88 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2593,8 +2593,10 @@ namespace OpenSim.Region.Framework.Scenes { string homeURL = string.Empty; string first = aCircuit.firstname, last = aCircuit.lastname; + if (aCircuit.ServiceURLs.ContainsKey("HomeURI")) homeURL = aCircuit.ServiceURLs["HomeURI"].ToString(); + if (aCircuit.lastname.StartsWith("@")) { string[] parts = aCircuit.firstname.Split('.'); @@ -2604,6 +2606,7 @@ namespace OpenSim.Region.Framework.Scenes last = parts[1]; } } + uMan.AddUser(aCircuit.AgentID, first, last, homeURL); } } @@ -3389,7 +3392,6 @@ namespace OpenSim.Region.Framework.Scenes } } - // In all cases, add or update the circuit data with the new agent circuit data and teleport flags agent.teleportFlags = teleportFlags; m_authenticateHandler.AddNewCircuit(agent.circuitcode, agent); diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 80aafd0..83b761c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1944,10 +1944,9 @@ namespace OpenSim.Region.Framework.Scenes m_log.Warn("Sit requested on unknown object: " + targetID.ToString()); } - - SendSitResponse(remoteClient, targetID, offset, Quaternion.Identity); } + /* public void SitRayCastAvatarPosition(SceneObjectPart part) { @@ -2380,7 +2379,6 @@ namespace OpenSim.Region.Framework.Scenes /// public void SendTerseUpdateToClient(IClientAPI remoteClient) { - // If the client is inactive, it's getting its updates from another // server. if (remoteClient.IsActive) @@ -2495,7 +2493,7 @@ namespace OpenSim.Region.Framework.Scenes } // If we aren't using a cached appearance, then clear out the baked textures - if (! cachedappearance) + if (!cachedappearance) { m_appearance.ResetAppearance(); if (m_scene.AvatarFactory != null) -- cgit v1.1