Fix bullet impact effect exception (#10357)
This commit is contained in:
@@ -20,6 +20,9 @@ public sealed class ProjectileSystem : SharedProjectileSystem
|
|||||||
|
|
||||||
private void OnProjectileImpact(ImpactEffectEvent ev)
|
private void OnProjectileImpact(ImpactEffectEvent ev)
|
||||||
{
|
{
|
||||||
|
if (Deleted(ev.Coordinates.EntityId))
|
||||||
|
return;
|
||||||
|
|
||||||
var ent = Spawn(ev.Prototype, ev.Coordinates);
|
var ent = Spawn(ev.Prototype, ev.Coordinates);
|
||||||
|
|
||||||
if (TryComp<SpriteComponent>(ent, out var sprite))
|
if (TryComp<SpriteComponent>(ent, out var sprite))
|
||||||
|
|||||||
Reference in New Issue
Block a user