aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs15
1 files changed, 7 insertions, 8 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 8701431..dc6eefc 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -148,22 +148,21 @@ namespace OpenSim.Region.OptionalModules.World.NPC
148 ScenePresence sp; 148 ScenePresence sp;
149 if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) 149 if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp))
150 { 150 {
151 m_log.DebugFormat( 151// m_log.DebugFormat(
152 "[NPC MODULE]: Successfully retrieved scene presence for NPC {0} {1}", sp.Name, sp.UUID); 152// "[NPC MODULE]: Successfully retrieved scene presence for NPC {0} {1}", sp.Name, sp.UUID);
153 153
154 sp.CompleteMovement(npcAvatar, false); 154 sp.CompleteMovement(npcAvatar, false);
155 m_avatars.Add(npcAvatar.AgentId, npcAvatar);
156 m_log.DebugFormat("[NPC MODULE]: Created NPC with id {0}", npcAvatar.AgentId);
157
158 return npcAvatar.AgentId;
155 } 159 }
156 else 160 else
157 { 161 {
158 m_log.WarnFormat("[NPC MODULE]: Could not find scene presence for NPC {0} {1}", sp.Name, sp.UUID); 162 m_log.WarnFormat("[NPC MODULE]: Could not find scene presence for NPC {0} {1}", sp.Name, sp.UUID);
163 return UUID.Zero;
159 } 164 }
160
161 m_avatars.Add(npcAvatar.AgentId, npcAvatar);
162 } 165 }
163
164 m_log.DebugFormat("[NPC MODULE]: Created NPC with id {0}", npcAvatar.AgentId);
165
166 return npcAvatar.AgentId;
167 } 166 }
168 167
169 public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget) 168 public bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget)