do_after fixes (#3299)
* Try fixing DoAfterBar coordinates issue Also I have a somewhat shitcode way to ensure it doesn't get stuck but I'll wait to see if it still happens on live. * Brute force fix the stuck issue Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -51,7 +51,7 @@ namespace Content.Client.GameObjects.Components
|
||||
/// </summary>
|
||||
public void Enable()
|
||||
{
|
||||
if (Gui != null && !Gui.Disposed)
|
||||
if (Gui?.Disposed == false)
|
||||
return;
|
||||
|
||||
Gui = new DoAfterGui {AttachedEntity = Owner, FirstDraw = true};
|
||||
@@ -70,6 +70,7 @@ namespace Content.Client.GameObjects.Components
|
||||
public void Disable()
|
||||
{
|
||||
Gui?.Dispose();
|
||||
Gui = null;
|
||||
}
|
||||
|
||||
public override void HandleComponentState(ComponentState? curState, ComponentState? nextState)
|
||||
@@ -128,8 +129,7 @@ namespace Content.Client.GameObjects.Components
|
||||
/// <param name="clientDoAfter"></param>
|
||||
public void Remove(ClientDoAfter clientDoAfter)
|
||||
{
|
||||
if (_doAfters.ContainsKey(clientDoAfter.ID))
|
||||
_doAfters.Remove(clientDoAfter.ID);
|
||||
_doAfters.Remove(clientDoAfter.ID);
|
||||
|
||||
var found = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user