diff --git a/Content.Shared/Contests/ContestsSystem.cs b/Content.Shared/Contests/ContestsSystem.cs index 4dc89e2bbc9..454d17a5d84 100644 --- a/Content.Shared/Contests/ContestsSystem.cs +++ b/Content.Shared/Contests/ContestsSystem.cs @@ -2,6 +2,7 @@ using Content.Shared.CCVar; using Content.Shared.Damage; using Content.Shared.Damage.Components; +using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Systems; using Content.Shared.Mood; using Robust.Shared.Configuration; @@ -226,7 +227,8 @@ public float HealthContest(EntityUid performer, bool bypassClamp = false, float if (!_cfg.GetCVar(CCVars.DoContestsSystem) || !_cfg.GetCVar(CCVars.DoHealthContests) || !TryComp(performer, out var damage) - || !_mobThreshold.TryGetThresholdForState(performer, Mobs.MobState.Critical, out var threshold)) + || !TryComp(performer, out var thresholdsComponent) + || !_mobThreshold.TryGetThresholdForState(performer, Mobs.MobState.Critical, out var threshold, thresholdsComponent)) return 1f; return ContestClamp(ContestClampOverride(bypassClamp) @@ -247,8 +249,10 @@ public float HealthContest(EntityUid performer, EntityUid target, bool bypassCla || !_cfg.GetCVar(CCVars.DoHealthContests) || !TryComp(performer, out var perfDamage) || !TryComp(target, out var targetDamage) - || !_mobThreshold.TryGetThresholdForState(performer, Mobs.MobState.Critical, out var perfThreshold) - || !_mobThreshold.TryGetThresholdForState(target, Mobs.MobState.Critical, out var targetThreshold)) + || !TryComp(performer, out var perfThresholdComp) + || !TryComp(target, out var targetThresholdComp) + || !_mobThreshold.TryGetThresholdForState(performer, Mobs.MobState.Critical, out var perfThreshold, perfThresholdComp) + || !_mobThreshold.TryGetThresholdForState(target, Mobs.MobState.Critical, out var targetThreshold, targetThresholdComp)) return 1f; return ContestClamp(ContestClampOverride(bypassClamp)