]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Created Team Mayhem too. AFAIK both modes are perfectly functional as
authordrjaska <drjaska83@gmail.com>
Sat, 6 Mar 2021 03:22:25 +0000 (05:22 +0200)
committerdrjaska <drjaska83@gmail.com>
Sat, 6 Mar 2021 03:22:25 +0000 (05:22 +0200)
they are now. Having powerups would be nice. Missing new icons for
mayhem and team mayhem. Mapinfos are not yet regenerated.

gamemodes-client.cfg
gamemodes-server.cfg
qcsrc/common/gamemodes/gamemode/_mod.inc
qcsrc/common/gamemodes/gamemode/_mod.qh
qcsrc/common/gamemodes/gamemode/mayhem/sv_mayhem.qc
qcsrc/menu/xonotic/util.qc
qcsrc/server/world.qc

index df8c146bae5eaa092ff15d6cbc8f7ae8bad773c4..c3dd709127ca53dc9b0216f654d9f1548599120e 100644 (file)
@@ -33,6 +33,7 @@ alias cl_hook_gamestart_ft
 alias cl_hook_gamestart_inv
 alias cl_hook_gamestart_duel
 alias cl_hook_gamestart_mayhem
+alias cl_hook_gamestart_tmayhem
 alias cl_hook_gameend "rpn /cl_matchcount dup load 1 + =" // increase match count every time a game ends
 alias cl_hook_shutdown
 alias cl_hook_activeweapon
index d8e1e0300d6008d039b7f59e99358c64cd3302c9..203fab7ec4fdbd48326e2465f0ba221f20aa0588 100644 (file)
@@ -30,6 +30,7 @@ alias sv_hook_gamestart_ft
 alias sv_hook_gamestart_inv
 alias sv_hook_gamestart_duel
 alias sv_hook_gamestart_mayhem
+alias sv_hook_gamestart_tmayhem
 // there is currently no hook for when the match is restarted
 // see sv_hook_readyrestart for previous uses of this hook
 //alias sv_hook_gamerestart
@@ -60,6 +61,7 @@ alias sv_vote_gametype_hook_rc
 alias sv_vote_gametype_hook_tdm
 alias sv_vote_gametype_hook_duel
 alias sv_vote_gametype_hook_mayhem
+alias sv_vote_gametype_hook_tmayhem
 
 // Example preset to allow 1v1ctf to be used for the gametype voting screen.
 // Aliases can have max 31 chars so the gametype can have max 9 chars.
@@ -217,6 +219,13 @@ set g_mayhem_respawn_delay_large_count 0
 set g_mayhem_respawn_delay_max 0
 set g_mayhem_respawn_waves 0
 set g_mayhem_weapon_stay 0
+set g_tmayhem_respawn_delay_small 0
+set g_tmayhem_respawn_delay_small_count 0
+set g_tmayhem_respawn_delay_large 0
+set g_tmayhem_respawn_delay_large_count 0
+set g_tmayhem_respawn_delay_max 0
+set g_tmayhem_respawn_waves 0
+set g_tmayhem_weapon_stay 0
 
 
 // =========
@@ -566,9 +575,17 @@ set g_duel 0 "Duel: frag the opponent more in a one versus one arena battle"
 set g_duel_with_powerups 0 "Enable powerups to spawn in the duel gamemode"
 set g_duel_not_dm_maps 0 "when this is set, DM maps will NOT be listed in duel"
 
-// ========
-//  mayhem
-// ========
-set g_mayhem 0 "Mayhem: the player with most frags in total mayhem wins"
+// ======================
+//  mayhem (ffa or team)
+// ======================
+set g_mayhem 0 "Mayhem: the player with the most frags in total mayhem wins"
 set g_mayhem_regenerate 0 "allow players to regenerate hp. rates controlled by hp regeneration and rotting cvars"
-set g_mayhem_weaponarena "most_available" "starting weapons - takes the same options as g_weaponarena"
\ No newline at end of file
+set g_mayhem_weaponarena "most_available" "starting weapons - takes the same options as g_weaponarena"
+
+set g_tmayhem 0 "Team Mayhem: the team with the most frags in total mayhem wins"
+set g_tmayhem_teams 2 "how many teams are in team mayhem (set by mapinfo)"
+set g_tmayhem_team_spawns 0 "when 1, players spawn from the team spawnpoints of the map, if any"
+set g_tmayhem_teams_override 0 "how many teams are in team mayhem"
+set g_tmayhem_point_limit -1 "Team Mayhem point limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+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"
index 5ba2b868c6fd3c89e08b4dc9afee5c6da610079b..b106ec9ace5dca99e7cc42607b644bd3a0e8528f 100644 (file)
@@ -17,3 +17,4 @@
 #include <common/gamemodes/gamemode/onslaught/_mod.inc>
 #include <common/gamemodes/gamemode/race/_mod.inc>
 #include <common/gamemodes/gamemode/tdm/_mod.inc>
+#include <common/gamemodes/gamemode/tmayhem/_mod.inc>
\ No newline at end of file
index 0f8b98cabe88db8eaefa5c230bbda9af60437b71..15b6ecaac71096e1f63f9e7a939674538a9e6a8c 100644 (file)
@@ -17,3 +17,4 @@
 #include <common/gamemodes/gamemode/onslaught/_mod.qh>
 #include <common/gamemodes/gamemode/race/_mod.qh>
 #include <common/gamemodes/gamemode/tdm/_mod.qh>
+#include <common/gamemodes/gamemode/tmayhem/_mod.qh>
\ No newline at end of file
index 11fc13a5de5f395dbf313d705f38f68d8e8749d1..bd5e43195cfb655426d904e1052a041a7d31dc43 100644 (file)
@@ -1,6 +1,6 @@
 #include "sv_mayhem.qh"
 
-float autocvar_g_mayhem_regenerate;
+bool autocvar_g_mayhem_regenerate;
 string autocvar_g_mayhem_weaponarena;
 
 MUTATOR_HOOKFUNCTION(mayhem, Scores_CountFragsRemaining)
index c19e88dcc8096de6663fa1ac73727733b92247f2..7e0034bd47d147807b4cbfa5765dd3909ff692a3 100644 (file)
@@ -682,6 +682,7 @@ float updateCompression()
        GAMETYPE(MAPINFO_TYPE_ONSLAUGHT) \
        GAMETYPE(MAPINFO_TYPE_ASSAULT) \
        GAMETYPE(MAPINFO_TYPE_MAYHEM) \
+       GAMETYPE(MAPINFO_TYPE_TEAM_MAYHEM) \
        /* GAMETYPE(MAPINFO_TYPE_DUEL) */ \
        /* GAMETYPE(MAPINFO_TYPE_INVASION) */ \
        /**/
index 583b4d077d27b4dc9a7b1fb866e8b0507c7b704a..94612bc2fa256f7e159d6b9ab7e9449a4d5541fa 100644 (file)
@@ -302,6 +302,8 @@ void cvar_changes_init()
                BADCVAR("g_tdm");
                BADCVAR("g_tdm_on_dm_maps");
                BADCVAR("g_tdm_teams");
+               BADCVAR("g_tmayhem");
+               BADCVAR("g_tmayhem_teams");
                BADCVAR("g_vip");
                BADCVAR("leadlimit");
                BADCVAR("nextmap");