mirror of
https://github.com/opensim/opensim.git
synced 2026-05-15 11:25:39 +08:00
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.
This commit is contained in:
@@ -152,7 +152,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
|
||||
actor.Position.X = 255.9F;
|
||||
}
|
||||
|
||||
float height = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + 1.0f;
|
||||
float height = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + actor.Size.Z;
|
||||
if (actor.Flying)
|
||||
{
|
||||
if (actor.Position.Z + (actor.Velocity.Z*timeStep) <
|
||||
@@ -210,15 +210,16 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
|
||||
private PhysicsVector _position;
|
||||
private PhysicsVector _velocity;
|
||||
private PhysicsVector _acceleration;
|
||||
private PhysicsVector _size;
|
||||
private PhysicsVector m_rotationalVelocity = PhysicsVector.Zero;
|
||||
private bool flying;
|
||||
private bool iscolliding;
|
||||
|
||||
public BasicActor()
|
||||
{
|
||||
_velocity = new PhysicsVector();
|
||||
_position = new PhysicsVector();
|
||||
_acceleration = new PhysicsVector();
|
||||
_size = new PhysicsVector();
|
||||
}
|
||||
|
||||
public override int PhysicsActorType
|
||||
@@ -315,8 +316,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
|
||||
|
||||
public override PhysicsVector Size
|
||||
{
|
||||
get { return PhysicsVector.Zero; }
|
||||
set { }
|
||||
get { return _size; }
|
||||
set {
|
||||
_size = value;
|
||||
_size.Z = _size.Z / 2.0f;
|
||||
}
|
||||
}
|
||||
|
||||
public override PrimitiveBaseShape Shape
|
||||
|
||||
Reference in New Issue
Block a user