Fix Assumption of Nullable to have value (#41220)
* Fix Potential Test Fail * Please the maintainer gods
This commit is contained in:
@@ -90,11 +90,11 @@ public abstract partial class SharedProjectileSystem : EntitySystem
|
||||
EmbedAttach(embeddable, args.Target, args.Shooter, embeddable.Comp);
|
||||
|
||||
// Raise a specific event for projectiles.
|
||||
if (TryComp(embeddable, out ProjectileComponent? projectile))
|
||||
{
|
||||
var ev = new ProjectileEmbedEvent(projectile.Shooter!.Value, projectile.Weapon!.Value, args.Target);
|
||||
RaiseLocalEvent(embeddable, ref ev);
|
||||
}
|
||||
if (!TryComp<ProjectileComponent>(embeddable, out var projectile))
|
||||
return;
|
||||
|
||||
var ev = new ProjectileEmbedEvent(projectile.Shooter, projectile.Weapon, args.Target);
|
||||
RaiseLocalEvent(embeddable, ref ev);
|
||||
}
|
||||
|
||||
private void EmbedAttach(EntityUid uid, EntityUid target, EntityUid? user, EmbeddableProjectileComponent component)
|
||||
|
||||
Reference in New Issue
Block a user