diff --git a/src/fr/neatmonster/nocheatplus/checks/combined/Combined.java b/src/fr/neatmonster/nocheatplus/checks/combined/Combined.java index 5e1ab895..807215a4 100644 --- a/src/fr/neatmonster/nocheatplus/checks/combined/Combined.java +++ b/src/fr/neatmonster/nocheatplus/checks/combined/Combined.java @@ -83,7 +83,7 @@ public class Combined { if (total > threshold){ // Add time final float amount = ((total - threshold) / threshold * 1000f); - data.timeFreeze = Math.max(data.timeFreeze, now + (long) amount); + data.timeFreeze = Math.max(data.timeFreeze, (long) Math.max(cc.yawRatePenaltyFactor * ((float) now + amount) , cc.yawRatePenaltyMin)); // TODO: balance (100 ... 200 ) ? if (cc.yawRateImprobable && Improbable.check(player, amount / 100f, now)) cancel = true; diff --git a/src/fr/neatmonster/nocheatplus/checks/combined/CombinedConfig.java b/src/fr/neatmonster/nocheatplus/checks/combined/CombinedConfig.java index b965fb0b..114e34e2 100644 --- a/src/fr/neatmonster/nocheatplus/checks/combined/CombinedConfig.java +++ b/src/fr/neatmonster/nocheatplus/checks/combined/CombinedConfig.java @@ -58,8 +58,10 @@ public class CombinedConfig extends ACheckConfig { public final boolean invulnerableTriggerFallDistance; // Last yaw tracking - public final float yawRate; - public final boolean yawRateImprobable; + public final float yawRate; + public final boolean yawRateImprobable; + public final float yawRatePenaltyFactor; + public final int yawRatePenaltyMin; public CombinedConfig(final ConfigFile config) { improbableCheck = config.getBoolean(ConfPaths.COMBINED_IMPROBABLE_CHECK, false); @@ -104,6 +106,8 @@ public class CombinedConfig extends ACheckConfig { invulnerableTriggerFallDistance = config.getBoolean(ConfPaths.COMBINED_INVULNERABLE_TRIGGERS_FALLDISTANCE); yawRate = config.getInt(ConfPaths.COMBINED_YAWRATE_RATE); yawRateImprobable = config.getBoolean(ConfPaths.COMBINED_YAWRATE_IMPROBABLE); + yawRatePenaltyFactor = (float) config.getDouble(ConfPaths.COMBINED_YAWRATE_PENALTY_FACTOR); + yawRatePenaltyMin = config.getInt(ConfPaths.COMBINED_YAWRATE_PENALTY_MIN); } @Override diff --git a/src/fr/neatmonster/nocheatplus/config/ConfPaths.java b/src/fr/neatmonster/nocheatplus/config/ConfPaths.java index 052ea229..438583de 100644 --- a/src/fr/neatmonster/nocheatplus/config/ConfPaths.java +++ b/src/fr/neatmonster/nocheatplus/config/ConfPaths.java @@ -318,6 +318,9 @@ public abstract class ConfPaths { private static final String COMBINED_YAWRATE = COMBINED + "yawrate."; public static final String COMBINED_YAWRATE_RATE = COMBINED_YAWRATE + "rate"; public static final String COMBINED_YAWRATE_IMPROBABLE = COMBINED_YAWRATE + "improbable"; + private static final String COMBINED_YAWRATE_PENALTY = COMBINED_YAWRATE + "penalty."; + public static final String COMBINED_YAWRATE_PENALTY_FACTOR = COMBINED_YAWRATE_PENALTY + "factor"; + public static final String COMBINED_YAWRATE_PENALTY_MIN = COMBINED_YAWRATE_PENALTY + "minimum"; /* * 888'Y88 ,e, 888 d8 diff --git a/src/fr/neatmonster/nocheatplus/config/DefaultConfig.java b/src/fr/neatmonster/nocheatplus/config/DefaultConfig.java index 806b0ef5..61086aea 100644 --- a/src/fr/neatmonster/nocheatplus/config/DefaultConfig.java +++ b/src/fr/neatmonster/nocheatplus/config/DefaultConfig.java @@ -242,6 +242,8 @@ public class DefaultConfig extends ConfigFile { set(ConfPaths.COMBINED_INVULNERABLE_MODIFIERS + ".all", 0); set(ConfPaths.COMBINED_YAWRATE_RATE , 380); + set(ConfPaths.COMBINED_YAWRATE_PENALTY_FACTOR, 1.0); + set(ConfPaths.COMBINED_YAWRATE_PENALTY_MIN, 250); set(ConfPaths.COMBINED_YAWRATE_IMPROBABLE, true); /*