]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Move cvars to the script file too
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 2 Jul 2010 11:31:04 +0000 (14:31 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Fri, 2 Jul 2010 11:31:04 +0000 (14:31 +0300)
defaultXonotic.cfg
script_swapattacks.cfg

index 7a5779c74dc5aef419df6f60c792208567b8fc0b..8618123e06cc937eb8c2497e78b98f949fdafbaf 100644 (file)
@@ -1501,24 +1501,6 @@ seta cl_weaponpriority8 "" "use impulse 208 for prev gun from this list, 218 for
 seta cl_weaponpriority9 "" "use impulse 209 for prev gun from this list, 219 for best gun, 229 for next gun"
 seta cl_weaponimpulsemode 0 "0: only cycle between currently usable weapons in weapon priority order; 1: cycle between all possible weapons on a key in weapon priority order"
 
-seta cl_swapattacks_tuba 0
-seta cl_swapattacks_laser 0
-seta cl_swapattacks_shotgun 0
-seta cl_swapattacks_uzi 0
-seta cl_swapattacks_campingrifle 0
-seta cl_swapattacks_grenadelauncher 0
-seta cl_swapattacks_electro 0
-seta cl_swapattacks_hlac 0
-seta cl_swapattacks_crylink 0
-seta cl_swapattacks_minstanex 0
-seta cl_swapattacks_nex 0
-seta cl_swapattacks_hagar 0
-seta cl_swapattacks_seeker 0
-seta cl_swapattacks_fireball 0
-seta cl_swapattacks_rocketlauncher 0
-seta cl_swapattacks_hook 0
-seta cl_swapattacks_porto 0
-
 seta sv_status_privacy 1       "hide IP addresses from \"status\" replies shown to clients"
 
 set g_maplist_allow_hidden 0           "allow hidden maps to be, e.g., voted for and in the maplist"
index 5457c364c31462fa029a6cb4d2b6b613ed0185cc..b4624050b9c0e54e1338c82b1f25bfd4ba316ccd 100644 (file)
@@ -1,6 +1,25 @@
-// This script allows swapping the primary and secondary fire buttons for any weapon, using the cl_swapattacks_* cvars.
+// This script allows swapping the primary and secondary fire buttons for any weapon
 
-// This part of the code is necessary to keep us firing when we switch weapons while holding a fire button pressed.
+// Set the cvars for each gun
+seta cl_swapattacks_tuba 0
+seta cl_swapattacks_laser 0
+seta cl_swapattacks_shotgun 0
+seta cl_swapattacks_uzi 0
+seta cl_swapattacks_campingrifle 0
+seta cl_swapattacks_grenadelauncher 0
+seta cl_swapattacks_electro 0
+seta cl_swapattacks_hlac 0
+seta cl_swapattacks_crylink 0
+seta cl_swapattacks_minstanex 0
+seta cl_swapattacks_nex 0
+seta cl_swapattacks_hagar 0
+seta cl_swapattacks_seeker 0
+seta cl_swapattacks_fireball 0
+seta cl_swapattacks_rocketlauncher 0
+seta cl_swapattacks_hook 0
+seta cl_swapattacks_porto 0
+
+// This part of the code is necessary to keep us firing when we switch weapons while holding a fire button pressed
 // Also updates the keys before firing, so we don't have to switch to another weapon and back to apply the changes
 set fire_last 0
 set fire2_last 0
@@ -14,13 +33,13 @@ alias firing_switch_attack_1 "+fire"
 alias firing_switch_attack2_1 "+fire2"
 alias firing_switch "-fire; -fire2; firing_switch_attack_$fire_last; firing_switch_attack2_$fire2_last;"
 
-// now apply changes to the key binds and get the weapon we are using
+// Now apply changes to the key binds and get the weapon we are using
 alias firing_decision_0 "alias +checkattack +attack; alias -checkattack -attack; alias +checkattack2 +attack2; alias -checkattack2 -attack2"
 alias firing_decision_1 "alias +checkattack +attack2; alias -checkattack -attack2; alias +checkattack2 +attack; alias -checkattack2 -attack"
 alias firing_swap_apply "firing_decision_${$1}"
 alias firing_swap "firing_swap_apply cl_swapattacks_$1; set firing_lastweapon cl_swapattacks_$1; firing_switch"
 
-// not correct, but prevents firing from braking after executing the script until switching weapons
+// Not correct, but prevents firing from braking after executing the script until switching weapons
 alias +fire +attack
 alias -fire -attack
 alias +fire2 +attack2