public override void Apply(GameActor actor) { // Only set this if we haven't already set it or other, mutually exclusive values. if (!actor.DesiredMovement.DesiredTargetLocation.HasValue && !actor.DesiredMovement.DesiredVelocity.HasValue) { float speedModifier = Reflex.ModifierParams.SpeedModifier; float maxSpeed = speedModifier * actor.CalcMaxSpeed(); float maxAcceleration = speedModifier * actor.CalcMaxAcceleration(); actor.DesiredMovement.SetDesiredTargetLocation(TargetLocation, maxSpeed, maxAcceleration, AutoTurn); } }