Make projectiles not hit crit mobs unless clicked on (#27905)
This commit is contained in:
@@ -278,6 +278,13 @@ public sealed partial class GunSystem : SharedGunSystem
|
||||
|
||||
private void ShootOrThrow(EntityUid uid, Vector2 mapDirection, Vector2 gunVelocity, GunComponent gun, EntityUid gunUid, EntityUid? user)
|
||||
{
|
||||
if (gun.Target is { } target && !TerminatingOrDeleted(target))
|
||||
{
|
||||
var targeted = EnsureComp<TargetedProjectileComponent>(uid);
|
||||
targeted.Target = target;
|
||||
Dirty(uid, targeted);
|
||||
}
|
||||
|
||||
// Do a throw
|
||||
if (!HasComp<ProjectileComponent>(uid))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user