Fix hunger/thirst 'Dead' thresholds (#9453)
This commit is contained in:
@@ -24,10 +24,10 @@ namespace Content.Shared.Nutrition.Components
|
||||
[Serializable, NetSerializable]
|
||||
public enum HungerThreshold : byte
|
||||
{
|
||||
Overfed,
|
||||
Okay,
|
||||
Peckish,
|
||||
Starving,
|
||||
Dead,
|
||||
Overfed = 1 << 3,
|
||||
Okay = 1 << 2,
|
||||
Peckish = 1 << 1,
|
||||
Starving = 1 << 0,
|
||||
Dead = 0,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Content.Shared.Movement.Systems;
|
||||
using Content.Shared.Movement.Systems;
|
||||
using Content.Shared.Nutrition.Components;
|
||||
|
||||
namespace Content.Shared.Nutrition.EntitySystems
|
||||
@@ -14,7 +14,7 @@ namespace Content.Shared.Nutrition.EntitySystems
|
||||
|
||||
private void OnRefreshMovespeed(EntityUid uid, SharedHungerComponent component, RefreshMovementSpeedModifiersEvent args)
|
||||
{
|
||||
float mod = component.CurrentHungerThreshold == HungerThreshold.Starving ? 0.75f : 1.0f;
|
||||
float mod = component.CurrentHungerThreshold <= HungerThreshold.Starving ? 0.75f : 1.0f;
|
||||
args.ModifySpeed(mod, mod);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user