From: Mircea Kitsune Date: Fri, 11 Feb 2011 23:06:13 +0000 (+0200) Subject: Write that last code in a better way X-Git-Tag: xonotic-v0.5.0~309^2~7^2~27 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d079c036659292d5e043f8d8d32df3909fae1f89;p=xonotic%2Fxonotic-data.pk3dir.git Write that last code in a better way --- diff --git a/qcsrc/server/bot/havocbot/havocbot.qc b/qcsrc/server/bot/havocbot/havocbot.qc index 6fe6d2059..67e076f5c 100644 --- a/qcsrc/server/bot/havocbot/havocbot.qc +++ b/qcsrc/server/bot/havocbot/havocbot.qc @@ -1005,8 +1005,9 @@ void havocbot_chooseweapon() for(i=0; i < WEP_COUNT && bot_weapons_far[i] != -1 ; ++i){ w = bot_weapons_far[i]; if ( client_hasweapon(self, w, TRUE, FALSE) ) - if not (self.weapon_load[w] < 0) // this weapon is scheduled for reloading, don't switch to it during combat { + if (self.weapon_load[w] < 0) // this weapon is scheduled for reloading, don't switch to it during combat + continue; if ( self.weapon == w && combo) continue; self.switchweapon = w; @@ -1020,8 +1021,9 @@ void havocbot_chooseweapon() for(i=0; i < WEP_COUNT && bot_weapons_mid[i] != -1 ; ++i){ w = bot_weapons_mid[i]; if ( client_hasweapon(self, w, TRUE, FALSE) ) - if not (self.weapon_load[w] < 0) // this weapon is scheduled for reloading, don't switch to it during combat { + if (self.weapon_load[w] < 0) // this weapon is scheduled for reloading, don't switch to it during combat + continue; if ( self.weapon == w && combo) continue; self.switchweapon = w; @@ -1034,8 +1036,9 @@ void havocbot_chooseweapon() for(i=0; i < WEP_COUNT && bot_weapons_close[i] != -1 ; ++i){ w = bot_weapons_close[i]; if ( client_hasweapon(self, w, TRUE, FALSE) ) - if not (self.weapon_load[w] < 0) // this weapon is scheduled for reloading, don't switch to it during combat { + if (self.weapon_load[w] < 0) // this weapon is scheduled for reloading, don't switch to it during combat + continue; if ( self.weapon == w && combo) continue; self.switchweapon = w;