Bogo-fix first attack after data removal triggering...

fight.noswing.
This commit is contained in:
asofold 2018-01-20 01:03:49 +01:00
parent b60d63d2e2
commit 6d04795850
2 changed files with 5 additions and 2 deletions

View File

@ -202,7 +202,7 @@ public class FightData extends ACheckData implements IRemoveSubCheckData {
public int godModeAcc = 0;
// Data of the no swing check.
public boolean noSwingArmSwung;
public boolean noSwingArmSwung = true; // TODO: First is free for now, 1.12.2, other?
// Data of the reach check.
public double reachMod = 1.0;

View File

@ -719,7 +719,10 @@ public class FightListener extends CheckListener implements JoinLeaveListener{
@EventHandler(priority = EventPriority.MONITOR)
public void onPlayerAnimation(final PlayerAnimationEvent event) {
// Set a flag telling us that the arm has been swung.
// TODO: Packet inversion ~ tackle via time stamp (tick) + counter (allow first).
/*
* TODO: First one always fails: Packet inversion on 1.12.2? This could
* be moved to packet level (register either).
*/
FightData.getData(event.getPlayer()).noSwingArmSwung = true;
}