From: Mircea Kitsune Date: Wed, 30 Jun 2010 13:40:26 +0000 (+0300) Subject: Hook so the currently active weapon can be reported in the console. see cl_hook_activ... X-Git-Tag: xonotic-v0.1.0preview~513 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7be3219850b7925da8af19b747f007b2f33200ee;p=xonotic%2Fxonotic-data.pk3dir.git Hook so the currently active weapon can be reported in the console. see cl_hook_activeweapon. Still not ready, need to do the firing type script too --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 970feba5e..71d2114d4 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -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}" diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 1056fd59a..d48306e05 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -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