]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/shotgun.qc
Weapons: require explicit `Weapons_from` call
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / shotgun.qc
index c50eff100e81f04bb69551bc54d1eae0c6bc3af6..27dfe4e4f6e096b0e191198c2cddb104eefb496a 100644 (file)
@@ -200,7 +200,7 @@ void W_Shotgun_Attack3_Frame2(Weapon thiswep, entity actor, .entity weaponentity
        if (!thiswep.wr_checkammo2(thiswep))
        if (!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
        {
-               W_SwitchWeapon_Force(actor, w_getbestweapon(actor));
+               W_SwitchWeapon_Force(actor, Weapons_from(w_getbestweapon(actor)));
                w_ready(thiswep, actor, weaponentity, fire);
                return;
        }
@@ -214,7 +214,7 @@ void W_Shotgun_Attack3_Frame1(Weapon thiswep, entity actor, .entity weaponentity
        if (!thiswep.wr_checkammo2(thiswep))
        if (!(actor.items & IT_UNLIMITED_WEAPON_AMMO))
        {
-               W_SwitchWeapon_Force(actor, w_getbestweapon(actor));
+               W_SwitchWeapon_Force(actor, Weapons_from(w_getbestweapon(actor)));
                w_ready(thiswep, actor, weaponentity, fire);
                return;
        }