Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Update SharedGrapplingGunSystem.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Vonsant authored Jun 20, 2024
1 parent 3d03e11 commit 0b6c11c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Content.Shared/Weapons/Misc/SharedGrapplingGunSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ public override void Update(float frameTime)
{
if (Timing.IsFirstTimePredicted)
{
// Just in case.
grappling.Stream = _audio.Stop(grappling.Stream);
}

Expand All @@ -185,6 +186,7 @@ public override void Update(float frameTime)
continue;
}

// TODO: This should be on engine.
var localTransform = Transform(uid); // Use the transform of the entity holding the grappling gun
var hookTransform = Transform(joint.BodyBUid);
var distanceBetween = (localTransform.Coordinates.Position - hookTransform.Coordinates.Position).Length();
Expand Down Expand Up @@ -216,6 +218,8 @@ public override void Update(float frameTime)
}
}
}
// Setting velocity directly for mob movement fucks this so need to make them aware of it.
// joint.Breakpoint = 4000f;

private void OnGrappleCollide(EntityUid uid, GrapplingProjectileComponent component, ref ProjectileEmbedEvent args)
{
Expand Down

0 comments on commit 0b6c11c

Please sign in to comment.