Fix thrown throwing (#2723)

Technically some stuff could be dependent upon the entity regardless if it's deleted but this is how ICollideBehavior does it (not by my design) so I figured we'd make it consistent.

If someone really needs the functionality even if it's deleted then they can refactor it.

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2020-12-08 22:21:12 +11:00
committed by GitHub
parent 5b561ae3e7
commit fe93f2ac30
2 changed files with 3 additions and 1 deletions

View File

@@ -624,11 +624,13 @@ namespace Content.Server.GameObjects.EntitySystems.Click
foreach (var comp in thrown.GetAllComponents<IThrowCollide>().ToArray())
{
if (thrown.Deleted) break;
comp.DoHit(eventArgs);
}
foreach (var comp in target.GetAllComponents<IThrowCollide>().ToArray())
{
if (target.Deleted) break;
comp.HitBy(eventArgs);
}
}