Another batch of DoAfter fixes (#14351)

This commit is contained in:
keronshb
2023-03-05 00:26:03 -05:00
committed by GitHub
parent 417569fe2e
commit eff088189d
11 changed files with 124 additions and 42 deletions

View File

@@ -103,6 +103,10 @@ public abstract class SharedDoAfterSystem : EntitySystem
foreach (var (_, comp) in EntityManager.EntityQuery<ActiveDoAfterComponent, DoAfterComponent>())
{
//Don't run the doafter if its comp or owner is deleted.
if (EntityManager.Deleted(comp.Owner) || comp.Deleted)
continue;
foreach (var doAfter in comp.DoAfters.Values.ToArray())
{
Run(comp.Owner, comp, doAfter);