private void OnGunActivate(EntityUid uid, GrapplingGunComponent component, ActivateInWorldEvent args)
{
- if (!Timing.IsFirstTimePredicted || args.Handled || !args.Complex || component.Projectile is not {} projectile)
+ if (!Timing.IsFirstTimePredicted || args.Handled || !args.Complex || component.Projectile is not { } projectile)
return;
_audio.PlayPredicted(component.CycleSound, uid, args.User);
component.Projectile = null;
SetReeling(uid, component, false, args.User);
- _gun.ChangeBasicEntityAmmoCount(uid, 1);
+ _gun.ChangeBasicEntityAmmoCount(uid, 1);
args.Handled = true;
}
/// <returns>True if hooked, false otherwise.</returns>
public bool IsEntityHooked(Entity<JointRelayTargetComponent?> entity)
{
- if (!Resolve(entity, ref entity.Comp))
+ if (!Resolve(entity, ref entity.Comp, false))
return false;
foreach (var uid in entity.Comp.Relayed)