private void UpdateHUD(MySmallShip friend, bool isFriend) { MyHudEntityParams?gettedHudParams = MyHud.GetHudParams(friend); if (gettedHudParams != null) { MyHudEntityParams hudParams = gettedHudParams.Value; if (isFriend) { hudParams.FlagsEnum &= ~MyHudIndicatorFlagsEnum.ALPHA_CORRECTION_BY_DISTANCE; hudParams.FlagsEnum &= ~MyHudIndicatorFlagsEnum.SHOW_ONLY_IF_DETECTED_BY_RADAR; hudParams.MaxDistance = 0f; } else { hudParams.FlagsEnum |= MyHudIndicatorFlagsEnum.ALPHA_CORRECTION_BY_DISTANCE; hudParams.FlagsEnum |= MyHudIndicatorFlagsEnum.SHOW_ONLY_IF_DETECTED_BY_RADAR; hudParams.MaxDistance = 10000f; } MyHud.ChangeText(friend, hudParams.Text, hudParams.TargetMode, hudParams.MaxDistance, hudParams.FlagsEnum, hudParams.DisplayFactionRelation, maxDistanceMultiplerType: hudParams.MaxDistanceMultiplerType); } }