From 1a8982da5257644528cfc129a4d5cc6579d54058 Mon Sep 17 00:00:00 2001 From: Vera Aguilera Puerto Date: Sun, 21 Mar 2021 18:05:05 +0100 Subject: [PATCH] Reverses order of Thrown Item interactions --- .../EntitySystems/ThrownItemSystem.cs | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/Content.Shared/GameObjects/EntitySystems/ThrownItemSystem.cs b/Content.Shared/GameObjects/EntitySystems/ThrownItemSystem.cs index b4697e9225..e38feb6105 100644 --- a/Content.Shared/GameObjects/EntitySystems/ThrownItemSystem.cs +++ b/Content.Shared/GameObjects/EntitySystems/ThrownItemSystem.cs @@ -74,19 +74,6 @@ namespace Content.Shared.GameObjects.EntitySystems var eventArgs = new ThrowCollideEventArgs(user, thrown.Entity, target.Entity); - foreach (var comp in thrown.Entity.GetAllComponents()) - { - _throwCollide.Add(comp); - } - - foreach (var collide in _throwCollide) - { - if (thrown.Entity.Deleted) break; - collide.DoHit(eventArgs); - } - - _throwCollide.Clear(); - foreach (var comp in target.Entity.GetAllComponents()) { _throwCollide.Add(comp); @@ -99,6 +86,19 @@ namespace Content.Shared.GameObjects.EntitySystems } _throwCollide.Clear(); + + foreach (var comp in thrown.Entity.GetAllComponents()) + { + _throwCollide.Add(comp); + } + + foreach (var collide in _throwCollide) + { + if (thrown.Entity.Deleted) break; + collide.DoHit(eventArgs); + } + + _throwCollide.Clear(); } } }