Rejuvenate now resets stuns.

Fixes #1198
This commit is contained in:
Víctor Aguilera Puerto
2020-06-23 21:05:25 +02:00
parent 137d32e6aa
commit 7089b60738
2 changed files with 16 additions and 0 deletions

View File

@@ -192,6 +192,17 @@ namespace Content.Server.GameObjects.Components.Mobs
_statusRemoveCancellation = new CancellationTokenSource(); _statusRemoveCancellation = new CancellationTokenSource();
} }
public void ResetStuns()
{
_stunnedTimer = 0f;
_slowdownTimer = 0f;
if (KnockedDown)
StandingStateHelper.Standing(Owner);
_knockdownTimer = 0f;
}
public void Update(float delta) public void Update(float delta)
{ {
if (Stunned) if (Stunned)

View File

@@ -1,4 +1,5 @@
using Content.Server.GameObjects; using Content.Server.GameObjects;
using Content.Server.GameObjects.Components.Mobs;
using Content.Server.GameObjects.Components.Nutrition; using Content.Server.GameObjects.Components.Nutrition;
using Content.Shared.GameObjects; using Content.Shared.GameObjects;
using Robust.Server.Console; using Robust.Server.Console;
@@ -62,6 +63,10 @@ namespace Content.Server.GlobalVerbs
{ {
thirst.ResetThirst(); thirst.ResetThirst();
} }
if (target.TryGetComponent(out StunnableComponent stun))
{
stun.ResetStuns();
}
} }
} }
} }