Skip to content

Commit

Permalink
Fix pressure issues with other filters
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuuuube committed Jan 12, 2022
1 parent ce59be2 commit e6d10a4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Kuuube's_Chatter_Exterminator/Chatter_Exterminator_Smooth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public Kuuube_s_CHATTER_EXTERMINATOR_SMOOTH() { }
private readonly float _AntichatterOffsetY = 15;
private readonly float _Xoffset = 1.96f;
private readonly float _FuncStretch = 1.7f;
private uint pressure;

public Vector2 Filter(Vector2 calcTarget)
{
Expand Down Expand Up @@ -56,6 +57,7 @@ protected override void ConsumeState()
if (State is ITabletReport report)
{
this.targetPos = report.Position;
this.pressure = report.Pressure;
calcTarget = targetPos;
}
else
Expand All @@ -67,6 +69,7 @@ protected override void UpdateState()
if (State is ITabletReport report)
{
report.Position = Filter(calcTarget);
report.Pressure = this.pressure;
State = report;
}

Expand Down

0 comments on commit e6d10a4

Please sign in to comment.