]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/selection.qc
Add a new mode to weaponswitch debug which enforces the secondary weapons to only...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / selection.qc
index 06d5f30851711c5a952ce3935513d870da97d12a..e8b8d9a4b293c9732c7dafe777327d626c8a2d54 100644 (file)
@@ -61,6 +61,8 @@ bool client_hasweapon(entity this, Weapon wpn, .entity weaponentity, float andam
                        sprint(this, "Invalid weapon\n");
                return false;
        }
+       if (autocvar_g_weaponswitch_debug == 2 && weaponslot(weaponentity) > 0 && !(wpn.spawnflags & WEP_FLAG_DUALWIELD))
+               return false; // no complaints needed
        if (this.weapons & WepSet_FromWeapon(wpn))
        {
                if (andammo)