Skip to content

Commit

Permalink
Update Chatter_Exterminator_Interp.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuuuube authored Dec 4, 2020
1 parent f35e634 commit 92f1d05
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Kuuube's_Chatter_Exterminator/Chatter_Exterminator_Interp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public AntiChatter(ITimer scheduler) : base(scheduler) { }
private SyntheticTabletReport report;
private const float threshold = 0.9f;
private float _AntichatterOffsetY = 15;
private float _Xoffset = 1.96f;
private float _FuncStretch = 1.7f;

public override void UpdateState(SyntheticTabletReport report)
{
Expand Down Expand Up @@ -50,7 +52,7 @@ public Vector2 Filter(Vector2 calcTarget)
float target = 1 - threshold;
float weight = (float)(1.0 - (1.0 / Pow((float)(1.0 / target), (float)1 / 1000)));

var weightModifier = (float)Pow(((distance * -1 + (AntichatterStrength - 100)) / 100), 999) + _AntichatterOffsetY;
var weightModifier = (float)Pow(((distance * -1 + (AntichatterStrength - _FuncStretch)) / _Xoffset), 19) + _AntichatterOffsetY;

// Limit minimum
if (weightModifier + _AntichatterOffsetY < 0)
Expand All @@ -70,4 +72,4 @@ public Vector2 Filter(Vector2 calcTarget)
[Property("Chatter Extermination Strength")]
public float AntichatterStrength { set; get; } = 3;
}
}
}

0 comments on commit 92f1d05

Please sign in to comment.