X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fbot%2Fhavocbot%2Fhavocbot.qc;h=2ce9706a2ff40cdcb67557a2d1d6979a9d4e5dd3;hp=2e57eecb3b1c6cf3e2b7e0e7bbc4e15e6b2a6867;hb=3adaa0873ad9eac20f32e6e3fc0455d4f9e044cd;hpb=ca135a84df8858611eba56e8c3eef1e7b21959aa diff --git a/qcsrc/server/bot/havocbot/havocbot.qc b/qcsrc/server/bot/havocbot/havocbot.qc index 2e57eecb3b..2ce9706a2f 100644 --- a/qcsrc/server/bot/havocbot/havocbot.qc +++ b/qcsrc/server/bot/havocbot/havocbot.qc @@ -92,7 +92,7 @@ void havocbot_ai() if(self.weapons) { - weapon_action(self.weapon, WR_AIM); + WEP_ACTION(self.weapon, WR_AIM); if (autocvar_bot_nofire || IS_INDEPENDENT_PLAYER(self)) { self.BUTTON_ATCK = FALSE; @@ -164,7 +164,7 @@ void havocbot_ai() for(i = WEP_FIRST; i <= WEP_LAST; ++i) { e = get_weaponinfo(i); - if ((self.weapons & WepSet_FromWeapon(i)) && (e.spawnflags & WEP_FLAG_RELOADABLE) && (self.weapon_load[i] < cvar(strcat("g_balance_", e.netname, "_reload_ammo")))) + if ((self.weapons & WepSet_FromWeapon(i)) && (e.spawnflags & WEP_FLAG_RELOADABLE) && (self.weapon_load[i] < e.reloading_ammo)) self.switchweapon = i; } } @@ -590,10 +590,10 @@ void havocbot_movetogoal() return; } - else if(self.health>autocvar_g_balance_rocketlauncher_damage*0.5) + else if(self.health>WEP_CVAR(devastator, damage)*0.5) { if(self.velocity_z < 0) - if(client_hasweapon(self, WEP_ROCKET_LAUNCHER, TRUE, FALSE)) + if(client_hasweapon(self, WEP_DEVASTATOR, TRUE, FALSE)) { self.movement_x = maxspeed; @@ -607,10 +607,10 @@ void havocbot_movetogoal() return; } - self.switchweapon = WEP_ROCKET_LAUNCHER; + self.switchweapon = WEP_DEVASTATOR; self.v_angle_x = 90; self.BUTTON_ATCK = TRUE; - self.rocketjumptime = time + autocvar_g_balance_rocketlauncher_detonatedelay; + self.rocketjumptime = time + WEP_CVAR(devastator, detonatedelay); return; } } @@ -956,7 +956,7 @@ float havocbot_chooseweapon_checkreload(float new_weapon) for(i = WEP_FIRST; i <= WEP_LAST; ++i) { // if we are out of ammo for all other weapons, it's an emergency to switch to anything else - if (weapon_action(i, WR_CHECKAMMO1) + weapon_action(i, WR_CHECKAMMO2)) + if (WEP_ACTION(i, WR_CHECKAMMO1) + WEP_ACTION(i, WR_CHECKAMMO2)) other_weapon_available = TRUE; } if(other_weapon_available) @@ -982,7 +982,7 @@ void havocbot_chooseweapon() { // If no weapon was chosen get the first available weapon if(self.weapon==0) - for(i=WEP_LASER + 1; i < WEP_COUNT ; ++i) + for(i=WEP_BLASTER + 1; i < WEP_COUNT ; ++i) // Samual: This seems strange compared to other weapon loops... { if(client_hasweapon(self, i, TRUE, FALSE)) {