From a08f01fa8323e18a63e920158c7f51ae78ac0e93 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 26 Jul 2013 18:43:15 +0100 Subject: Fix NPC regression test failures. These were genuine failures caused by ScenePresence.CompleteMovement() waiting for an UpdateAgent from NPC introduction that would never come. Instead, we do not wait if the agent is an NPC. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 +++- OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs | 2 +- OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 4044f0c..17da0d9 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1357,11 +1357,13 @@ namespace OpenSim.Region.Framework.Scenes client.Name, Scene.RegionInfo.RegionName, AbsolutePosition); // Make sure it's not a login agent. We don't want to wait for updates during login - if ((m_teleportFlags & TeleportFlags.ViaLogin) == 0) + if (PresenceType != PresenceType.Npc && (m_teleportFlags & TeleportFlags.ViaLogin) == 0) + { // Let's wait until UpdateAgent (called by departing region) is done if (!WaitForUpdateAgent(client)) // The sending region never sent the UpdateAgent data, we have to refuse return; + } Vector3 look = Velocity; diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs index bf23040..f841d5c 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs @@ -155,7 +155,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests public void TestCreateWithAttachments() { TestHelpers.InMethod(); -// log4net.Config.XmlConfigurator.Configure(); +// TestHelpers.EnableLogging(); UUID userId = TestHelpers.ParseTail(0x1); UserAccountHelpers.CreateUserWithInventory(m_scene, userId); diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs index 74f010e..495e684 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs @@ -180,6 +180,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests public void TestOsNpcLoadAppearance() { TestHelpers.InMethod(); + //TestHelpers.EnableLogging(); // Store an avatar with a different height from default in a notecard. UUID userId = TestHelpers.ParseTail(0x1); -- cgit v1.1