private bool BeforeTravel() { double distToTarget = GetDistanceToTarget(); if (distToTarget < 2 * shipCenterToEdge) { return(true); } // Assuming we are accelerating half way and decelerating the other half double distToStop = distToTarget / 2; distToStop = Math.Min(distToStop, distanceToStop); float maxDeceleration = MaxDeceleration(); this.maxInitialSpeed = (float)PhysicsUtils.MaxInitialSpeedToStop(distToStop, MaxDeceleration()); // Game speed limit this.maxInitialSpeed = Math.Max(this.maxInitialSpeed, 100F); ActivateBlocks(); return(false); }