X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Fhook.qc;h=56c2800798109d9bd7fdecfd67aeb628c27ae70d;hb=020203bfc55c480b73af2611bea0f0198b4fd314;hp=c158d1c3289be58c1881360c35fa8512717dbde8;hpb=b030d2a4a6f4eb04aab14deeae30414c46aaa5a5;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/hook.qc b/qcsrc/common/weapons/weapon/hook.qc index c158d1c32..56c280079 100644 --- a/qcsrc/common/weapons/weapon/hook.qc +++ b/qcsrc/common/weapons/weapon/hook.qc @@ -22,7 +22,7 @@ CLASS(OffhandHook, OffhandWeapon) METHOD(OffhandHook, offhand_think, void(OffhandHook this, entity actor, bool key_pressed)) { Weapon wep = WEP_HOOK; - wep.wr_think(wep, actor, key_pressed, false); + wep.wr_think(wep, actor, key_pressed ? 1 : 0); } ENDCLASS(OffhandHook) OffhandHook OFFHAND_HOOK; STATIC_INIT(OFFHAND_HOOK) { OFFHAND_HOOK = NEW(OffhandHook); } @@ -174,9 +174,9 @@ void W_Hook_Attack2(Weapon thiswep, entity actor) MUTATOR_CALLHOOK(EditProjectile, actor, gren); } - METHOD(Hook, wr_think, void(entity thiswep, entity actor, bool fire1, bool fire2)) + METHOD(Hook, wr_think, void(entity thiswep, entity actor, int fire)) { - if (fire1) { + if (fire & 1) { if(!actor.hook) if(!(actor.hook_state & HOOK_WAITING_FOR_RELEASE)) if(time > actor.hook_refire) @@ -192,7 +192,7 @@ void W_Hook_Attack2(Weapon thiswep, entity actor) actor.hook_state &= ~HOOK_WAITING_FOR_RELEASE; } - if(fire2) + if(fire & 2) { if(weapon_prepareattack(thiswep, actor, true, WEP_CVAR_SEC(hook, refire))) {