Fixing health alerts not properly updating when players are damaged (#13480)
This commit is contained in:
@@ -19,7 +19,7 @@ public abstract class AlertsSystem : EntitySystem
|
||||
public short GetSeverityRange(AlertType alertType)
|
||||
{
|
||||
var minSeverity = _typeToAlert[alertType].MinSeverity;
|
||||
return (short)MathF.Min(minSeverity,_typeToAlert[alertType].MaxSeverity - minSeverity);
|
||||
return (short)MathF.Max(minSeverity,_typeToAlert[alertType].MaxSeverity - minSeverity);
|
||||
}
|
||||
|
||||
public short GetMaxSeverity(AlertType alertType)
|
||||
|
||||
@@ -301,8 +301,6 @@ public sealed class MobThresholdSystem : EntitySystem
|
||||
var severity = _alerts.GetMinSeverity(AlertType.HumanHealth);
|
||||
if (TryGetIncapPercentage(target, damageable.TotalDamage, out var percentage))
|
||||
{
|
||||
|
||||
|
||||
severity = (short) MathF.Floor(percentage.Value.Float() *
|
||||
_alerts.GetSeverityRange(AlertType.HumanHealth));
|
||||
severity += _alerts.GetMinSeverity(AlertType.HumanHealth);
|
||||
|
||||
Reference in New Issue
Block a user