Reverses order of Thrown Item interactions
This commit is contained in:
@@ -74,19 +74,6 @@ namespace Content.Shared.GameObjects.EntitySystems
|
|||||||
|
|
||||||
var eventArgs = new ThrowCollideEventArgs(user, thrown.Entity, target.Entity);
|
var eventArgs = new ThrowCollideEventArgs(user, thrown.Entity, target.Entity);
|
||||||
|
|
||||||
foreach (var comp in thrown.Entity.GetAllComponents<IThrowCollide>())
|
|
||||||
{
|
|
||||||
_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<IThrowCollide>())
|
foreach (var comp in target.Entity.GetAllComponents<IThrowCollide>())
|
||||||
{
|
{
|
||||||
_throwCollide.Add(comp);
|
_throwCollide.Add(comp);
|
||||||
@@ -99,6 +86,19 @@ namespace Content.Shared.GameObjects.EntitySystems
|
|||||||
}
|
}
|
||||||
|
|
||||||
_throwCollide.Clear();
|
_throwCollide.Clear();
|
||||||
|
|
||||||
|
foreach (var comp in thrown.Entity.GetAllComponents<IThrowCollide>())
|
||||||
|
{
|
||||||
|
_throwCollide.Add(comp);
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var collide in _throwCollide)
|
||||||
|
{
|
||||||
|
if (thrown.Entity.Deleted) break;
|
||||||
|
collide.DoHit(eventArgs);
|
||||||
|
}
|
||||||
|
|
||||||
|
_throwCollide.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user