]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Hook so the currently active weapon can be reported in the console. see cl_hook_activ...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 30 Jun 2010 13:40:26 +0000 (16:40 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 30 Jun 2010 13:40:26 +0000 (16:40 +0300)
defaultXonotic.cfg
qcsrc/client/View.qc

index 970feba5e4950ae4086ca8abc52dc25d5bb182e0..71d2114d49c73d3f8c6bf783c19367dfc12699f6 100644 (file)
@@ -1708,6 +1708,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 _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}"
index 1056fd59ae435b9fbffb334ef20f57fb6590aa42..d48306e05916023a224f902d1881ba103869dba3 100644 (file)
@@ -474,6 +474,10 @@ void CSQC_UpdateView(float w, float h)
        if(last_weapon != activeweapon) {
                weapontime = time;
                last_weapon = activeweapon;
+
+               entity e;
+               e = get_weaponinfo(activeweapon);
+               localcmd(strcat("\ncl_hook_activeweapon ", e.netname), ";");
        }
 
        // ALWAYS Clear Current Scene First