]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add an option to change the opacity of the grappling hook
authorMario <mario@smbclan.net>
Mon, 29 Feb 2016 21:12:07 +0000 (07:12 +1000)
committerMario <mario@smbclan.net>
Mon, 29 Feb 2016 21:12:07 +0000 (07:12 +1000)
qcsrc/common/weapons/weapon/hook.qc

index d76095ec8bf60504366c1ee40f694b3d8219991a..96743b75e73e6570054a34b8f5e3b3cd919d299d 100644 (file)
@@ -322,6 +322,8 @@ void W_Hook_Attack2(Weapon thiswep, entity actor)
 #include <lib/csqcmodel/interpolate.qh>
 #include <lib/warpzone/common.qh>
 
+float autocvar_cl_grapplehook_alpha = 1;
+
 void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg);
 
 entityclass(Hook);
@@ -419,7 +421,7 @@ void Draw_GrapplingHook(entity this)
        {
                default:
                case NET_ENT_CLIENT_HOOK:
-                       intensity = 1;
+                       intensity = autocvar_cl_grapplehook_alpha;
                        offset = 0;
                        switch(t)
                        {