private void RequestJump() { if (CanJump) { if (MySession.Static.LocalCharacter != null) { var shipController = MySession.Static.LocalCharacter.Parent as MyShipController; if (shipController == null && MySession.Static.ControlledEntity != null) { shipController = MySession.Static.ControlledEntity.Entity as MyShipController; } if (shipController != null && (shipController.IsMainCockpit || !CubeGrid.HasMainCockpit())) { if (m_jumpTarget != null) { CubeGrid.GridSystems.JumpSystem.RequestJump(m_jumpTarget.Name, m_jumpTarget.Coords, shipController.OwnerId); } else { Vector3 localForward = Base6Directions.GetVector(shipController.Orientation.Forward); Vector3D forward = Vector3D.Transform(localForward, shipController.CubeGrid.WorldMatrix.GetOrientation()); forward.Normalize(); Vector3D jumpCoords = CubeGrid.WorldMatrix.Translation + forward * ComputeMaxDistance(); CubeGrid.GridSystems.JumpSystem.RequestJump("Blind Jump", jumpCoords, shipController.OwnerId); } } } } else if (!IsJumping && !IsFull) { var notification = new MyHudNotification(MySpaceTexts.NotificationJumpDriveNotFullyCharged, 1500); notification.SetTextFormatArguments((m_storedPower / BlockDefinition.PowerNeededForJump).ToString("P")); MyHud.Notifications.Add(notification); } }