]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/hook.qc
Show the race checkpoint marker on the triggers, instead of the target entity (makes...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / hook.qc
index 091e2f516dcb9b5e809bba8f535f05e10836acab..15dfe0169dbacf483f703f6431780395a8df9eeb 100644 (file)
@@ -169,6 +169,7 @@ void W_Hook_Attack2(Weapon thiswep, entity actor, .entity weaponentity)
        gren.damageforcescale = WEP_CVAR_SEC(hook, damageforcescale);
        gren.event_damage = W_Hook_Damage;
        gren.damagedbycontents = true;
+       IL_PUSH(g_damagedbycontents, gren);
        gren.missile_flags = MIF_SPLASH | MIF_ARC;
 
        gren.velocity = '0 0 1' * WEP_CVAR_SEC(hook, speed);
@@ -500,8 +501,12 @@ void Remove_GrapplingHook(entity this)
 {
        sound (this, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, ATTEN_NORM);
 
-       if(csqcplayer && csqcplayer.hook == this)
-               csqcplayer.hook = NULL;
+       for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+       {
+               entity wep = viewmodels[slot];
+               if(wep.hook == this)
+                       wep.hook = NULL;
+       }
 }
 
 NET_HANDLE(ENT_CLIENT_HOOK, bool bIsNew)