forked from GrimAnticheat/Grim
-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathAimDuplicateLook.java
More file actions
32 lines (26 loc) · 1019 Bytes
/
AimDuplicateLook.java
File metadata and controls
32 lines (26 loc) · 1019 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package ac.grim.grimac.checks.impl.aim;
import ac.grim.grimac.checks.CheckData;
import ac.grim.grimac.checks.type.abstracts.AbstractRotationCheck;
import ac.grim.grimac.player.GrimPlayer;
import ac.grim.grimac.utils.anticheat.update.RotationUpdate;
@CheckData(name = "AimDuplicateLook")
public class AimDuplicateLook extends AbstractRotationCheck {
public AimDuplicateLook(GrimPlayer playerData) {
super(playerData);
}
boolean exempt = false;
@Override
public void process(final RotationUpdate rotationUpdate) {
if (player.packetStateData.lastPacketWasTeleport || player.packetStateData.lastPacketWasOnePointSeventeenDuplicate || player.compensatedEntities.getSelf().getRiding() != null) {
exempt = true;
return;
}
if (exempt) { // Exempt for a tick on teleport
exempt = false;
return;
}
if (rotationUpdate.getFrom().equals(rotationUpdate.getTo())) {
flagAndAlert();
}
}
}