]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/blaster.qc
Added offhand blaster.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / blaster.qc
index 2189c1db209d1d1d68b57949bdd8a5103183bb17..9ca40be75741c3d8818c1fed4dd430f33ba5fea3 100644 (file)
@@ -193,6 +193,17 @@ METHOD(Blaster, wr_killmessage, Notification(entity thiswep))
     return WEAPON_BLASTER_MURDER;
 }
 
+METHOD(OffhandBlaster, offhand_think, void(OffhandBlaster this, entity actor, bool key_pressed))
+{
+       if (!key_pressed || (time < actor.jump_interval))
+       {
+               return;
+       }
+       actor.jump_interval = time + WEP_CVAR_SEC(blaster, refire) * W_WeaponRateFactor(actor);
+       .entity weaponentity = weaponentities[1];
+       BLASTER_SECONDARY_ATTACK_HACK(blaster, actor, weaponentity);
+}
+
 #endif
 #ifdef CSQC