From 2d57cd5a04627eb0926658e929b406990b1f4d47 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Amadeusz=20S=C5=82awi=C5=84ski?= Date: Wed, 22 Feb 2017 14:38:37 +0100 Subject: [PATCH] consolidate ifs in ammo spawn funcs --- qcsrc/common/t_items.qc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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); -- 2.39.2