decelerator nerf and projectile penetration mini refactor (#24032)
* decelerator nerf and projectile fix * datafield name difference * forgot to add component * missed datafield styling * comment made summary * CanPenetrateComponent and CollisionLayer check. * Small comment changes
This commit is contained in:
@@ -5,9 +5,7 @@ using Content.Shared.Camera;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.Projectiles;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Physics.Events;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
namespace Content.Server.Projectiles;
|
||||
@@ -71,17 +69,11 @@ public sealed class ProjectileSystem : SharedProjectileSystem
|
||||
|
||||
component.DamagedEntity = true;
|
||||
|
||||
if (component.CanPenetrate)
|
||||
{
|
||||
component.DamagedEntity = false;
|
||||
var afterProjectileHitEvent = new AfterProjectileHitEvent(component.Damage, target, args.OtherFixture);
|
||||
RaiseLocalEvent(uid, ref afterProjectileHitEvent);
|
||||
|
||||
if (component.DeleteOnCollide && !HasComp<MobStateComponent>(target))
|
||||
QueueDel(uid);
|
||||
}
|
||||
else if (component.DeleteOnCollide)
|
||||
{
|
||||
if (component.DeleteOnCollide)
|
||||
QueueDel(uid);
|
||||
}
|
||||
|
||||
if (component.ImpactEffect != null && TryComp<TransformComponent>(uid, out var xform))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user