From cf1b294c47b02d47f9c0580b6d1a473ce4f12ba5 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 30 Apr 2020 04:45:25 +1000 Subject: [PATCH] If the bot has unlimited ammo, always prefer primary attack on the Vaporizer, fixes bots only firing blaster shots with g_use_ammunition 0 and g_instagib_ammo_start 0 --- qcsrc/common/weapons/weapon/vaporizer.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcsrc/common/weapons/weapon/vaporizer.qc b/qcsrc/common/weapons/weapon/vaporizer.qc index cfdbe7b7e..e71ed7478 100644 --- a/qcsrc/common/weapons/weapon/vaporizer.qc +++ b/qcsrc/common/weapons/weapon/vaporizer.qc @@ -280,7 +280,7 @@ void W_RocketMinsta_Attack3 (entity actor, .entity weaponentity) METHOD(Vaporizer, wr_aim, void(entity thiswep, entity actor, .entity weaponentity)) { - if(GetResource(actor, thiswep.ammo_type) > 0) + if((actor.items & IT_UNLIMITED_AMMO) || GetResource(actor, thiswep.ammo_type) > 0) PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, 1000000, 0, 1, false); else PHYS_INPUT_BUTTON_ATCK2(actor) = bot_aim(actor, weaponentity, WEP_CVAR_SEC(vaporizer, speed), 0, WEP_CVAR_SEC(vaporizer, lifetime), false); // WEAPONTODO: replace with proper vaporizer cvars -- 2.39.2