LiquidBounce icon indicating copy to clipboard operation
LiquidBounce copied to clipboard

Fixed modules that utilize CpsScheduler being flagged on anticheats on target switch.

Open mems01 opened this issue 2 years ago • 13 comments

So basically in dumb talk, if for example a module is automatically hitting a player with 6 CPS, then you re-enable the module and hit a player again, it will hit with almost double the CPS, causing anticheats to detect you for it.

Video to demonstrate what I mean: https://streamable.com/ghmavv

EDIT: Maybe it's just CpsScheduler in need of an improvement.

mems01 avatar Apr 09 '22 19:04 mems01

Yes, but you literally defeated the purpose of CpsScheduler. Minecraft counts the clicks of your mouse until the next tick and will do multiple clicks in one tick. It is more likely that we should improve the scheduler instead of removing it.

1zun4secondary avatar Apr 09 '22 19:04 1zun4secondary

Yeah, I noticed that CPS is now less than the requested amount. Perhaps I should close this PR?

mems01 avatar Apr 09 '22 19:04 mems01

How much CPS did you set? It seems NCP is counting more than 15 clicks, which is way too much for legit users.

1zun4secondary avatar Apr 09 '22 19:04 1zun4secondary

I tried 20-20 CPS, but it gave a maximum of 13.

mems01 avatar Apr 09 '22 19:04 mems01

With CPS Scheduler or without?

1zun4secondary avatar Apr 09 '22 19:04 1zun4secondary

Without it, if you mean replacing the repeat part with an if statement.

mems01 avatar Apr 09 '22 19:04 mems01

Yes, this is pretty much normal because it is milliseconds based and not ticks based and without the repeat it will not work correctly and miss a few clicks.

1zun4secondary avatar Apr 09 '22 19:04 1zun4secondary

But when you set like 10cps with CPS Scheduler (with repeat) does it still flag? I don't remember having any issues with it when I was making it and I did test it on every major anticheat.

1zun4secondary avatar Apr 09 '22 19:04 1zun4secondary

Yes, it does flag if I re-enable the module like I did in the video. What I notice is that at whatever CPS it is set to, it almost doubles it if you do that "trick"

mems01 avatar Apr 09 '22 19:04 mems01

Ok very weird. Should not happen, but I'll look into it when I'm back to nextgen.

1zun4secondary avatar Apr 09 '22 19:04 1zun4secondary

Forgot to mention, there's also a problem when setting CPS values to 1-1, it hits once then never hits again.

mems01 avatar Apr 11 '22 16:04 mems01

Did a few tests with c45f037, and I can say that there are no issues anymore. Sudden CPS increase doesn't occur, 1-1 CPS making the function "freeze" is fixed, plus the code is simplified.

mems01 avatar May 31 '22 15:05 mems01

Looks good, but I'll have to try it.

1zun4secondary avatar Jul 16 '22 11:07 1zun4secondary

Here, a video in case you are busy:

https://streamable.com/9v8w88

mems01 avatar Aug 23 '22 16:08 mems01