]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Exclude hidden weapons from the allguns list
authorMario <mario@smbclan.net>
Sat, 10 Aug 2019 03:54:58 +0000 (13:54 +1000)
committerMario <mario@smbclan.net>
Sat, 10 Aug 2019 03:54:58 +0000 (13:54 +1000)
qcsrc/server/miscfunctions.qc

index bc0b49ca027ece50fb41bbccc35723b3252886d7..167a75ae2c371ad5e833099cc962ada6889affac 100644 (file)
@@ -499,7 +499,7 @@ float want_weapon(entity weaponinfo, float allguns) // WEAPONTODO: what still ne
        allow_mutatorblocked = M_ARGV(3, bool);
 
        if(allguns)
-               d = boolean(weaponinfo.spawnflags & WEP_FLAG_NORMAL);
+               d = boolean((weaponinfo.spawnflags & WEP_FLAG_NORMAL) && !(weaponinfo.spawnflags & WEP_FLAG_HIDDEN));
        else if(!mutator_returnvalue)
                d = !(!weaponinfo.weaponstart);