set g_lms_dynamic_respawn_delay 1 "increase player respawn delay based on the number of lives less than the leader (NOTE: delay doesn't increase when only 2 players are left alive)"
set g_lms_dynamic_respawn_delay_base 2 "base player respawn delay"
set g_lms_dynamic_respawn_delay_increase 3 "increase base player respawn delay by this amount of time for each life less than the leader"
+set g_lms_dynamic_respawn_delay_max 20 "max player respawn delay"
set g_lms_dynamic_vampire 1 "attackers receive a fraction of health removed from enemies based on the number of lives less than the enemy"
set g_lms_dynamic_vampire_factor_base 0.1 "base vampire factor"
set g_lms_dynamic_vampire_factor_increase 0.1 "increase vampire factor by this fraction for each life less than the enemy"
float autocvar_g_lms_dynamic_respawn_delay;
float autocvar_g_lms_dynamic_respawn_delay_base;
float autocvar_g_lms_dynamic_respawn_delay_increase;
+float autocvar_g_lms_dynamic_respawn_delay_max;
bool autocvar_g_lms_dynamic_vampire;
float autocvar_g_lms_dynamic_vampire_factor_base;
float autocvar_g_lms_dynamic_vampire_factor_increase;
if (pl_cnt == 1) // player wasn't counted
max_lives = 0;
- player.respawn_time = time + autocvar_g_lms_dynamic_respawn_delay_base +
+ float dlay = autocvar_g_lms_dynamic_respawn_delay_base +
autocvar_g_lms_dynamic_respawn_delay_increase * max(0, max_lives - pl_lives);
+ player.respawn_time = time + min(autocvar_g_lms_dynamic_respawn_delay_max, dlay);
return true;
}