Fix deletion check in ProjectileSystem.

Another casualty from the IEntity removal.
This commit is contained in:
Vera Aguilera Puerto
2022-03-04 17:44:23 +01:00
parent 950ead9b47
commit a67b846786

View File

@@ -66,8 +66,7 @@ namespace Content.Server.Projectiles
}
// Damaging it can delete it
if (!EntityManager.GetComponent<MetaDataComponent>(otherEntity).EntityDeleted &&
EntityManager.HasComponent<CameraRecoilComponent>(otherEntity))
if (!Deleted(otherEntity) && HasComp<CameraRecoilComponent>(otherEntity))
{
var direction = args.OurFixture.Body.LinearVelocity.Normalized;
_cameraRecoil.KickCamera(otherEntity, direction);