aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
diff options
context:
space:
mode:
authoridb2008-12-01 00:49:36 +0000
committeridb2008-12-01 00:49:36 +0000
commit098f16fe3192ef17e7c749a70ea0607a22ae55fa (patch)
treef107a86180f4ebaf7103b466f05c2faeb119cb24 /OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
parentMantis #2584 (again) (diff)
downloadopensim-SC_OLD-098f16fe3192ef17e7c749a70ea0607a22ae55fa.zip
opensim-SC_OLD-098f16fe3192ef17e7c749a70ea0607a22ae55fa.tar.gz
opensim-SC_OLD-098f16fe3192ef17e7c749a70ea0607a22ae55fa.tar.bz2
opensim-SC_OLD-098f16fe3192ef17e7c749a70ea0607a22ae55fa.tar.xz
Remove duplicated avatar height calculation in lsl functions.
Use height calculation in Basic Physics and Physics of Simplicity so that avatars larger than the default walk with straight legs and shorter walk on the ground.
Diffstat (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs')
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
index cacb9eb..6a27f46 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
@@ -152,7 +152,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
152 actor.Position.X = 255.9F; 152 actor.Position.X = 255.9F;
153 } 153 }
154 154
155 float height = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + 1.0f; 155 float height = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + actor.Size.Z;
156 if (actor.Flying) 156 if (actor.Flying)
157 { 157 {
158 if (actor.Position.Z + (actor.Velocity.Z*timeStep) < 158 if (actor.Position.Z + (actor.Velocity.Z*timeStep) <
@@ -210,15 +210,16 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
210 private PhysicsVector _position; 210 private PhysicsVector _position;
211 private PhysicsVector _velocity; 211 private PhysicsVector _velocity;
212 private PhysicsVector _acceleration; 212 private PhysicsVector _acceleration;
213 private PhysicsVector _size;
213 private PhysicsVector m_rotationalVelocity = PhysicsVector.Zero; 214 private PhysicsVector m_rotationalVelocity = PhysicsVector.Zero;
214 private bool flying; 215 private bool flying;
215 private bool iscolliding; 216 private bool iscolliding;
216
217 public BasicActor() 217 public BasicActor()
218 { 218 {
219 _velocity = new PhysicsVector(); 219 _velocity = new PhysicsVector();
220 _position = new PhysicsVector(); 220 _position = new PhysicsVector();
221 _acceleration = new PhysicsVector(); 221 _acceleration = new PhysicsVector();
222 _size = new PhysicsVector();
222 } 223 }
223 224
224 public override int PhysicsActorType 225 public override int PhysicsActorType
@@ -315,8 +316,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
315 316
316 public override PhysicsVector Size 317 public override PhysicsVector Size
317 { 318 {
318 get { return PhysicsVector.Zero; } 319 get { return _size; }
319 set { } 320 set {
321 _size = value;
322 _size.Z = _size.Z / 2.0f;
323 }
320 } 324 }
321 325
322 public override PrimitiveBaseShape Shape 326 public override PrimitiveBaseShape Shape