Remove redundant IComponent casts
This commit is contained in:
@@ -90,7 +90,7 @@ namespace Content.Server.Nutrition.Components
|
||||
if (_lastHungerThreshold == HungerThreshold.Starving && _currentHungerThreshold != HungerThreshold.Dead &&
|
||||
IoCManager.Resolve<IEntityManager>().TryGetComponent(Owner, out MovementSpeedModifierComponent? movementSlowdownComponent))
|
||||
{
|
||||
EntitySystem.Get<MovementSpeedModifierSystem>().RefreshMovementSpeedModifiers(((IComponent) this).Owner);
|
||||
EntitySystem.Get<MovementSpeedModifierSystem>().RefreshMovementSpeedModifiers(Owner);
|
||||
}
|
||||
|
||||
// Update UI
|
||||
@@ -126,7 +126,7 @@ namespace Content.Server.Nutrition.Components
|
||||
case HungerThreshold.Starving:
|
||||
// TODO: If something else bumps this could cause mega-speed.
|
||||
// If some form of speed update system if multiple things are touching it use that.
|
||||
EntitySystem.Get<MovementSpeedModifierSystem>().RefreshMovementSpeedModifiers(((IComponent) this).Owner);
|
||||
EntitySystem.Get<MovementSpeedModifierSystem>().RefreshMovementSpeedModifiers(Owner);
|
||||
_lastHungerThreshold = _currentHungerThreshold;
|
||||
_actualDecayRate = _baseDecayRate * 0.6f;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user