mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 12:25:42 +08:00
Merge commit 'de161585c0960a93911f446f0179441ba5470245' into bigmerge
This commit is contained in:
@@ -217,6 +217,23 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool Stand(UUID agentID, Scene scene)
|
||||
{
|
||||
lock (m_avatars)
|
||||
{
|
||||
if (m_avatars.ContainsKey(agentID))
|
||||
{
|
||||
ScenePresence sp;
|
||||
scene.TryGetScenePresence(agentID, out sp);
|
||||
sp.StandUp();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool DeleteNPC(UUID agentID, Scene scene)
|
||||
{
|
||||
lock (m_avatars)
|
||||
|
||||
@@ -231,7 +231,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestSit()
|
||||
public void TestSitAndStand()
|
||||
{
|
||||
TestHelpers.InMethod();
|
||||
// log4net.Config.XmlConfigurator.Configure();
|
||||
@@ -249,9 +249,13 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
|
||||
part.SitTargetPosition = new Vector3(0, 0, 1);
|
||||
npcModule.Sit(npc.UUID, part.UUID, scene);
|
||||
|
||||
// Assertions?
|
||||
Assert.That(part.SitTargetAvatar, Is.EqualTo(npcId));
|
||||
Assert.That(npc.ParentID, Is.EqualTo(part.LocalId));
|
||||
|
||||
npcModule.Stand(npc.UUID, scene);
|
||||
|
||||
Assert.That(part.SitTargetAvatar, Is.EqualTo(UUID.Zero));
|
||||
Assert.That(npc.ParentID, Is.EqualTo(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user