Fix DoAfter attempt event null error (#27280)

* Fix DoAfter attempt event null error

* A
This commit is contained in:
Leon Friedrich
2024-04-25 13:54:25 +12:00
committed by GitHub
parent 161fd6c83c
commit 6d16d6b1c9
3 changed files with 5 additions and 3 deletions

View File

@@ -245,8 +245,9 @@ public abstract partial class SharedDoAfterSystem : EntitySystem
if (args.AttemptFrequency == AttemptFrequency.StartAndEnd && !TryAttemptEvent(doAfter))
return false;
if (args.Delay <= TimeSpan.Zero ||
_tag.HasTag(args.User, "InstantDoAfters"))
// TODO DO AFTER
// Why does this tag exist? Just make this a bool on the component?
if (args.Delay <= TimeSpan.Zero || _tag.HasTag(args.User, "InstantDoAfters"))
{
RaiseDoAfterEvents(doAfter, comp);
// We don't store instant do-afters. This is just a lazy way of hiding them from client-side visuals.