fix grappling hooks getting bricked (#32738)
Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -114,19 +114,14 @@ public abstract class SharedGrapplingGunSystem : EntitySystem
|
|||||||
|
|
||||||
private void OnGunActivate(EntityUid uid, GrapplingGunComponent component, ActivateInWorldEvent args)
|
private void OnGunActivate(EntityUid uid, GrapplingGunComponent component, ActivateInWorldEvent args)
|
||||||
{
|
{
|
||||||
if (!Timing.IsFirstTimePredicted || args.Handled || !args.Complex)
|
if (!Timing.IsFirstTimePredicted || args.Handled || !args.Complex || component.Projectile is not {} projectile)
|
||||||
return;
|
|
||||||
|
|
||||||
if (Deleted(component.Projectile))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_audio.PlayPredicted(component.CycleSound, uid, args.User);
|
_audio.PlayPredicted(component.CycleSound, uid, args.User);
|
||||||
_appearance.SetData(uid, SharedTetherGunSystem.TetherVisualsStatus.Key, true);
|
_appearance.SetData(uid, SharedTetherGunSystem.TetherVisualsStatus.Key, true);
|
||||||
|
|
||||||
if (_netManager.IsServer)
|
if (_netManager.IsServer)
|
||||||
{
|
QueueDel(projectile);
|
||||||
QueueDel(component.Projectile.Value);
|
|
||||||
}
|
|
||||||
|
|
||||||
component.Projectile = null;
|
component.Projectile = null;
|
||||||
SetReeling(uid, component, false, args.User);
|
SetReeling(uid, component, false, args.User);
|
||||||
|
|||||||
Reference in New Issue
Block a user