Transition between not flying / flying should be smoother

afrisby
Brian McBee 2007-08-09 06:19:41 +00:00
parent 3592043431
commit 50e3797c59
1 changed files with 6 additions and 1 deletions

View File

@ -296,8 +296,12 @@ namespace OpenSim.Region.Environment.Scenes
bool DCFlagKeyPressed = false; bool DCFlagKeyPressed = false;
Vector3 agent_control_v3 = new Vector3(0, 0, 0); Vector3 agent_control_v3 = new Vector3(0, 0, 0);
Quaternion q = new Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z); Quaternion q = new Quaternion(bodyRotation.W, bodyRotation.X, bodyRotation.Y, bodyRotation.Z);
bool oldflying = this.PhysActor.Flying;
this.PhysActor.Flying = ((flags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY) != 0); this.PhysActor.Flying = ((flags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_FLY) != 0);
if (this.PhysActor.Flying != oldflying)
{
update_movementflag = true;
}
if (q != this.bodyRot) if (q != this.bodyRot)
{ {
@ -332,6 +336,7 @@ namespace OpenSim.Region.Environment.Scenes
this.AddNewMovement(agent_control_v3, q); this.AddNewMovement(agent_control_v3, q);
} }
UpdateMovementAnimations(update_movementflag); UpdateMovementAnimations(update_movementflag);
} }
protected void UpdateMovementAnimations(bool update_movementflag) protected void UpdateMovementAnimations(bool update_movementflag)