Thanks to Silvers - for the healthbuffer algorithm.
Look at this for continue maintain!
https://forums.alliedmods.net/showthread.php?t=336073
Leave the fight to start automatic healing. Anytime join in fight will break the healing and restart the waiting.
PHP Code:
// how many health buffer instanly regen after taking damage when both heal done and is going to die
// -
// Default: "1.0"
// Minimum: "0.000000"
acs_heal_fix "1.0"
// lower than the health to heal
// -
// Default: "30.1"
// Minimum: "2.100000"
acs_heal_max "30.1"
// how many health buffer regen once
// -
// Default: "1.0"
// Minimum: "0.100000"
acs_heal_point "1.0"
// repeat interval after healing start
// -
// Default: "0.1"
// Minimum: "0.100000"
acs_heal_repeat "0.1"
// set none zero to emit beatsound when healing
// -
// Default: "1"
acs_heal_sound "1"
// how long time need to wait after leave fight
// -
// Default: "5.0"
// Minimum: "0.100000"
acs_heal_wait "5.0"
change log:
Code:
14.2.6 update (2022-01-22):
better code.
14.2.5 update (2022-01-21):
disable beatsound for bots.
14.2.4 update (2022-01-19):
better code.
14.2.3 update (2022-01-16):
better code.
14.2.2 update (2022-01-15):
totally improve "acs_heal_fix".
14.2.1 update (2022-01-15):
improve "acs_heal_fix".
14.2.0 update (2022-01-15):
add new cvar to fix health buffer hud display after taking damage when health done and is going to die.
these sm_cvar are changed, please remove the old cfg file and automatic spawn a new one by run game.
14.1.2 update (2022-01-14):
simplified cvars.
these sm_cvar are changed, please remove the old cfg file and automatic spawn a new one by run game.
13.1.3 update (2021-10-23):
minor improve.
13.1.2 update (2021-10-23):
minor fixup.
13.1.1 update (2021-10-23):
totally and customizable fix the heath buffer max may deviation.
these sm_cvar are changed, please remove the old cfg file and automatic spawn a new one by run game.
13.1.0 update (2021-10-23):
fix the heath buffer max may deviation 1.
add new sm_cvar to play the beat sound when healing.
these sm_cvar are changed, please remove the old cfg file and automatic spawn a new one by run game.
13.0.1 update (2021-10-23):
minor improve.
13.0.0 update (2021-10-23):
able to keep the health buffer when heal done.
instantly heal at every level start.
12.3.2 update (2021-10-22):
better code.
12.3.1 update (2021-10-22):
better code.
12.3.0 update (2021-10-22):
improve precision of detection.
12.2.4 update (2021-10-21):
improve code.
12.2.3 update (2021-10-16):
update name of sm_cvar, these sm_cvar are changed, please remove the old cfg file and automatic spawn a new one by run game.
12.2.2 update (2021-10-16):
since the version, won't change filename with update.
12.2.1 update (2021-10-16):
standardization code.
12.2.0 update (2021-10-16):
update name of sm_cvar, these sm_cvar are changed, please remove the old cfg file and automatic spawn a new one by run game.
12.1.1 update (2021-10-16):
standardization code.
12.1.0 update (2021-10-09):
also wait to healing when get staggerd.
12.0.1 update (2021-10-09):
standardization code.
12.0 update (2021-10-09):
also wait to healing when get controlled by special infecteds.
11.0 update (2021-10-04):
improve precise again. shove survivor or none-enemy won't break healing.
fix healing lose when a bot replaced a player.
10.1 update (2021-09-30):
avoid some cases afk will break healing.
10.0 update (2021-09-28):
use event instead of buttons detect, more precise and more relaxed.
these sm_cvar are changed, please remove the old cfg file and automatic spawn a new one by run game.
9.2 update (reupload again for better code.):
improve timer performance when acsheal_between too low.
9.1 update:
minor improve.
9.0 update:
healing instant after first time wait done. these sm_cvar are changed, please remove the old cfg file and automatic spawn a new one by run game.
8.5 update:
better code.
8.0 to 8.4 update(reupload):
afk won't break waiting and healing!.
7.9 update:
only automatic wait to heal when health lower than healing max.