* Grappling gun ReelRate can be changed
Moves ReelRate constant from SharedGrapplingGunSystem to GrapplingGunComponent, so it's Reel speed can be changed.
* Add coment + remove redudant
public const string GrapplingJoint = "grappling";
- public const float ReelRate = 2.5f;
-
public override void Initialize()
{
base.Initialize();
}
// TODO: This should be on engine.
- distance.MaxLength = MathF.Max(distance.MinLength, distance.MaxLength - ReelRate * frameTime);
+ distance.MaxLength = MathF.Max(distance.MinLength, distance.MaxLength - grappling.ReelRate * frameTime);
distance.Length = MathF.Min(distance.MaxLength, distance.Length);
_physics.WakeBody(joint.BodyAUid);
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class GrapplingGunComponent : Component
{
+ /// <summary>
+ /// Hook's reeling force and speed - the higher the number, the faster the hook rewinds.
+ /// </summary>
+ [DataField, AutoNetworkedField]
+ public float ReelRate = 2.5f;
+
[DataField("jointId"), AutoNetworkedField]
public string Joint = string.Empty;