aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2014-08-02 18:57:43 +0100
committerUbitUmarov2014-08-02 18:57:43 +0100
commit01981fdf58dfe70c6df5ac514ca67fbd1ad2bc18 (patch)
treeaef4a0abf50e8cc6a2d3613a18aac801320254c0 /OpenSim
parent add some filters for NPCs (diff)
downloadopensim-SC-01981fdf58dfe70c6df5ac514ca67fbd1ad2bc18.zip
opensim-SC-01981fdf58dfe70c6df5ac514ca67fbd1ad2bc18.tar.gz
opensim-SC-01981fdf58dfe70c6df5ac514ca67fbd1ad2bc18.tar.bz2
opensim-SC-01981fdf58dfe70c6df5ac514ca67fbd1ad2bc18.tar.xz
dont fire a thread on npc creation keeping the main one just waiting
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 9ec4740..226608a 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -170,9 +170,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
170 } 170 }
171 */ 171 */
172 172
173 ManualResetEvent ev = new ManualResetEvent(false); 173// ManualResetEvent ev = new ManualResetEvent(false);
174 174
175 Util.FireAndForget(delegate(object x) { 175// Util.FireAndForget(delegate(object x) {
176 lock (m_avatars) 176 lock (m_avatars)
177 { 177 {
178 scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode, acd); 178 scene.AuthenticateHandler.AddNewCircuit(npcAvatar.CircuitCode, acd);
@@ -181,15 +181,16 @@ namespace OpenSim.Region.OptionalModules.World.NPC
181 ScenePresence sp; 181 ScenePresence sp;
182 if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp)) 182 if (scene.TryGetScenePresence(npcAvatar.AgentId, out sp))
183 { 183 {
184
184 sp.CompleteMovement(npcAvatar, false); 185 sp.CompleteMovement(npcAvatar, false);
185 m_avatars.Add(npcAvatar.AgentId, npcAvatar); 186 m_avatars.Add(npcAvatar.AgentId, npcAvatar);
186// m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}", npcAvatar.AgentId, sp.Name); 187// m_log.DebugFormat("[NPC MODULE]: Created NPC {0} {1}", npcAvatar.AgentId, sp.Name);
187 } 188 }
188 } 189 }
189 ev.Set(); 190// ev.Set();
190 }); 191// });
191 192
192 ev.WaitOne(); 193// ev.WaitOne();
193 194
194// m_log.DebugFormat("[NPC MODULE]: Created NPC with id {0}", npcAvatar.AgentId); 195// m_log.DebugFormat("[NPC MODULE]: Created NPC with id {0}", npcAvatar.AgentId);
195 196