]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix final comments. Afaik this should now be ready for testing and committing
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 1 Jul 2010 00:44:23 +0000 (03:44 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 1 Jul 2010 00:44:23 +0000 (03:44 +0300)
defaultXonotic.cfg

index 0b1ed557b26e2ae0f792c787ac2a0f7cc5ed2e02..00b5aef58dca6ad1b7618c0e1e841e95127f5731 100644 (file)
@@ -1530,8 +1530,9 @@ alias _gl_flashblend_update_01 "gl_flashblend 0"
 alias _gl_flashblend_update_11 "gl_flashblend 0"
 alias gl_flashblend_update "_gl_flashblend_update_$r_shadow_realtime_dlight$r_showsurfaces"
 
 alias _gl_flashblend_update_11 "gl_flashblend 0"
 alias gl_flashblend_update "_gl_flashblend_update_$r_shadow_realtime_dlight$r_showsurfaces"
 
-// this script allows swapping the primary and secondary fire buttons for each weapon, using the cl_swapattacks_* cvars
-
+// this script allows swapping the primary and secondary fire buttons of any weapon, using the cl_swapattacks_* cvars.
+// This part of the code keeps us firing when we switch weapons while holding a fire button pressed.
+// Also updates the effect immediately, so you don't have to switch to another weapon and back for changes to be applied
 set preattack_last 0
 set preattack2_last 0
 alias +preattack "set preattack_last 1; firing_swap2 $firing_lastweapon; +checkattack"
 set preattack_last 0
 set preattack2_last 0
 alias +preattack "set preattack_last 1; firing_swap2 $firing_lastweapon; +checkattack"
@@ -1543,13 +1544,13 @@ alias firing_switch_atck2_0 ""
 alias firing_switch_atck_1 "+preattack"
 alias firing_switch_atck2_1 "+preattack2"
 alias firing_switch "-preattack; -preattack2; firing_switch_atck_$preattack_last; firing_switch_atck2_$preattack2_last;"
 alias firing_switch_atck_1 "+preattack"
 alias firing_switch_atck2_1 "+preattack2"
 alias firing_switch "-preattack; -preattack2; firing_switch_atck_$preattack_last; firing_switch_atck2_$preattack2_last;"
-
+// now apply the changes to the key binds
 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_swap2 "firing_decision_${$1}"
 alias firing_swap "firing_swap2 cl_swapattacks_$1; set firing_lastweapon cl_swapattacks_$1; firing_switch"
 
 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_swap2 "firing_decision_${$1}"
 alias firing_swap "firing_swap2 cl_swapattacks_$1; set firing_lastweapon cl_swapattacks_$1; firing_switch"
 
-// this hook activates when we switch weapons, and allows us to script weapon specific properties like the fire button swapping script
+// 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)"
 alias cl_hook_activeweapon "firing_swap $1"
 
 set sv_clones 0        "number of clones a player may make (reset by the \"kill\" command)"