diff options
author | UbitUmarov | 2012-02-10 23:03:30 +0000 |
---|---|---|
committer | UbitUmarov | 2012-02-10 23:03:30 +0000 |
commit | e3f5fd81f1bdcccb5fb0cad75d85bf1f733667d7 (patch) | |
tree | 0fff77027caf8e6ba723489c45e0cf1cb77bb0ec /OpenSim/Region/OptionalModules | |
parent | Changes to vehicles code etc. Includes some debug aids to remove later. (diff) | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC-e3f5fd81f1bdcccb5fb0cad75d85bf1f733667d7.zip opensim-SC-e3f5fd81f1bdcccb5fb0cad75d85bf1f733667d7.tar.gz opensim-SC-e3f5fd81f1bdcccb5fb0cad75d85bf1f733667d7.tar.bz2 opensim-SC-e3f5fd81f1bdcccb5fb0cad75d85bf1f733667d7.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork
Conflicts:
prebuild.xml
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | 3 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 03b52c0..d0b822c 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
44 | private readonly string m_firstname; | 44 | private readonly string m_firstname; |
45 | private readonly string m_lastname; | 45 | private readonly string m_lastname; |
46 | private readonly Vector3 m_startPos; | 46 | private readonly Vector3 m_startPos; |
47 | private readonly UUID m_uuid = UUID.Random(); | 47 | private UUID m_uuid = UUID.Random(); |
48 | private readonly Scene m_scene; | 48 | private readonly Scene m_scene; |
49 | private readonly UUID m_ownerID; | 49 | private readonly UUID m_ownerID; |
50 | 50 | ||
@@ -444,6 +444,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
444 | public virtual UUID AgentId | 444 | public virtual UUID AgentId |
445 | { | 445 | { |
446 | get { return m_uuid; } | 446 | get { return m_uuid; } |
447 | set { m_uuid = value; } | ||
447 | } | 448 | } |
448 | 449 | ||
449 | public UUID SessionId | 450 | public UUID SessionId |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 3ea7352..6803644 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -155,20 +155,21 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
155 | "[NPC MODULE]: Successfully retrieved scene presence for NPC {0} {1}", sp.Name, sp.UUID); | 155 | "[NPC MODULE]: Successfully retrieved scene presence for NPC {0} {1}", sp.Name, sp.UUID); |
156 | 156 | ||
157 | sp.CompleteMovement(npcAvatar, false); | 157 | sp.CompleteMovement(npcAvatar, false); |
158 | m_avatars.Add(npcAvatar.AgentId, npcAvatar); | ||
158 | } | 159 | } |
159 | else | 160 | else |
160 | { | 161 | { |
161 | 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 | npcAvatar.AgentId = UUID.Zero; | ||
162 | } | 164 | } |
163 | 165 | ||
164 | m_avatars.Add(npcAvatar.AgentId, npcAvatar); | ||
165 | } | 166 | } |
166 | ev.Set(); | 167 | ev.Set(); |
167 | }); | 168 | }); |
168 | 169 | ||
169 | ev.WaitOne(); | 170 | ev.WaitOne(); |
170 | 171 | ||
171 | m_log.DebugFormat("[NPC MODULE]: Created NPC with id {0}", npcAvatar.AgentId); | 172 | // m_log.DebugFormat("[NPC MODULE]: Created NPC with id {0}", npcAvatar.AgentId); |
172 | 173 | ||
173 | return npcAvatar.AgentId; | 174 | return npcAvatar.AgentId; |
174 | } | 175 | } |
@@ -299,13 +300,16 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
299 | NPCAvatar av; | 300 | NPCAvatar av; |
300 | if (m_avatars.TryGetValue(agentID, out av)) | 301 | if (m_avatars.TryGetValue(agentID, out av)) |
301 | { | 302 | { |
303 | // m_log.DebugFormat("[NPC MODULE]: Found {0} {1} to remove", agentID, av.Name); | ||
302 | scene.RemoveClient(agentID, false); | 304 | scene.RemoveClient(agentID, false); |
303 | m_avatars.Remove(agentID); | 305 | m_avatars.Remove(agentID); |
304 | 306 | ||
307 | // m_log.DebugFormat("[NPC MODULE]: Removed {0} {1}", agentID, av.Name); | ||
305 | return true; | 308 | return true; |
306 | } | 309 | } |
307 | } | 310 | } |
308 | 311 | ||
312 | // m_log.DebugFormat("[NPC MODULE]: Could not find {0} to remove", agentID); | ||
309 | return false; | 313 | return false; |
310 | } | 314 | } |
311 | 315 | ||