Grappling gun's ReelRate can be changed (#30493)
* 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
This commit is contained in:
@@ -31,8 +31,6 @@ public abstract class SharedGrapplingGunSystem : EntitySystem
|
||||
|
||||
public const string GrapplingJoint = "grappling";
|
||||
|
||||
public const float ReelRate = 2.5f;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -187,7 +185,7 @@ public abstract class SharedGrapplingGunSystem : EntitySystem
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
||||
Reference in New Issue
Block a user