aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs20
1 files changed, 11 insertions, 9 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 78fe096..9ec4740 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -176,7 +176,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
176 lock (m_avatars) 176 lock (m_avatars)
177 { 177 {
178 scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode, acd); 178 scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode, acd);
179 scene.AddNewClient(npcAvatar, PresenceType.Npc); 179 scene.AddNewAgent(npcAvatar, PresenceType.Npc);
180 180
181 ScenePresence sp; 181 ScenePresence sp;
182 if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) 182 if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp))
@@ -207,8 +207,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
207 if (scene.TryGetScenePresence(agentID, out sp)) 207 if (scene.TryGetScenePresence(agentID, out sp))
208 { 208 {
209// m_log.DebugFormat( 209// m_log.DebugFormat(
210// "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}", 210// "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}",
211// sp.Name, pos, scene.RegionInfo.RegionName, noFly, landAtTarget); 211// sp.Name, pos, scene.RegionInfo.RegionName,
212// noFly, landAtTarget);
212 213
213 sp.MoveToTarget(pos, noFly, landAtTarget); 214 sp.MoveToTarget(pos, noFly, landAtTarget);
214 sp.SetAlwaysRun = running; 215 sp.SetAlwaysRun = running;
@@ -285,9 +286,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
285 ScenePresence sp; 286 ScenePresence sp;
286 if (scene.TryGetScenePresence(agentID, out sp)) 287 if (scene.TryGetScenePresence(agentID, out sp))
287 { 288 {
288 sp.HandleAgentRequestSit(m_avatars[agentID], agentID, 289 sp.HandleAgentRequestSit(m_avatars[agentID], agentID, partID, Vector3.Zero);
289 partID, Vector3.Zero);
290 //sp.HandleAgentSit(m_avatars[agentID], agentID);
291 290
292 return true; 291 return true;
293 } 292 }
@@ -378,11 +377,14 @@ namespace OpenSim.Region.OptionalModules.World.NPC
378 agentID, av.Name); 377 agentID, av.Name);
379 */ 378 */
380 379
381 scene.IncomingCloseAgent(agentID, false); 380 scene.CloseAgent(agentID, false);
382// scene.RemoveClient(agentID, false); 381
383 m_avatars.Remove(agentID); 382 m_avatars.Remove(agentID);
384 383
385// m_log.DebugFormat("[NPC MODULE]: Removed NPC {0} {1}", agentID, av.Name); 384 /*
385 m_log.DebugFormat("[NPC MODULE]: Removed NPC {0} {1}",
386 agentID, av.Name);
387 */
386 return true; 388 return true;
387 } 389 }
388 } 390 }