]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix issue with having no weapon currently selected
authorRudolf Polzer <divverent@alientrap.org>
Fri, 2 Jul 2010 11:48:44 +0000 (13:48 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 2 Jul 2010 11:48:44 +0000 (13:48 +0200)
qcsrc/client/View.qc

index f7fc5343d987f21d73738338c66162cd4f721bc0..fa69f4aab0de452903009a2f1e7a5c007644a2d7 100644 (file)
@@ -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