aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-02-23 11:42:55 +0000
committerTeravus Ovares2008-02-23 11:42:55 +0000
commit27508c1ad87786935dbf28aa217bcbe55a9aa645 (patch)
tree0ae701c00cb8e92ab6416fb6688afeb536960b6e /OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
parent* Reduced size of 'startup complete message' by several thousand lines. (diff)
downloadopensim-SC-27508c1ad87786935dbf28aa217bcbe55a9aa645.zip
opensim-SC-27508c1ad87786935dbf28aa217bcbe55a9aa645.tar.gz
opensim-SC-27508c1ad87786935dbf28aa217bcbe55a9aa645.tar.bz2
opensim-SC-27508c1ad87786935dbf28aa217bcbe55a9aa645.tar.xz
* Added Support within the ODEPlugin for Selected. Which means that;
* When you select a physical prim, it stops while you've got it selected. * When you move or alter a prim in some manner, it doesn't become collidable until you de-select it * When you select a prim, it doesn't become temporarily 'phantom' until you make some change to it while it's selected. (this prevents accidental selections in prim floor from causing it to go phantom on you(but don't move it or you'll fall)) * There's one major difference, and that's a physical object won't stop if you don't have permission to edit it. This prevents people who don't have edit permissions on a prim from stopping it while it's moving.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 499422f..2efca3b 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -87,6 +87,8 @@ namespace OpenSim.Region.Physics.OdePlugin
87 private bool m_hackSentFall = false; 87 private bool m_hackSentFall = false;
88 private bool m_hackSentFly = false; 88 private bool m_hackSentFly = false;
89 private bool m_foundDebian = false; 89 private bool m_foundDebian = false;
90 public uint m_localID = 0;
91
90 private CollisionLocker ode; 92 private CollisionLocker ode;
91 93
92 private string m_name = String.Empty; 94 private string m_name = String.Empty;
@@ -94,6 +96,15 @@ namespace OpenSim.Region.Physics.OdePlugin
94 private bool[] m_colliderarr = new bool[11]; 96 private bool[] m_colliderarr = new bool[11];
95 private bool[] m_colliderGroundarr = new bool[11]; 97 private bool[] m_colliderGroundarr = new bool[11];
96 98
99 // Default we're a Character
100 private CollisionCategories m_collisionCategories = (CollisionCategories.Character);
101
102 // Default, Collide with Other Geometries, spaces, bodies and characters.
103 private CollisionCategories m_collisionFlags = (CollisionCategories.Geom
104 | CollisionCategories.Space
105 | CollisionCategories.Body
106 | CollisionCategories.Character
107 | CollisionCategories.Land);
97 108
98 private bool jumping = false; 109 private bool jumping = false;
99 //private float gravityAccel; 110 //private float gravityAccel;
@@ -157,6 +168,11 @@ namespace OpenSim.Region.Physics.OdePlugin
157 set { m_alwaysRun = value; } 168 set { m_alwaysRun = value; }
158 } 169 }
159 170
171 public override uint LocalID
172 {
173 set { m_localID = value; }
174 }
175
160 public override bool Grabbed 176 public override bool Grabbed
161 { 177 {
162 set { return; } 178 set { return; }
@@ -404,6 +420,10 @@ namespace OpenSim.Region.Physics.OdePlugin
404 int dAMotorEuler = 1; 420 int dAMotorEuler = 1;
405 _parent_scene.waitForSpaceUnlock(_parent_scene.space); 421 _parent_scene.waitForSpaceUnlock(_parent_scene.space);
406 Shell = d.CreateCapsule(_parent_scene.space, CAPSULE_RADIUS, CAPSULE_LENGTH); 422 Shell = d.CreateCapsule(_parent_scene.space, CAPSULE_RADIUS, CAPSULE_LENGTH);
423
424 d.GeomSetCategoryBits(Shell, (int)m_collisionCategories);
425 d.GeomSetCollideBits(Shell, (int)m_collisionFlags);
426
407 d.MassSetCapsuleTotal(out ShellMass, m_mass, 2, CAPSULE_RADIUS, CAPSULE_LENGTH); 427 d.MassSetCapsuleTotal(out ShellMass, m_mass, 2, CAPSULE_RADIUS, CAPSULE_LENGTH);
408 Body = d.BodyCreate(_parent_scene.world); 428 Body = d.BodyCreate(_parent_scene.world);
409 d.BodySetPosition(Body, npositionX, npositionY, npositionZ); 429 d.BodySetPosition(Body, npositionX, npositionY, npositionZ);