From: drjaska Date: Sat, 6 Mar 2021 03:22:25 +0000 (+0200) Subject: Created Team Mayhem too. AFAIK both modes are perfectly functional as X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c42c9f693c6c03c5049a96055f0e5a9469d15ddd;p=xonotic%2Fxonotic-data.pk3dir.git Created Team Mayhem too. AFAIK both modes are perfectly functional as they are now. Having powerups would be nice. Missing new icons for mayhem and team mayhem. Mapinfos are not yet regenerated. --- diff --git a/gamemodes-client.cfg b/gamemodes-client.cfg index df8c146ba..c3dd70912 100644 --- a/gamemodes-client.cfg +++ b/gamemodes-client.cfg @@ -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 diff --git a/gamemodes-server.cfg b/gamemodes-server.cfg index d8e1e0300..203fab7ec 100644 --- a/gamemodes-server.cfg +++ b/gamemodes-server.cfg @@ -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" diff --git a/qcsrc/common/gamemodes/gamemode/_mod.inc b/qcsrc/common/gamemodes/gamemode/_mod.inc index 5ba2b868c..b106ec9ac 100644 --- a/qcsrc/common/gamemodes/gamemode/_mod.inc +++ b/qcsrc/common/gamemodes/gamemode/_mod.inc @@ -17,3 +17,4 @@ #include #include #include +#include \ No newline at end of file diff --git a/qcsrc/common/gamemodes/gamemode/_mod.qh b/qcsrc/common/gamemodes/gamemode/_mod.qh index 0f8b98cab..15b6ecaac 100644 --- a/qcsrc/common/gamemodes/gamemode/_mod.qh +++ b/qcsrc/common/gamemodes/gamemode/_mod.qh @@ -17,3 +17,4 @@ #include #include #include +#include \ No newline at end of file diff --git a/qcsrc/common/gamemodes/gamemode/mayhem/sv_mayhem.qc b/qcsrc/common/gamemodes/gamemode/mayhem/sv_mayhem.qc index 11fc13a5d..bd5e43195 100644 --- a/qcsrc/common/gamemodes/gamemode/mayhem/sv_mayhem.qc +++ b/qcsrc/common/gamemodes/gamemode/mayhem/sv_mayhem.qc @@ -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) diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc index c19e88dcc..7e0034bd4 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -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) */ \ /**/ diff --git a/qcsrc/server/world.qc b/qcsrc/server/world.qc index 583b4d077..94612bc2f 100644 --- a/qcsrc/server/world.qc +++ b/qcsrc/server/world.qc @@ -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");