From 49fc9caf8a169b25ca3fb5ac1f64951c051e5751 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Fri, 2 Jul 2010 13:46:03 +0200 Subject: [PATCH] rename to hook-firing_swap.cfg; document how to add it together with other scripts (like fov) --- defaultXonotic.cfg | 13 +++++-------- script_swapattacks.cfg => hook-firing_swap.cfg | 13 ++++++++++++- 2 files changed, 17 insertions(+), 9 deletions(-) rename script_swapattacks.cfg => hook-firing_swap.cfg (85%) diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 8618123e06..6729cb47c7 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -916,10 +916,10 @@ alias sv_restart "say \"Server will restart at the end of the match, you will al // aliases: alias +fire +attack alias -fire -attack -alias +fire2 +attack2 -alias -fire2 -attack2 -alias +attack2 +button3 -alias -attack2 -button3 +alias +fire2 +button3 +alias -fire2 -button3 +alias +attack2 +button3 // old alias from Nexuiz +alias -attack2 -button3 // old alias name from Nexuiz alias +zoom +button4 alias -zoom -button4 alias +crouch +button5 @@ -1522,9 +1522,6 @@ alias gl_flashblend_update "_gl_flashblend_update_$r_shadow_realtime_dlight$r_sh alias firing_swap "" // this script is located in its own config file -// this hook activates when we switch weapons, and allows us to script weapon specific properties (like the fire button swapping script) -alias cl_hook_activeweapon "firing_swap $1" - set sv_clones 0 "number of clones a player may make (reset by the \"kill\" command)" set cl_handicap 1 "the higher, the more damage you will receive (client setting)" @@ -1703,7 +1700,7 @@ alias cl_hook_gamestart_rc alias cl_hook_gamestart_nexball alias cl_hook_gamestart_cts alias cl_hook_gameend -//alias cl_hook_activeweapon +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}" diff --git a/script_swapattacks.cfg b/hook-firing_swap.cfg similarity index 85% rename from script_swapattacks.cfg rename to hook-firing_swap.cfg index b4624050b9..e556db70e9 100644 --- a/script_swapattacks.cfg +++ b/hook-firing_swap.cfg @@ -1,4 +1,12 @@ // This script allows swapping the primary and secondary fire buttons for any weapon +// +// To install, add +// exec hook-firing_swap.cfg +// to your autoexec.cfg + +// NOTE: if combined with other scripts that also hook cl_hook_activeweapon, do +// alias cl_hook_activeweapon "firing_swap $1; commands of other scripts..." +// after exec'ing them all from your autoexec.cfg // Set the cvars for each gun seta cl_swapattacks_tuba 0 @@ -43,4 +51,7 @@ alias firing_swap "firing_swap_apply cl_swapattacks_$1; set firing_lastweapon cl alias +fire +attack alias -fire -attack alias +fire2 +attack2 -alias -fire2 -attack2 \ No newline at end of file +alias -fire2 -attack2 + +// install +alias cl_hook_activeweapon "firing_swap $1" -- 2.39.2