From: Amadeusz Sławiński Date: Wed, 22 Feb 2017 13:38:37 +0000 (+0100) Subject: consolidate ifs in ammo spawn funcs X-Git-Tag: xonotic-v0.8.5~2843^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2d57cd5a04627eb0926658e929b406990b1f4d47;p=xonotic%2Fxonotic-data.pk3dir.git consolidate ifs in ammo spawn funcs --- diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index 5585806dde..7576d761ed 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -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);