v1.2.3.b3 - HUD auto-hide

Added automatic HUD hiding to prevent conflicts with other plugins using the center HUD system.
This commit is contained in:
Juzlus 2026-08-01 21:11:59 +02:00
parent 7b142cf933
commit 9857be3236
14 changed files with 108 additions and 68 deletions

View file

@ -86,6 +86,7 @@ namespace src.utils
public float SkillDescriptionDuration { get; set; }
public bool DisplayAlwaysDescription { get; set; }
public bool DisableSpectateHUD { get; set; }
public bool HideHudForOtherPlugins { get; set; }
public bool EnableFlashingHtmlHudFix { get; set; }
public bool TraceRayBeam { get; set; }
public string DisableHUDOnDeathPermission { get; set; }
@ -118,6 +119,7 @@ namespace src.utils
EnableFlashingHtmlHudFix = false;
TraceRayBeam = false;
DisableSpectateHUD = false;
HideHudForOtherPlugins = true;
DisableHUDOnDeathPermission = "@jRandomSkills/death";
DisableSkillsOnRoundEnd = false;
CurseSkillPerPlayer = null;

View file

@ -834,7 +834,7 @@ namespace src.utils
if (player == null || !player.IsValid) return;
var playerInfo = PlayerManager.GetPlayerByIndex(player!.Index);
if (playerInfo == null || !playerInfo.DisplayHUD) return;
if (playerInfo == null || playerInfo.HideHUD >= Server.TickCount) return;
if (player.IsBot)
{
@ -944,7 +944,6 @@ namespace src.utils
UpdateServerTeamScores(ctScore, tScore);
jRandomSkills.Instance.GameRules?.TerminateRound(5f, winnerTeam == CsTeam.CounterTerrorist ? RoundEndReason.BombDefused : RoundEndReason.TargetBombed);
// TerminateRoundFunc.Invoke(jRandomSkills.Instance.GameRules.Handle, 5f, winnerTeam == CsTeam.CounterTerrorist ? RoundEndReason.BombDefused : RoundEndReason.TargetBombed, 0, 0);
}
private static void UpdateServerTeamScores(short ctScore, short tScore)