Skip to content

Commit

Permalink
Update Chatter_Exterminator_Filter.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuuuube authored Dec 4, 2020
1 parent 212c34d commit f35e634
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Kuuube's_Chatter_Exterminator/Chatter_Exterminator_Filter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public class Chatter_Exterminator_Filter : IFilter
private Vector2 _lastPos;
private const float _threshold = 0.9f;
private float _AntichatterOffsetY = 15;
private float _Xoffset = 1.96f;
private float _FuncStretch = 1.7f;
public Vector2 Filter(Vector2 point)
{
Vector2 calcTarget = new Vector2();
Expand All @@ -29,7 +31,7 @@ public Vector2 Filter(Vector2 point)
float target = 1 - _threshold;
float weight = (float)(1.0 - (1.0 / (float)(1.0 / target)));

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

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

0 comments on commit f35e634

Please sign in to comment.