From: Rudolf Polzer Date: Fri, 2 Jul 2010 11:48:44 +0000 (+0200) Subject: fix issue with having no weapon currently selected X-Git-Tag: xonotic-v0.1.0preview~494 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f2eb5972c48df1120bea50c72bda1f5224cb6d64;p=xonotic%2Fxonotic-data.pk3dir.git fix issue with having no weapon currently selected --- diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index f7fc5343d..fa69f4aab 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -480,7 +480,10 @@ void CSQC_UpdateView(float w, float h) entity e; e = get_weaponinfo(activeweapon); - localcmd(strcat("\ncl_hook_activeweapon ", e.netname), ";"); + if(e.netname != "") + localcmd(strcat("\ncl_hook_activeweapon ", e.netname), ";"); + else + localcmd("\ncl_hook_activeweapon none;"); } // ALWAYS Clear Current Scene First