aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authordiva2009-02-15 05:00:58 +0000
committerdiva2009-02-15 05:00:58 +0000
commit3d5a9e6748ef743c4db04b427d4d76ea65269618 (patch)
tree1877a66c0ca1f4caa455a7f98dd221897e687620 /OpenSim/Region/Physics
parentSet sculpt map alpha to 255 prior to scaling and meshing. Addresses Mantis #3150 (diff)
downloadopensim-SC-3d5a9e6748ef743c4db04b427d4d76ea65269618.zip
opensim-SC-3d5a9e6748ef743c4db04b427d4d76ea65269618.tar.gz
opensim-SC-3d5a9e6748ef743c4db04b427d4d76ea65269618.tar.bz2
opensim-SC-3d5a9e6748ef743c4db04b427d4d76ea65269618.tar.xz
This started as way to correct Mantis #3158, which I believe should be fixed now. The flying status was temporarily being ignored, which caused the avie to drop sometimes -- there was a race condition. In the process it also fixes that annoying bug in basic physics where the avie would drop half-way to the ground upon region crossings (SetAppearance was missing). Additionally, a lot of child-agent-related code has been cleaned up; namely child agents are now consistently not added to physical scenes, and they also don't have appearances. All of that happens in MakeRoot, consistently.
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs3
-rw-r--r--OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs3
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs4
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs3
-rw-r--r--OpenSim/Region/Physics/POSPlugin/POSScene.cs3
-rw-r--r--OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs3
6 files changed, 12 insertions, 7 deletions
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
index 010d9d3..3081077 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
@@ -83,10 +83,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
83 { 83 {
84 84
85 } 85 }
86 public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) 86 public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying)
87 { 87 {
88 BasicActor act = new BasicActor(); 88 BasicActor act = new BasicActor();
89 act.Position = position; 89 act.Position = position;
90 act.Flying = isFlying;
90 _actors.Add(act); 91 _actors.Add(act);
91 return act; 92 return act;
92 } 93 }
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
index 29a19de..8891163 100644
--- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
+++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
@@ -573,13 +573,14 @@ namespace OpenSim.Region.Physics.BulletXPlugin
573 573
574 } 574 }
575 575
576 public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) 576 public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying)
577 { 577 {
578 PhysicsVector pos = new PhysicsVector(); 578 PhysicsVector pos = new PhysicsVector();
579 pos.X = position.X; 579 pos.X = position.X;
580 pos.Y = position.Y; 580 pos.Y = position.Y;
581 pos.Z = position.Z + 20; 581 pos.Z = position.Z + 20;
582 BulletXCharacter newAv = null; 582 BulletXCharacter newAv = null;
583 newAv.Flying = isFlying;
583 lock (BulletXLock) 584 lock (BulletXLock)
584 { 585 {
585 newAv = new BulletXCharacter(avName, this, pos); 586 newAv = new BulletXCharacter(avName, this, pos);
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index 2cf4d5a..fbf92a9 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -62,7 +62,7 @@ namespace OpenSim.Region.Physics.Manager
62 62
63 public abstract void Initialise(IMesher meshmerizer, IConfigSource config); 63 public abstract void Initialise(IMesher meshmerizer, IConfigSource config);
64 64
65 public abstract PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size); 65 public abstract PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying);
66 66
67 public abstract void RemoveAvatar(PhysicsActor actor); 67 public abstract void RemoveAvatar(PhysicsActor actor);
68 68
@@ -162,7 +162,7 @@ namespace OpenSim.Region.Physics.Manager
162 // Does nothing right now 162 // Does nothing right now
163 } 163 }
164 164
165 public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) 165 public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying)
166 { 166 {
167 m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddAvatar({0})", position); 167 m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddAvatar({0})", position);
168 return PhysicsActor.Null; 168 return PhysicsActor.Null;
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index ae47636..f30de4d 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -1313,13 +1313,14 @@ namespace OpenSim.Region.Physics.OdePlugin
1313 1313
1314 #region Add/Remove Entities 1314 #region Add/Remove Entities
1315 1315
1316 public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) 1316 public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying)
1317 { 1317 {
1318 PhysicsVector pos = new PhysicsVector(); 1318 PhysicsVector pos = new PhysicsVector();
1319 pos.X = position.X; 1319 pos.X = position.X;
1320 pos.Y = position.Y; 1320 pos.Y = position.Y;
1321 pos.Z = position.Z; 1321 pos.Z = position.Z;
1322 OdeCharacter newAv = new OdeCharacter(avName, this, pos, ode, size, avPIDD, avPIDP, avCapRadius, avStandupTensor, avDensity, avHeightFudgeFactor, avMovementDivisorWalk, avMovementDivisorRun); 1322 OdeCharacter newAv = new OdeCharacter(avName, this, pos, ode, size, avPIDD, avPIDP, avCapRadius, avStandupTensor, avDensity, avHeightFudgeFactor, avMovementDivisorWalk, avMovementDivisorRun);
1323 newAv.Flying = isFlying;
1323 _characters.Add(newAv); 1324 _characters.Add(newAv);
1324 return newAv; 1325 return newAv;
1325 } 1326 }
diff --git a/OpenSim/Region/Physics/POSPlugin/POSScene.cs b/OpenSim/Region/Physics/POSPlugin/POSScene.cs
index 44a105d..84ffe5f 100644
--- a/OpenSim/Region/Physics/POSPlugin/POSScene.cs
+++ b/OpenSim/Region/Physics/POSPlugin/POSScene.cs
@@ -56,10 +56,11 @@ namespace OpenSim.Region.Physics.POSPlugin
56 { 56 {
57 } 57 }
58 58
59 public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) 59 public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying)
60 { 60 {
61 POSCharacter act = new POSCharacter(); 61 POSCharacter act = new POSCharacter();
62 act.Position = position; 62 act.Position = position;
63 act.Flying = isFlying;
63 _characters.Add(act); 64 _characters.Add(act);
64 return act; 65 return act;
65 } 66 }
diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
index fa59dbe..18935fb 100644
--- a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
+++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs
@@ -102,13 +102,14 @@ namespace OpenSim.Region.Physics.PhysXPlugin
102 102
103 } 103 }
104 104
105 public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) 105 public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying)
106 { 106 {
107 Vec3 pos = new Vec3(); 107 Vec3 pos = new Vec3();
108 pos.X = position.X; 108 pos.X = position.X;
109 pos.Y = position.Y; 109 pos.Y = position.Y;
110 pos.Z = position.Z; 110 pos.Z = position.Z;
111 PhysXCharacter act = new PhysXCharacter(scene.AddCharacter(pos)); 111 PhysXCharacter act = new PhysXCharacter(scene.AddCharacter(pos));
112 act.Flying = isFlying;
112 act.Position = position; 113 act.Position = position;
113 _characters.Add(act); 114 _characters.Add(act);
114 return act; 115 return act;