]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Check for matching switchweapon when auto firing arc and hagar
authorMario <mario@smbclan.net>
Fri, 21 Oct 2016 01:24:56 +0000 (11:24 +1000)
committerMario <mario@smbclan.net>
Fri, 21 Oct 2016 01:24:56 +0000 (11:24 +1000)
qcsrc/common/weapons/weapon/arc.qc
qcsrc/common/weapons/weapon/hagar.qc

index a61dc0f031d3e9ed4da12e1be93b8e69c703b9fc..57697635791cd7b229ba5bf6639717a61a21c3c1 100644 (file)
@@ -340,6 +340,8 @@ void W_Arc_Beam_Think(entity this)
                ||
                forbidWeaponUse(this.owner)
                ||
+               PS(this.owner).m_switchweapon != WEP_ARC
+               ||
                (!PHYS_INPUT_BUTTON_ATCK(this.owner) && !burst )
                ||
                this.owner.vehicle
index 9a178c03bbc0a47dd6fd8af8bdeb8be1ebdd96f4..097f2bfdcccdc06fb4df27b6e486d47260a77ab9 100644 (file)
@@ -310,7 +310,7 @@ void W_Hagar_Attack2_Load(Weapon thiswep, entity actor, .entity weaponentity)
 {
        // loadable hagar secondary attack, must always run each frame
 
-       if(time < game_starttime)
+       if(time < game_starttime || PS(actor).m_switchweapon != WEP_HAGAR)
                return;
 
        bool loaded = actor.hagar_load >= WEP_CVAR_SEC(hagar, load_max);
@@ -416,7 +416,7 @@ void W_Hagar_Attack2_Load(Weapon thiswep, entity actor, .entity weaponentity)
 
 void W_Hagar_Attack_Auto(Weapon thiswep, entity actor, .entity weaponentity, int fire)
 {
-       if(!(fire & 1) || actor.hagar_load || actor.hagar_loadblock)
+       if(!(fire & 1) || actor.hagar_load || actor.hagar_loadblock || PS(actor).m_switchweapon != WEP_HAGAR)
        {
                w_ready(thiswep, actor, weaponentity, fire);
                return;