]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/hook.qc
Revert "Remove legacy Quake bbox expansion: projectiles"
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / hook.qc
index d8cebd740ac49fc3daf8ec2c5d5111e30f27a740..94d4ac33ed765899b1fd0cd46ae9a964f8d54324 100644 (file)
@@ -145,7 +145,7 @@ METHOD(Hook, wr_think, void(entity thiswep, entity actor, .entity weaponentity,
         actor.(weaponentity).hook_refire = max(actor.(weaponentity).hook_refire, time + WEP_CVAR_PRI(hook, refire) * W_WeaponRateFactor(actor));
 
         // hook also inhibits health regeneration, but only for 1 second
-        if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+        if(!(actor.items & IT_UNLIMITED_AMMO))
             actor.pauseregen_finished = max(actor.pauseregen_finished, time + autocvar_g_balance_pause_fuel_regen);
     }
 
@@ -163,7 +163,7 @@ METHOD(Hook, wr_think, void(entity thiswep, entity actor, .entity weaponentity,
         {
             if( time > actor.(weaponentity).hook_time_fueldecrease )
             {
-                if(!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
+                if(!(actor.items & IT_UNLIMITED_AMMO))
                 {
                     if( GetResource(actor, RES_FUEL) >= (time - actor.(weaponentity).hook_time_fueldecrease) * hooked_fuel )
                     {
@@ -243,8 +243,8 @@ METHOD(Hook, wr_killmessage, Notification(entity thiswep))
 
 METHOD(Hook, wr_impacteffect, void(entity thiswep, entity actor))
 {
-    vector org2;
-    org2 = w_org + w_backoff * 2;
+    // the hook bomb uses a negative w_backoff factor because it explodes slightly below the floor, unlike other projectiles
+    vector org2 = w_org + w_backoff * -2;
     pointparticles(EFFECT_HOOK_EXPLODE, org2, '0 0 0', 1);
     if(!w_issilent)
         sound(actor, CH_SHOTS, SND_HOOKBOMB_IMPACT, VOL_BASE, ATTN_NORM);