]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_hook.qc
Merge branch 'master' into fruitiex/newpanelhud_stable
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_hook.qc
index 6b2270af2f26726a3120dbc6ad802a66d0ffbb81..9e5868355991106d4b48cd6feae4171c2903802d 100644 (file)
@@ -1,6 +1,7 @@
 #ifdef REGISTER_WEAPON
 REGISTER_WEAPON(HOOK, w_hook, IT_CELLS|IT_FUEL, 0, WEP_FLAG_CANCLIMB | WEP_TYPE_SPLASH, 0, "hookgun", "hook", "Grappling Hook");
 #else
+#ifdef SVQC
 .float dmg;
 .float dmg_edge;
 .float dmg_radius;
@@ -77,7 +78,7 @@ void W_Hook_Attack2()
        setsize(gren, '0 0 0', '0 0 0');
 
        gren.nextthink = time + cvar("g_balance_hook_secondary_lifetime");
-       gren.think = adaptor_think2use;
+       gren.think = adaptor_think2use_hittype_splash;
        gren.use = W_Hook_Explode2;
        gren.touch = W_Hook_Touch2;
 
@@ -249,3 +250,22 @@ float w_hook(float req)
        return TRUE;
 };
 #endif
+#ifdef CSQC
+float w_hook(float req)
+{
+       if(req == WR_IMPACTEFFECT)
+       {
+               vector org2;
+               org2 = w_org + w_backoff * 2;
+               pointparticles(particleeffectnum("hookbomb_explode"), org2, '0 0 0', 1);
+               if(!w_issilent)
+                       sound(self, CHAN_PROJECTILE, "weapons/hookbomb_impact.wav", VOL_BASE, ATTN_NORM);
+       }
+       else if(req == WR_PRECACHE)
+       {
+               precache_sound("weapons/hookbomb_impact.wav");
+       }
+       return TRUE;
+}
+#endif
+#endif