aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-12-14 00:10:32 +0000
committerJustin Clark-Casey (justincc)2013-12-14 00:10:32 +0000
commit54cc22976868dcdc0dd0143a0134fba7392af525 (patch)
tree9bb8cadb3677f59a425a95c88ab99ee166be64e9
parentEliminate unnecessary line from my previous commit 1d605642 (diff)
downloadopensim-SC_OLD-54cc22976868dcdc0dd0143a0134fba7392af525.zip
opensim-SC_OLD-54cc22976868dcdc0dd0143a0134fba7392af525.tar.gz
opensim-SC_OLD-54cc22976868dcdc0dd0143a0134fba7392af525.tar.bz2
opensim-SC_OLD-54cc22976868dcdc0dd0143a0134fba7392af525.tar.xz
Fix TestSitAndStandWithNoSitTarget NPC and SP tests.
These stopped working because current code calculates sit heights based on avatar physics rather than appearance data. Also changed BasicPhysics to not divide Z param of all set sizes by 2 - there's no obvious good reason for this and basicphysics is only used in tests
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs8
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs9
3 files changed, 4 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs
index acaeb90..c097a79 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceSitTests.cs
@@ -119,7 +119,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
119 // printing out npc.AbsolutePosition will give <0, 0, 0.8454993> not <0, 0, 0.845499337> 119 // printing out npc.AbsolutePosition will give <0, 0, 0.8454993> not <0, 0, 0.845499337>
120 Assert.That( 120 Assert.That(
121 m_sp.AbsolutePosition, 121 m_sp.AbsolutePosition,
122 Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, 0.845499337f))); 122 Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, sp.PhysicsActor.Size.Z / 2)));
123 123
124 m_sp.StandUp(); 124 m_sp.StandUp();
125 125
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
index e1ef4d0..d552229 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
@@ -337,7 +337,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
337 public void TestSitAndStandWithNoSitTarget() 337 public void TestSitAndStandWithNoSitTarget()
338 { 338 {
339 TestHelpers.InMethod(); 339 TestHelpers.InMethod();
340// log4net.Config.XmlConfigurator.Configure(); 340// TestHelpers.EnableLogging();
341 341
342 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, TestHelpers.ParseTail(0x1)); 342 ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, TestHelpers.ParseTail(0x1));
343 343
@@ -355,13 +355,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
355 Assert.That(part.SitTargetAvatar, Is.EqualTo(UUID.Zero)); 355 Assert.That(part.SitTargetAvatar, Is.EqualTo(UUID.Zero));
356 Assert.That(npc.ParentID, Is.EqualTo(part.LocalId)); 356 Assert.That(npc.ParentID, Is.EqualTo(part.LocalId));
357 357
358 // FIXME: This is different for live avatars - z position is adjusted. This is half the height of the
359 // default avatar.
360 // Curiously, Vector3.ToString() will not display the last two places of the float. For example,
361 // printing out npc.AbsolutePosition will give <0, 0, 0.8454993> not <0, 0, 0.845499337>
362 Assert.That( 358 Assert.That(
363 npc.AbsolutePosition, 359 npc.AbsolutePosition,
364 Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, 0.845499337f))); 360 Is.EqualTo(part.AbsolutePosition + new Vector3(0, 0, sp.PhysicsActor.Size.Z / 2)));
365 361
366 m_npcMod.Stand(npc.UUID, m_scene); 362 m_npcMod.Stand(npc.UUID, m_scene);
367 363
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs
index e43136a..0d17e0e 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs
@@ -118,14 +118,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
118 118
119 public override Vector3 Position { get; set; } 119 public override Vector3 Position { get; set; }
120 120
121 public override Vector3 Size 121 public override Vector3 Size { get; set; }
122 {
123 get { return _size; }
124 set {
125 _size = value;
126 _size.Z = _size.Z / 2.0f;
127 }
128 }
129 122
130 public override PrimitiveBaseShape Shape 123 public override PrimitiveBaseShape Shape
131 { 124 {