From a795913ad015dafdf68faa35ab9dd42c8231c9dd Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Fri, 28 Feb 2025 03:55:47 +1000 Subject: [PATCH] ka, tka: remove g_*_score_timeinterval cvars These cvars were made redundant because all rates of BC points accumulation can be configured with the timepoints (per second) cvar. --- gamemodes-server.cfg | 6 ++---- qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc | 8 ++------ qcsrc/common/gamemodes/gamemode/tka/sv_tka.qc | 8 ++------ 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/gamemodes-server.cfg b/gamemodes-server.cfg index 0a8c51eb6..260d9e7e8 100644 --- a/gamemodes-server.cfg +++ b/gamemodes-server.cfg @@ -434,8 +434,7 @@ set g_freezetag_weaponarena "most_available" "starting weapons. takes the same o set g_keepaway 0 "Keepaway: game mode which focuses around a ball" // script-ignore set g_keepaway_score_bckill 1 "points for killing the ball carrier (Ball Carrier Kill)" set g_keepaway_score_killac 1 "points for kills while holding the ball (Kill As Carrier)" -set g_keepaway_score_timeinterval 1 "amount of time it takes between intervals for timepoints to be added to the score" -set g_keepaway_score_timepoints 0 "points to add to score per timeinterval; \"0\" = no points" +set g_keepaway_score_timepoints 0 "points to add to ball carrier's score per second" set g_keepaway_ballcarrier_effects 8 "add together the numbers you want; EF_ADDITIVE (32) / EF_NODEPTHTEST (8192) / EF_DIMLIGHT (8)" set g_keepaway_ballcarrier_highspeed 1 "speed multiplier done to the person holding the ball (recommended when used with some mutators)" set g_keepaway_ballcarrier_damage 1 "damage multiplier while holding the ball" @@ -674,8 +673,7 @@ set g_tka_point_leadlimit -1 "TKA point lead limit overriding the mapinfo specif set g_tka_score_team 1 "allow points to be awarded to teammates for any kill when the ball is in your team's possession" set g_tka_score_bckill 1 "points for killing the ball carrier (Ball Carrier Kill)" set g_tka_score_killac 1 "points for kills while holding the ball (Kill As Carrier)" -set g_tka_score_timeinterval 1 "amount of time it takes between intervals for timepoints to be added to the score" -set g_tka_score_timepoints 0 "points to add to score per timeinterval; \"0\" = no points" +set g_tka_score_timepoints 0 "points to add to ball carrier's team's score per second" set g_tka_ballcarrier_effects 8 "add together the numbers you want; EF_ADDITIVE (32) / EF_NODEPTHTEST (8192) / EF_DIMLIGHT (8)" set g_tka_ballcarrier_highspeed 1 "speed multiplier done to the person holding the ball (recommended when used with some mutators)" set g_tka_ballcarrier_damage 1 "damage multiplier while holding the ball" diff --git a/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc b/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc index b07e43273..7944863fb 100644 --- a/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc +++ b/qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc @@ -25,7 +25,6 @@ bool autocvar_g_keepaway_noncarrier_warn; int autocvar_g_keepaway_score_bckill; int autocvar_g_keepaway_score_killac; int autocvar_g_keepaway_score_timepoints; -float autocvar_g_keepaway_score_timeinterval; float autocvar_g_keepawayball_damageforcescale; int autocvar_g_keepawayball_effects; float autocvar_g_keepawayball_respawntime; @@ -93,11 +92,8 @@ MUTATOR_HOOKFUNCTION(ka, reset_map_global) /// runs (only) while a player is carrying the ball void ka_TimeScoring(entity this) { - if (autocvar_g_keepaway_score_timepoints && autocvar_g_keepaway_score_timeinterval) - { - float timescore = autocvar_g_keepaway_score_timepoints / autocvar_g_keepaway_score_timeinterval; - GameRules_scoring_add_float2int(this.owner, SCORE, timescore * frametime, timepoints_accum, 1); - } + if (autocvar_g_keepaway_score_timepoints) + GameRules_scoring_add_float2int(this.owner, SCORE, autocvar_g_keepaway_score_timepoints * frametime, timepoints_accum, 1); GameRules_scoring_add(this.owner, KEEPAWAY_BCTIME, frametime); this.nextthink = time; diff --git a/qcsrc/common/gamemodes/gamemode/tka/sv_tka.qc b/qcsrc/common/gamemodes/gamemode/tka/sv_tka.qc index 04f686ca7..5180ef224 100644 --- a/qcsrc/common/gamemodes/gamemode/tka/sv_tka.qc +++ b/qcsrc/common/gamemodes/gamemode/tka/sv_tka.qc @@ -21,7 +21,6 @@ int autocvar_g_tka_score_bckill; int autocvar_g_tka_score_killac; bool autocvar_g_tka_score_team; int autocvar_g_tka_score_timepoints; -float autocvar_g_tka_score_timeinterval; float autocvar_g_tkaball_damageforcescale; int autocvar_g_tkaball_effects; float autocvar_g_tkaball_respawntime; @@ -90,11 +89,8 @@ MUTATOR_HOOKFUNCTION(tka, reset_map_global) /// runs (only) while a player is carrying the ball void tka_TimeScoring(entity this) { - if (autocvar_g_tka_score_timepoints && autocvar_g_tka_score_timeinterval) - { - float timescore = autocvar_g_tka_score_timepoints / autocvar_g_tka_score_timeinterval; - GameRules_scoring_add_team_float2int(this.owner, SCORE, timescore * frametime, timepoints_accum, 1); - } + if (autocvar_g_tka_score_timepoints) + GameRules_scoring_add_team_float2int(this.owner, SCORE, autocvar_g_tka_score_timepoints * frametime, timepoints_accum, 1); GameRules_scoring_add(this.owner, TKA_BCTIME, frametime); this.nextthink = time; -- 2.39.5