set g_lms_last_join 3 "if g_lms_join_anytime is 0, new players can only join if the worst active player has (fraglimit - g_lms_last_join) or more lives; in other words, new players can no longer join once the worst player loses more than g_lms_last_join lives"
set g_lms_join_anytime 1 "1: new players can join, but get same amount of lives as the worst player; 0: new players can only join if the worst active player has (fraglimit - g_lms_last_join) or more lives"
set g_lms_weaponarena "most_available" "starting weapons - takes the same options as g_weaponarena"
-set g_lms_leader_wp_lives 2 "show waypoints for players leading by this number of lives"
-set g_lms_leader_wp_max_relative 0.5 "show waypoints for leaders only if they are max this fraction of total players"
+set g_lms_leader_lives_diff 2 "players leading by at least this number of lives are considered leaders and are more visible"
+set g_lms_leader_minpercent 0.5 "leading players are not considered leaders only if they are more than this percentage of total players"
set g_lms_leader_wp_time 5 "show waypoints for leaders only for this amount of time"
-set g_lms_leader_wp_time_jitter 10 "jitter waypoint repeat time by this amount of time"
-set g_lms_leader_wp_time_repeat 25 "periodically show again waypoints for leaders after this amount of time"
+set g_lms_leader_wp_interval 25 "periodically show again waypoints for leaders after this amount of time"
+set g_lms_leader_wp_interval_jitter 10 "jitter waypoint interval by this amount of time"
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"
bool autocvar_g_lms_join_anytime;
int autocvar_g_lms_last_join;
bool autocvar_g_lms_regenerate;
-int autocvar_g_lms_leader_wp_lives = 2;
-float autocvar_g_lms_leader_wp_max_relative = 0.5;
+int autocvar_g_lms_leader_lives_diff = 2;
+float autocvar_g_lms_leader_minpercent = 0.5;
+float autocvar_g_lms_leader_wp_interval = 25;
+float autocvar_g_lms_leader_wp_interval_jitter = 10;
float autocvar_g_lms_leader_wp_time = 5;
-float autocvar_g_lms_leader_wp_time_jitter = 10;
-float autocvar_g_lms_leader_wp_time_repeat = 25;
float autocvar_g_lms_dynamic_respawn_delay = 1;
float autocvar_g_lms_dynamic_respawn_delay_base = 2;
float autocvar_g_lms_dynamic_respawn_delay_increase = 3;
int lms_leaders;
bool lms_visible_leaders;
bool lms_visible_leaders_prev;
-float lms_leader_time_jitter;
+float lms_leader_interval_jitter;
// main functions
int LMS_NewPlayerLives()
second_max_lives = lives;
});
- int lives_diff = autocvar_g_lms_leader_wp_lives;
- if (max_lives - second_max_lives >= lives_diff && pl_cnt_with_max_lives <= pl_cnt * autocvar_g_lms_leader_wp_max_relative)
+ int lives_diff = autocvar_g_lms_leader_lives_diff;
+ if (max_lives - second_max_lives >= lives_diff && pl_cnt_with_max_lives <= pl_cnt * autocvar_g_lms_leader_minpercent)
FOREACH_CLIENT(IS_PLAYER(it) && it.frags != FRAGS_PLAYER_OUT_OF_GAME, {
int lives = GameRules_scoring_add(it, LMS_LIVES, 0);
if (lives == max_lives)
player.frags = FRAGS_PLAYER_OUT_OF_GAME;
TRANSMUTE(Observer, player);
}
- if (autocvar_g_lms_leader_wp_lives > 0)
+ if (autocvar_g_lms_leader_lives_diff > 0)
lms_UpdateLeaders();
}
MUTATOR_HOOKFUNCTION(lms, SV_StartFrame)
{
float leader_time = autocvar_g_lms_leader_wp_time;
- float leader_repeat_time = leader_time + autocvar_g_lms_leader_wp_time_repeat;
+ float leader_interval = leader_time + autocvar_g_lms_leader_wp_interval;
lms_visible_leaders_prev = lms_visible_leaders;
- lms_visible_leaders = (time % leader_repeat_time < leader_time);
+ lms_visible_leaders = (time % leader_interval < leader_time);
if (lms_visible_leaders_prev && !lms_visible_leaders)
- lms_leader_time_jitter = random() * autocvar_g_lms_leader_wp_time_jitter;
- leader_repeat_time += lms_leader_time_jitter;
+ lms_leader_interval_jitter = random() * autocvar_g_lms_leader_wp_interval_jitter;
+ leader_interval += lms_leader_interval_jitter;
lms_leaders = 0;
FOREACH_CLIENT(true, {
MUTATOR_HOOKFUNCTION(lms, PlayerDied)
{
- if (!warmup_stage && autocvar_g_lms_leader_wp_lives > 0)
+ if (!warmup_stage && autocvar_g_lms_leader_lives_diff > 0)
lms_UpdateLeaders();
}