mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-27 02:48:04 +01:00
Corrections for fastheal: Missing cancel action + out of range health.
This commit is contained in:
parent
ce52c9fe7c
commit
3e38b087e6
@ -26,6 +26,7 @@ public class FastHeal extends Check {
|
||||
// Reset.
|
||||
data.fastHealVL *= 0.96;
|
||||
// Only add a predefined amount to the buffer.
|
||||
// TODO: Confine regain-conditions further? (e.g. if vl < 0.1)
|
||||
data.fastHealBuffer = Math.min(cc.fastHealBuffer, data.fastHealBuffer + 50L);
|
||||
}
|
||||
else{
|
||||
|
@ -293,7 +293,7 @@ public class FightListener extends CheckListener implements JoinLeaveListener{
|
||||
// It requested to "cancel" the players invulnerability, so set his noDamageTicks to 0.
|
||||
damagedPlayer.setNoDamageTicks(0);
|
||||
}
|
||||
if (BridgeHealth.getHealth(damagedPlayer) == BridgeHealth.getMaxHealth(damagedPlayer)){
|
||||
if (BridgeHealth.getHealth(damagedPlayer) >= BridgeHealth.getMaxHealth(damagedPlayer)){
|
||||
// TODO: Might use the same FightData instance for GodMode.
|
||||
if (damagedData.fastHealBuffer < 0){
|
||||
// Reduce negative buffer with each full health.
|
||||
|
@ -26,7 +26,7 @@ public class DefaultConfig extends ConfigFile {
|
||||
* NCP build needed for this config.
|
||||
* (Should only increment with changing or removing paths.)
|
||||
*/
|
||||
public static final int buildNumber = 490;
|
||||
public static final int buildNumber = 632;
|
||||
|
||||
// TODO: auto input full version or null to an extra variable or several [fail safe for other syntax checking]?
|
||||
|
||||
@ -337,7 +337,7 @@ public class DefaultConfig extends ConfigFile {
|
||||
set(ConfPaths.FIGHT_FASTHEAL_CHECK, true);
|
||||
set(ConfPaths.FIGHT_FASTHEAL_INTERVAL, 4000L);
|
||||
set(ConfPaths.FIGHT_FASTHEAL_BUFFER, 1000L);
|
||||
set(ConfPaths.FIGHT_FASTHEAL_ACTIONS, "cancel vl>10 cancel log:fastheal:0:10:i vl>30 log:fastheal:0:10:if");
|
||||
set(ConfPaths.FIGHT_FASTHEAL_ACTIONS, "cancel vl>10 cancel log:fastheal:0:10:i vl>30 cancel log:fastheal:0:10:if");
|
||||
|
||||
set(ConfPaths.FIGHT_GODMODE_CHECK, true);
|
||||
set(ConfPaths.FIGHT_GODMODE_LAGMINAGE, 1100); // TODO: ndt/2 => 500-600.
|
||||
|
Loading…
Reference in New Issue
Block a user