From 15f3cd79aaa980833ac5b9dcb370723d5d569aa6 Mon Sep 17 00:00:00 2001 From: Martin Taibr Date: Tue, 18 Jul 2017 00:58:46 +0200 Subject: [PATCH] split gamemodes --- defaultClient.cfg | 1 + defaultServer.cfg | 1 + defaultXonotic.cfg | 3 --- gamemodes-client.cfg | 36 +++++++++++++++++++++++++++ gamemodes.cfg => gamemodes-server.cfg | 32 ------------------------ 5 files changed, 38 insertions(+), 35 deletions(-) create mode 100644 gamemodes-client.cfg rename gamemodes.cfg => gamemodes-server.cfg (95%) diff --git a/defaultClient.cfg b/defaultClient.cfg index 8e1ae8cc1..f9e6e7ae8 100644 --- a/defaultClient.cfg +++ b/defaultClient.cfg @@ -805,6 +805,7 @@ scr_loadingscreen_scale_limit 2 // other config files exec effects-normal.cfg exec crosshairs.cfg +exec gamemodes-client.cfg exec notifications.cfg seta cl_physics "default" "client selected physics set" diff --git a/defaultServer.cfg b/defaultServer.cfg index 7fc31019f..6f141a68a 100644 --- a/defaultServer.cfg +++ b/defaultServer.cfg @@ -522,6 +522,7 @@ set g_mod_config "" "Current config mod name" exec balance-xonotic.cfg exec physicsX.cfg exec turrets.cfg +exec gamemodes-server.cfg exec mutators.cfg exec monsters.cfg exec minigames.cfg diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index be2faab6a..51d9e22e4 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -158,9 +158,6 @@ seta snd_channel9volume 1 "QuakeC controlled ambient sound volume" snd_identicalsoundrandomization_time -0.1 snd_identicalsoundrandomization_tics 1 -// FIXME contains both client and server -exec gamemodes.cfg - // load console command aliases and settings exec commands.cfg diff --git a/gamemodes-client.cfg b/gamemodes-client.cfg new file mode 100644 index 000000000..e7a1607f1 --- /dev/null +++ b/gamemodes-client.cfg @@ -0,0 +1,36 @@ +// say aliases +alias asay_ctf_flagcarrier "say_team flag carrier at %y" +alias asay_ctf_haveflag "say_team (%l) have the flag" +alias asay_willgo "say_team will go to %y" +alias asay_support "say_team (%l) need help, %h%%" +alias asay_killed "say_team got killed at %d" +alias asay_noammo "say_team (%l) need %W for %w" +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 +alias cl_hook_gamestart_nop //is only called when CSQC unloads before knowing the gametype, very unlikely +alias cl_hook_gamestart_dm +alias cl_hook_gamestart_tdm +alias cl_hook_gamestart_dom +alias cl_hook_gamestart_ctf +alias cl_hook_gamestart_lms +alias cl_hook_gamestart_ca +alias cl_hook_gamestart_kh +alias cl_hook_gamestart_ons +alias cl_hook_gamestart_as +alias cl_hook_gamestart_rc +alias cl_hook_gamestart_nb +alias cl_hook_gamestart_cts +alias cl_hook_gamestart_ka +alias cl_hook_gamestart_ft +alias cl_hook_gamestart_inv +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.cfg b/gamemodes-server.cfg similarity index 95% rename from gamemodes.cfg rename to gamemodes-server.cfg index 80d990226..684edb3a8 100644 --- a/gamemodes.cfg +++ b/gamemodes-server.cfg @@ -5,42 +5,10 @@ // global gametype setting (0 = deathmatch) set gamecfg 0 -// say aliases -alias asay_ctf_flagcarrier "say_team flag carrier at %y" -alias asay_ctf_haveflag "say_team (%l) have the flag" -alias asay_willgo "say_team will go to %y" -alias asay_support "say_team (%l) need help, %h%%" -alias asay_killed "say_team got killed at %d" -alias asay_noammo "say_team (%l) need %W for %w" -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 -alias cl_hook_gamestart_nop //is only called when CSQC unloads before knowing the gametype, very unlikely -alias cl_hook_gamestart_dm -alias cl_hook_gamestart_tdm -alias cl_hook_gamestart_dom -alias cl_hook_gamestart_ctf -alias cl_hook_gamestart_lms -alias cl_hook_gamestart_ca -alias cl_hook_gamestart_kh -alias cl_hook_gamestart_ons -alias cl_hook_gamestart_as -alias cl_hook_gamestart_rc -alias cl_hook_gamestart_nb -alias cl_hook_gamestart_cts -alias cl_hook_gamestart_ka -alias cl_hook_gamestart_ft -alias cl_hook_gamestart_inv -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 alias _sv_hook_gamestart "set _sv_hook_gametype $1; _sv_hook_gamestart_stage2" alias _sv_hook_gamestart_stage2 "sv_hook_gamestart_all; sv_hook_gamestart_${_sv_hook_gametype}" -- 2.39.2