]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
consolidate ifs in ammo spawn funcs
authorAmadeusz Sławiński <amade@asmblr.net>
Wed, 22 Feb 2017 13:38:37 +0000 (14:38 +0100)
committerAmadeusz Sławiński <amade@asmblr.net>
Wed, 22 Feb 2017 13:38:37 +0000 (14:38 +0100)
qcsrc/common/t_items.qc

index 5585806ddeeb1a66b6d24407925e6531f2b6c3f9..7576d761ed75c993a4c3922a050c1b8afc1ae519 100644 (file)
@@ -1354,9 +1354,8 @@ spawnfunc(item_rockets)
 
 spawnfunc(item_bullets)
 {
-       if(!weaponswapping)
-       if(autocvar_sv_q3acompat_machineshotgunswap)
-       if(this.classname != "droppedweapon")
+       if(!weaponswapping && autocvar_sv_q3acompat_machineshotgunswap && 
+          (this.classname != "droppedweapon"))
        {
                weaponswapping = true;
                spawnfunc_item_shells(this);
@@ -1379,9 +1378,8 @@ spawnfunc(item_plasma)
 
 spawnfunc(item_shells)
 {
-       if(!weaponswapping)
-       if(autocvar_sv_q3acompat_machineshotgunswap)
-       if(this.classname != "droppedweapon")
+       if(!weaponswapping && autocvar_sv_q3acompat_machineshotgunswap &&
+          (this.classname != "droppedweapon"))
        {
                weaponswapping = true;
                spawnfunc_item_bullets(this);