From 749a72a17ec48f70d7dd5556a725ab733d3be719 Mon Sep 17 00:00:00 2001
From: drjaska <drjaska83@gmail.com>
Date: Mon, 8 Mar 2021 21:11:16 +0200
Subject: [PATCH] Added tmayhem regeneration cvar which I previously forgot to
 include outside of sv_tmayhem.qc, whitelisted powerup, team and weaponarena
 cvars as other modes have theirs whitelisted.

---
 gamemodes-server.cfg  | 1 +
 qcsrc/server/world.qc | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/gamemodes-server.cfg b/gamemodes-server.cfg
index 7acb349752..b2a99f49aa 100644
--- a/gamemodes-server.cfg
+++ b/gamemodes-server.cfg
@@ -591,3 +591,4 @@ set g_tmayhem_point_limit -1 "Team Mayhem point limit overriding the mapinfo spe
 set g_tmayhem_point_leadlimit -1 "Team Mayhem point lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 set g_tmayhem_weaponarena "most_available" "starting weapons - takes the same options as g_weaponarena"
 set g_tmayhem_powerups 1 "Allow powerups in team mayhem. Only checked if g_powerups is -1 therefore this will be overridden by g_powerups 1 or 0"
+set g_tmayhem_regenerate 0 "allow players to regenerate hp. rates controlled by hp regeneration and rotting cvars"
diff --git a/qcsrc/server/world.qc b/qcsrc/server/world.qc
index 94612bc2fa..26385ebea9 100644
--- a/qcsrc/server/world.qc
+++ b/qcsrc/server/world.qc
@@ -378,6 +378,8 @@ void cvar_changes_init()
 		BADCVAR("g_spawn_alloweffects");
 		BADCVAR("g_tdm_point_leadlimit");
 		BADCVAR("g_tdm_point_limit");
+		BADCVAR("g_tmayhem_point_leadlimit");
+		BADCVAR("g_tmayhem_point_limit");
 		BADCVAR("leadlimit_and_fraglimit");
 		BADCVAR("leadlimit_override");
 		BADCVAR("pausable");
@@ -452,6 +454,8 @@ void cvar_changes_init()
 		BADCVAR("g_keyhunt_point_limit");
 		BADCVAR("g_keyhunt_teams_override");
 		BADCVAR("g_lms_lives_override");
+		BADCVAR("g_mayhem_regenerate");
+		BADCVAR("g_mayhem_powerups");
 		BADCVAR("g_maplist");
 		BADCVAR("g_maxplayers");
 		BADCVAR("g_mirrordamage");
@@ -467,6 +471,8 @@ void cvar_changes_init()
 		BADCVAR("g_start_delay");
 		BADCVAR("g_superspectate");
 		BADCVAR("g_tdm_teams_override");
+		BADCVAR("g_tmayhem_teams_override");
+		BADCVAR("g_tmayhem_powerups");
 		BADCVAR("g_warmup");
 		BADCVAR("g_weapon_stay"); BADPRESUFFIX("g_", "_weapon_stay");
 		BADCVAR("hostname");
@@ -524,6 +530,8 @@ void cvar_changes_init()
 		BADCVAR("g_ca_weaponarena");
 		BADCVAR("g_freezetag_weaponarena");
 		BADCVAR("g_lms_weaponarena");
+		BADCVAR("g_mayhem_weaponarena");
+		BADCVAR("g_tmayhem_weaponarena");
 		BADCVAR("g_ctf_stalemate_time");
 
 #undef BADPRESUFFIX
-- 
2.39.5