]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
ka, tka: remove g_*_score_timeinterval cvars
authorbones_was_here <bones_was_here@xonotic.au>
Thu, 27 Feb 2025 17:55:47 +0000 (03:55 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Fri, 14 Mar 2025 18:18:36 +0000 (04:18 +1000)
These cvars were made redundant because all rates of BC points
accumulation can be configured with the timepoints (per second) cvar.

gamemodes-server.cfg
qcsrc/common/gamemodes/gamemode/keepaway/sv_keepaway.qc
qcsrc/common/gamemodes/gamemode/tka/sv_tka.qc

index 0a8c51eb6f46cb3b01c35575e6c01043053f906b..260d9e7e880cb475e5ec4db13b05cea1bace74bc 100644 (file)
@@ -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"
index b07e4327376d00f97aedc65ad133d154c76b9e95..7944863fbf8ddf8832cbd3ba8e159dab0e28f21b 100644 (file)
@@ -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;
index 04f686ca7eb0be46c884a4471e8790a3e22bcc60..5180ef224420c3d74038321310c09f07c9d933b4 100644 (file)
@@ -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;