Fix 3000 errors
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using Content.Server.Administration.Logs;
|
||||
using Content.Server.Camera;
|
||||
using Content.Server.Projectiles.Components;
|
||||
using Content.Shared.Administration.Logs;
|
||||
using Content.Shared.Body.Components;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Database;
|
||||
@@ -57,7 +56,7 @@ namespace Content.Server.Projectiles
|
||||
var dmg = _damageableSystem.TryChangeDamage(otherEntity, component.Damage);
|
||||
component.DamagedEntity = true;
|
||||
|
||||
if (dmg is not null && EntityManager.TryGetEntity(component.Shooter, out var shooter))
|
||||
if (dmg is not null && EntityManager.EntityExists(component.Shooter)
|
||||
_adminLogSystem.Add(LogType.BulletHit, LogImpact.Low,
|
||||
$"Projectile {component.Owner} shot by {shooter} hit {otherEntity} and dealt {dmg.Total} damage");
|
||||
}
|
||||
@@ -83,7 +82,7 @@ namespace Content.Server.Projectiles
|
||||
|
||||
if (component.TimeLeft <= 0)
|
||||
{
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity((EntityUid) component.Owner);
|
||||
IoCManager.Resolve<IEntityManager>().DeleteEntity(component.Owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user