Make the explosions throw the container/item they originated from (#32428)
Extra fun if it's something that can trigger multiple times
This commit is contained in:
@@ -488,9 +488,12 @@ public sealed partial class ExplosionSystem
|
||||
&& physics.BodyType == BodyType.Dynamic)
|
||||
{
|
||||
var pos = _transformSystem.GetWorldPosition(xform);
|
||||
var dir = pos - epicenter.Position;
|
||||
if (dir.IsLengthZero())
|
||||
dir = _robustRandom.NextVector2().Normalized();
|
||||
_throwingSystem.TryThrow(
|
||||
uid,
|
||||
pos - epicenter.Position,
|
||||
dir,
|
||||
physics,
|
||||
xform,
|
||||
_projectileQuery,
|
||||
|
||||
Reference in New Issue
Block a user