From 3b377f16b29a6395d73af1cc987cb9abf9935376 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 28 Mar 2013 22:44:59 +0000 Subject: Fix regression tests by making a new NPC always trigger simulator side attachment code when created. Regression from previous commit c2093ccc. Failed because NPCs don't set the ViaLogin flag --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 4fb9a1b..3a1e758 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -951,7 +951,7 @@ namespace OpenSim.Region.Framework.Scenes // and it has already rezzed the attachments and started their scripts. // We do the following only for non-login agents, because their scripts // haven't started yet. - if ((TeleportFlags & TeleportFlags.ViaLogin) != 0) + if (PresenceType == PresenceType.Npc || (TeleportFlags & TeleportFlags.ViaLogin) != 0) { // We leave a 5 second pause before attempting to rez attachments to avoid a clash with // version 3 viewers that maybe doing their own attachment rezzing related to their current @@ -964,7 +964,7 @@ namespace OpenSim.Region.Framework.Scenes Util.FireAndForget( o => { - if (Util.FireAndForgetMethod != FireAndForgetMethod.None) + if (PresenceType != PresenceType.Npc && Util.FireAndForgetMethod != FireAndForgetMethod.None) System.Threading.Thread.Sleep(5000); Scene.AttachmentsModule.RezAttachments(this); -- cgit v1.1