X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=gamemodes.cfg;h=d660aa123aecfcca782679a62cace4864842fb23;hb=8643336b62c2c2881987dabddc842a0214839012;hp=c31f7f9013a9d4e4e0fc26262175878985d71ecd;hpb=a59c12d71fa599891fc1d658aeea2f546d89d9e4;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/gamemodes.cfg b/gamemodes.cfg index c31f7f901..d660aa123 100644 --- a/gamemodes.cfg +++ b/gamemodes.cfg @@ -18,6 +18,7 @@ alias asay_drop "say_team (%l) dropped %w ; impulse 17" // ================= // gamestart hooks // ================= +seta cl_matchcount 0 // incremented by cl_hook_gameend and used by playerstats to know when to alias _cl_hook_gamestart "set _cl_hook_gametype $1; _cl_hook_gamestart_stage2" alias _cl_hook_gamestart_stage2 "cl_hook_gamestart_all; cl_hook_gamestart_${_cl_hook_gametype}" alias cl_hook_gamestart_all @@ -37,7 +38,7 @@ alias cl_hook_gamestart_cts alias cl_hook_gamestart_ka alias cl_hook_gamestart_ft alias cl_hook_gamestart_inv -alias cl_hook_gameend +alias cl_hook_gameend "rpn /cl_matchcount dup load 1 + =" // increase match count every time a game ends alias cl_hook_activeweapon alias _sv_hook_gamestart "set _sv_hook_gametype $1; _sv_hook_gamestart_stage2" @@ -65,8 +66,11 @@ alias sv_hook_gameend // ===================== // gametype vote hooks // ===================== -// these are called when the mode is switched via gametype vote screen, earlier than gamestart hooks (useful for enabling per-gamemode mutators) -alias sv_vote_gametype_hook_all +// These are called when the mode is switched via gametype vote screen, +// earlier than gamestart hooks (useful for enabling per-gamemode mutators) +// The _all hook is called before the specific one +// here it sets g_maxplayers to undo what duel does +alias sv_vote_gametype_hook_all "set g_maxplayers 0" alias sv_vote_gametype_hook_as alias sv_vote_gametype_hook_ca alias sv_vote_gametype_hook_ctf @@ -83,6 +87,15 @@ alias sv_vote_gametype_hook_ons alias sv_vote_gametype_hook_rc alias sv_vote_gametype_hook_tdm +// Preset to allow duel to be used for the gametype voting screen +// sv_vote_gametype_*_type Must be set to the name of the gametype the option is based on +// sv_vote_gametype_*_name Contains a human-readable name of the gametype +// sv_vote_gametype_*_description Contains a longer description +set sv_vote_gametype_duel_type dm +set sv_vote_gametype_duel_name Duel +set sv_vote_gametype_duel_description "One vs One match" +alias sv_vote_gametype_hook_duel "set g_maxplayers 2" + // =========== // leadlimit