]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/hagar.qc
Merge branch 'master' into Mario/intrusive_2
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / hagar.qc
index 69f12eb457c6533caa5af4d6831946cd9c75ae8b..d533f19098b7ae6f71efd6ae595f3fd4b6b14635 100644 (file)
@@ -313,7 +313,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);
@@ -419,7 +419,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;