Fix bullet impact effect exception (#10357)

This commit is contained in:
metalgearsloth
2022-08-06 16:48:55 +10:00
committed by GitHub
parent 45bd1edd5b
commit f4bbe7aea6

View File

@@ -20,6 +20,9 @@ public sealed class ProjectileSystem : SharedProjectileSystem
private void OnProjectileImpact(ImpactEffectEvent ev)
{
if (Deleted(ev.Coordinates.EntityId))
return;
var ent = Spawn(ev.Prototype, ev.Coordinates);
if (TryComp<SpriteComponent>(ent, out var sprite))