]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/hook.qc
Weapons: add a second .weaponentity
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / hook.qc
index 93aa633b4ce5b5710538a39b411a00881489e3d8..6dd8215175147177b2f77a9ea7114a196227c55e 100644 (file)
@@ -180,12 +180,12 @@ void W_Hook_Attack2(Weapon thiswep, entity actor)
                                if(!actor.hook)
                                if(!(actor.hook_state & HOOK_WAITING_FOR_RELEASE))
                                if(time > actor.hook_refire)
-                               if(weapon_prepareattack(thiswep, actor, false, -1))
+                               if(weapon_prepareattack(thiswep, actor, slot, false, -1))
                                {
                                        W_DecreaseAmmo(thiswep, actor, thiswep.ammo_factor * WEP_CVAR_PRI(hook, ammo));
                                        actor.hook_state |= HOOK_FIRING;
                                        actor.hook_state |= HOOK_WAITING_FOR_RELEASE;
-                                       weapon_thinkf(actor, WFRAME_FIRE1, WEP_CVAR_PRI(hook, animtime), w_ready);
+                                       weapon_thinkf(actor, slot, WFRAME_FIRE1, WEP_CVAR_PRI(hook, animtime), w_ready);
                                }
                        } else {
                                actor.hook_state |= HOOK_REMOVING;
@@ -194,10 +194,10 @@ void W_Hook_Attack2(Weapon thiswep, entity actor)
 
                        if(fire & 2)
                        {
-                               if(weapon_prepareattack(thiswep, actor, true, WEP_CVAR_SEC(hook, refire)))
+                               if(weapon_prepareattack(thiswep, actor, slot, true, WEP_CVAR_SEC(hook, refire)))
                                {
                                        W_Hook_Attack2(thiswep, actor);
-                                       weapon_thinkf(actor, WFRAME_FIRE2, WEP_CVAR_SEC(hook, animtime), w_ready);
+                                       weapon_thinkf(actor, slot, WFRAME_FIRE2, WEP_CVAR_SEC(hook, animtime), w_ready);
                                }
                        }