mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Merge branch 'master' into httptests
This commit is contained in:
@@ -460,13 +460,19 @@ public sealed class BSCharacter : BSPhysObject
|
||||
set
|
||||
{
|
||||
DetailLog("{0},BSCharacter.setTargetVelocity,call,vel={1}", LocalID, value);
|
||||
base.m_targetVelocity = value;
|
||||
OMV.Vector3 targetVel = value;
|
||||
if (_setAlwaysRun && !_flying)
|
||||
targetVel *= new OMV.Vector3(BSParam.AvatarAlwaysRunFactor, BSParam.AvatarAlwaysRunFactor, 1f);
|
||||
if (!_flying)
|
||||
{
|
||||
if (_setAlwaysRun)
|
||||
targetVel *= new OMV.Vector3(BSParam.AvatarAlwaysRunFactor, BSParam.AvatarAlwaysRunFactor, 1f);
|
||||
else
|
||||
if (BSParam.AvatarWalkVelocityFactor != 1f)
|
||||
targetVel *= new OMV.Vector3(BSParam.AvatarWalkVelocityFactor, BSParam.AvatarWalkVelocityFactor, 1f);
|
||||
}
|
||||
base.m_targetVelocity = targetVel;
|
||||
|
||||
if (m_moveActor != null)
|
||||
m_moveActor.SetVelocityAndTarget(RawVelocity, targetVel, false /* inTaintTime */);
|
||||
m_moveActor.SetVelocityAndTarget(RawVelocity, base.m_targetVelocity, false /* inTaintTime */);
|
||||
}
|
||||
}
|
||||
// Directly setting velocity means this is what the user really wants now.
|
||||
|
||||
@@ -135,6 +135,7 @@ public static class BSParam
|
||||
public static bool AvatarToAvatarCollisionsByDefault { get; private set; }
|
||||
public static float AvatarFriction { get; private set; }
|
||||
public static float AvatarStandingFriction { get; private set; }
|
||||
public static float AvatarWalkVelocityFactor { get; private set; }
|
||||
public static float AvatarAlwaysRunFactor { get; private set; }
|
||||
public static float AvatarDensity { get; private set; }
|
||||
public static float AvatarRestitution { get; private set; }
|
||||
@@ -604,6 +605,8 @@ public static class BSParam
|
||||
0.2f ),
|
||||
new ParameterDefn<float>("AvatarStandingFriction", "Avatar friction when standing. Changed on avatar recreation.",
|
||||
0.95f ),
|
||||
new ParameterDefn<float>("AvatarWalkVelocityFactor", "Speed multiplier if avatar is walking",
|
||||
1.0f ),
|
||||
new ParameterDefn<float>("AvatarAlwaysRunFactor", "Speed multiplier if avatar is set to always run",
|
||||
1.3f ),
|
||||
// For historical reasons, density is reported * 100
|
||||
|
||||
Reference in New Issue
Block a user