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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user