#include "havocbot.qh"
-#include "../../_all.qh"
#include "../aim.qh"
#include "../bot.qh"
#include "../waypoints.qh"
#include "../../../common/constants.qh"
+#include "../../../common/items/all.qh"
#include "../../../common/triggers/trigger/jumppads.qh"
-#include "../../../warpzonelib/common.qh"
+#include "../../../lib/warpzone/common.qh"
+
+.float speed;
void havocbot_ai()
{SELFPARAM();
if(self.weapons)
{
- WEP_ACTION(self.weapon, WR_AIM);
+ Weapon w = get_weaponinfo(self.weapon);
+ w.wr_aim(w);
if (autocvar_bot_nofire || IS_INDEPENDENT_PLAYER(self))
{
self.BUTTON_ATCK = false;
float i, other_weapon_available = false;
for(i = WEP_FIRST; i <= WEP_LAST; ++i)
{
+ Weapon w = get_weaponinfo(i);
// if we are out of ammo for all other weapons, it's an emergency to switch to anything else
- if (WEP_ACTION(i, WR_CHECKAMMO1) + WEP_ACTION(i, WR_CHECKAMMO2))
+ if (w.wr_checkammo1(w) + w.wr_checkammo2(w))
other_weapon_available = true;
}
if(other_weapon_available)
int i;
// ;)
- if(g_weaponarena_weapons == WEPSET_TUBA)
+ if(g_weaponarena_weapons == WEPSET(TUBA))
{
self.switchweapon = WEP_TUBA.m_id;
return;
// Choose weapons for far distance
if ( distance > bot_distance_far ) {
- for(i=0; i < WEP_COUNT && bot_weapons_far[i] != -1 ; ++i){
+ for(i=0; i < Weapons_COUNT && bot_weapons_far[i] != -1 ; ++i){
w = bot_weapons_far[i];
if ( client_hasweapon(self, w, true, false) )
{
// Choose weapons for mid distance
if ( distance > bot_distance_close) {
- for(i=0; i < WEP_COUNT && bot_weapons_mid[i] != -1 ; ++i){
+ for(i=0; i < Weapons_COUNT && bot_weapons_mid[i] != -1 ; ++i){
w = bot_weapons_mid[i];
if ( client_hasweapon(self, w, true, false) )
{
}
// Choose weapons for close distance
- for(i=0; i < WEP_COUNT && bot_weapons_close[i] != -1 ; ++i){
+ for(i=0; i < Weapons_COUNT && bot_weapons_close[i] != -1 ; ++i){
w = bot_weapons_close[i];
if ( client_hasweapon(self, w, true, false) )
{