Throwing system hotfix (#29935)

throwing system hotfix
This commit is contained in:
slarticodefast
2024-07-12 12:32:47 +02:00
committed by GitHub
parent b5e49c9c07
commit 560df6ed97
2 changed files with 1 additions and 9 deletions

View File

@@ -42,7 +42,7 @@ public sealed partial class HandsComponent : Component
/// </summary> /// </summary>
[DataField] [DataField]
[ViewVariables(VVAccess.ReadWrite)] [ViewVariables(VVAccess.ReadWrite)]
public float BaseThrowspeed { get; set; } = 10f; public float BaseThrowspeed { get; set; } = 11f;
/// <summary> /// <summary>
/// Distance after which longer throw targets stop increasing throw impulse. /// Distance after which longer throw targets stop increasing throw impulse.

View File

@@ -26,11 +26,6 @@ public sealed class ThrowingSystem : EntitySystem
public const float PushbackDefault = 2f; public const float PushbackDefault = 2f;
/// <summary>
/// The minimum amount of time an entity needs to be thrown before the timer can be run.
/// Anything below this threshold never enters the air.
/// </summary>
public const float MinFlyTime = 0.15f;
public const float FlyTimePercentage = 0.8f; public const float FlyTimePercentage = 0.8f;
private float _frictionModifier; private float _frictionModifier;
@@ -168,9 +163,6 @@ public sealed class ThrowingSystem : EntitySystem
var flyTime = direction.Length() / baseThrowSpeed; var flyTime = direction.Length() / baseThrowSpeed;
if (compensateFriction) if (compensateFriction)
flyTime *= FlyTimePercentage; flyTime *= FlyTimePercentage;
if (flyTime < MinFlyTime)
flyTime = 0f;
comp.ThrownTime = _gameTiming.CurTime; comp.ThrownTime = _gameTiming.CurTime;
comp.LandTime = comp.ThrownTime + TimeSpan.FromSeconds(flyTime); comp.LandTime = comp.ThrownTime + TimeSpan.FromSeconds(flyTime);
comp.PlayLandSound = playSound; comp.PlayLandSound = playSound;