Maybe fix do_after getting stuck (#3196)

* Maybe fix do_after getting stuck

IDK it's 5AM I tried.

* Update Content.Client/GameObjects/EntitySystems/DoAfter/DoAfterSystem.cs

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
metalgearsloth
2021-02-14 05:07:03 +11:00
committed by GitHub
parent fd2fa123dd
commit a4db94cf03
2 changed files with 25 additions and 38 deletions

View File

@@ -18,7 +18,7 @@ namespace Content.Client.GameObjects.Components
public IReadOnlyDictionary<byte, ClientDoAfter> DoAfters => _doAfters;
private readonly Dictionary<byte, ClientDoAfter> _doAfters = new();
public readonly List<(TimeSpan CancelTime, ClientDoAfter Message)> CancelledDoAfters = new();
public DoAfterGui? Gui { get; set; }
@@ -54,7 +54,7 @@ namespace Content.Client.GameObjects.Components
if (Gui != null && !Gui.Disposed)
return;
Gui = new DoAfterGui {AttachedEntity = Owner};
Gui = new DoAfterGui {AttachedEntity = Owner, FirstDraw = true};
foreach (var (_, doAfter) in _doAfters)
{