]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fixed whitelisting and gave some score cvars better names
authordrjaska <drjaska83@gmail.com>
Wed, 12 May 2021 19:30:04 +0000 (22:30 +0300)
committerdrjaska <drjaska83@gmail.com>
Wed, 12 May 2021 19:30:04 +0000 (22:30 +0300)
gamemodes-server.cfg
qcsrc/common/gamemodes/gamemode/mayhem/sv_mayhem.qc
qcsrc/common/gamemodes/gamemode/mayhem/sv_mayhem.qh
qcsrc/common/gamemodes/gamemode/tmayhem/sv_tmayhem.qc
qcsrc/common/gamemodes/gamemode/tmayhem/sv_tmayhem.qh
qcsrc/server/world.qc

index 4d3821d17bf8d45e077f03feb351d96888389531..c5979dde6d7cc5d0343c91d2665ca06d49247c22 100644 (file)
@@ -587,10 +587,10 @@ set g_tmayhem_scoringmethod 1 "1: 25% of the score is based on kills and 75% of
 set g_mayhem_fraglimit 30 "Team Mayhem basis for how many frags until the match ends, edit this over point_limit preferably"
 set g_tmayhem_fraglimit 50 "Team Mayhem basis for how many frags until the match ends, edit this over point_limit preferably"
 
-set g_mayhem_point_limit 1000 "Mayhem visual score limit overriding the mapinfo specified one"
-set g_tmayhem_point_limit 1000 "Team Mayhem visual score limit overriding the mapinfo specified one"
+set g_mayhem_visual_score_limit 1000 "Mayhem visual score limit overriding the mapinfo specified one"
+set g_tmayhem_visual_score_limit 1000 "Team Mayhem visual score limit overriding the mapinfo specified one"
 
-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_score_leadlimit -1 "Team Mayhem score lead limit(based on tmayhem_visual_score_limit, not tmayhem_fraglimit) overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
 
 set g_mayhem_weaponarena "most_available" "starting weapons - takes the same options as g_weaponarena"
 set g_tmayhem_weaponarena "most_available" "starting weapons - takes the same options as g_weaponarena"
index ded24baaaf1cb57b3a3e02ae37dc7f7d45c6a5c1..70bd1dcf8476a71f378a51d3bdf6875a7219ad4a 100644 (file)
@@ -13,10 +13,10 @@ void mayhem_DelayedInit(entity this)
 
 void mayhem_Initialize()
 {
-       if(autocvar_g_mayhem_point_limit > 0 && autocvar_g_mayhem_fraglimit > 0)
-               mayhempointmultiplier = autocvar_g_mayhem_point_limit / autocvar_g_mayhem_fraglimit;
+       if(autocvar_g_mayhem_visual_score_limit > 0 && autocvar_g_mayhem_fraglimit > 0)
+               mayhempointmultiplier = autocvar_g_mayhem_visual_score_limit / autocvar_g_mayhem_fraglimit;
 
-       GameRules_limit_score(autocvar_g_mayhem_point_limit);
+       GameRules_limit_score(autocvar_g_mayhem_visual_score_limit);
 
        InitializeEntity(NULL, mayhem_DelayedInit, INITPRIO_GAMETYPE);
 }
index 328dedc60296c8e714fca575f1bcf8ae6d453b5c..9393b311f70d2df3b1576a3c430466b52f46765a 100644 (file)
@@ -3,7 +3,7 @@
 #include <common/mutators/base.qh>
 //someone who understands numbers better check if 2 following floats can be ints without imprecision, I'm scared of spaghettimonsters
 float autocvar_g_mayhem_fraglimit;
-float autocvar_g_mayhem_point_limit;
+float autocvar_g_mayhem_visual_score_limit;
 float mayhempointmultiplier = 1000/30;
 void mayhem_Initialize();
 
index 51c68c2005849554bacb1cc2fd6c5609c650abbe..acb10404e90fb35040ebb6cc17e18fc242c762aa 100644 (file)
@@ -47,13 +47,13 @@ void tmayhem_DelayedInit(entity this)
 
 void tmayhem_Initialize()
 {
-       if(autocvar_g_tmayhem_point_limit != 0 && autocvar_g_tmayhem_fraglimit != 0)
-               tmayhempointmultiplier = autocvar_g_tmayhem_point_limit / autocvar_g_tmayhem_fraglimit;
+       if(autocvar_g_tmayhem_visual_score_limit != 0 && autocvar_g_tmayhem_fraglimit != 0)
+               tmayhempointmultiplier = autocvar_g_tmayhem_visual_score_limit / autocvar_g_tmayhem_fraglimit;
 
        GameRules_teams(true);
        GameRules_spawning_teams(autocvar_g_tmayhem_team_spawns);
-       GameRules_limit_score(autocvar_g_tmayhem_point_limit);
-       GameRules_limit_lead(autocvar_g_tmayhem_point_leadlimit);
+       GameRules_limit_score(autocvar_g_tmayhem_visual_score_limit);
+       GameRules_limit_lead(autocvar_g_tmayhem_score_leadlimit);
 
        InitializeEntity(NULL, tmayhem_DelayedInit, INITPRIO_GAMETYPE);
 }
index 920f314f4ad1fab768afc49e29dc07e5443e1423..d8dbcdf76df7646a090ba42616678cf1aaed39d1 100644 (file)
@@ -3,8 +3,8 @@
 #include <common/mutators/base.qh>
 //someone who understands numbers better check if 2 following floats can be ints without imprecision, I'm scared of spaghettimonsters
 float autocvar_g_tmayhem_fraglimit;
-float autocvar_g_tmayhem_point_limit;
-float autocvar_g_tmayhem_point_leadlimit;
+float autocvar_g_tmayhem_visual_score_limit;
+float autocvar_g_tmayhem_score_leadlimit;
 bool autocvar_g_tmayhem_team_spawns;
 float tmayhempointmultiplier = 1000/50;
 void tmayhem_Initialize();
index 3f4445d082abf50457afacd65d07d08915c5cf97..ec031b34d1942084ce8f9097530af710918fec7a 100644 (file)
@@ -378,16 +378,15 @@ 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("g_mayhem_fraglimit");
+               BADCVAR("g_tmayhem_fraglimit");
+               BADCVAR("g_mayhem_visual_score_limit");
+               BADCVAR("g_tmayhem_visual_score_limit");
+               BADCVAR("g_tmayhem_score_leadlimit");
                BADCVAR("leadlimit_and_fraglimit");
                BADCVAR("leadlimit_override");
-               BADCVAR("g_mayhem_frags2score");
-               BADCVAR("g_mayhem_damage2score");
-               BADCVAR("g_mayhem_damage2score_multiplier");
-               BADCVAR("g_tmayhem_frags2score");
-               BADCVAR("g_tmayhem_damage2score");
-               BADCVAR("g_tmayhem_damage2score_multiplier");
+               BADCVAR("g_mayhem_scoringmethod");
+               BADCVAR("g_tmayhem_scoringmethod");
                BADCVAR("pausable");
                BADCVAR("sv_announcer");
                BADCVAR("sv_checkforpacketsduringsleep");