Fix PA particles (#23719)

This commit is contained in:
Nemanja
2024-01-08 01:22:46 -05:00
committed by GitHub
parent 6bf6994298
commit aea68b942a
3 changed files with 7 additions and 9 deletions

View File

@@ -71,18 +71,14 @@ public sealed class ProjectileSystem : SharedProjectileSystem
component.DamagedEntity = true;
if (component.DeleteOnCollide )
{
QueueDel(uid);
}
if (component.CanPenetrate)
{
component.DamagedEntity = false;
if (!TryComp<MobStateComponent>(target, out var mobState))
if (component.DeleteOnCollide && !HasComp<MobStateComponent>(target))
QueueDel(uid);
}
else if (component.DeleteOnCollide && !component.CanPenetrate)
else if (component.DeleteOnCollide)
{
QueueDel(uid);
}