-#ifndef BOT_API_H
-#define BOT_API_H
+#pragma once
-#include "../defs.qh"
-#include "../autocvars.qh"
-#include "../../common/weapons/all.qh"
-#include "../../common/teams.qh"
-#include "../teamplay.qh"
-#include "../miscfunctions.qh"
-#include "../campaign.qh"
-#include "../cl_client.qh"
-#include "../mutators/mutators_include.qh"
-#include "../constants.qh"
-#include "../weapons/weaponsystem.qh"
+#include <common/weapons/_all.qh>
-const int WAYPOINTFLAG_GENERATED = 0x800000;
+const int WAYPOINTFLAG_GENERATED = BIT(23);
+const int WAYPOINTFLAG_ITEM = BIT(22);
+const int WAYPOINTFLAG_TELEPORT = BIT(21);
+const int WAYPOINTFLAG_NORELINK = BIT(20);
+const int WAYPOINTFLAG_PERSONAL = BIT(19);
+const int WAYPOINTFLAG_PROTECTED = BIT(18); // Useless WP detection never kills these.
+const int WAYPOINTFLAG_USEFUL = BIT(17); // Useless WP detection temporary flag.
+const int WAYPOINTFLAG_DEAD_END = BIT(16); // Useless WP detection temporary flag.
-int autocvar_bot_vs_human;
-int autocvar_bot_number;
-bool autocvar_bot_sound_monopoly;
-float autocvar_bot_ai_strategyinterval;
+entity kh_worldkeylist;
+.entity kh_worldkeynext;
float bot_custom_weapon;
float bot_weapons_close[Weapons_MAX];
float bot_weapons_far[Weapons_MAX];
float bot_weapons_mid[Weapons_MAX];
-float currentbots;
float skill;
.float bot_attack;
.float wpcost;
.int wpflags;
-bool bot_aim(float shotspeed, float shotspeedupward, float maxshottime, float applygravity);
-void bot_clientconnect();
-void bot_clientdisconnect();
+bool bot_aim(entity this, float shotspeed, float shotspeedupward, float maxshottime, float applygravity);
+void bot_clientconnect(entity this);
+void bot_clientdisconnect(entity this);
void bot_cmdhelp(string scmd);
void bot_endgame();
bool bot_fixcount();
void bot_relinkplayerlist();
void bot_resetqueues();
void bot_serverframe();
-bool bot_shouldattack(entity e);
-void bot_think();
+bool bot_shouldattack(entity this, entity e);
+void bot_think(entity this);
entity find_bot_by_name(string name);
entity find_bot_by_number(float number);
-void havocbot_goalrating_controlpoints(float ratingscale, vector org, float sradius);
-void havocbot_goalrating_enemyplayers(float ratingscale, vector org, float sradius);
-void havocbot_goalrating_items(float ratingscale, vector org, float sradius);
+void havocbot_goalrating_enemyplayers(entity this, float ratingscale, vector org, float sradius);
+void havocbot_goalrating_items(entity this, float ratingscale, vector org, float sradius);
entity navigation_findnearestwaypoint(entity ent, float walkfromwp);
-void navigation_goalrating_end();
-void navigation_goalrating_start();
-void navigation_markroutes(entity fixed_source_waypoint);
+void navigation_goalrating_end(entity this);
+void navigation_goalrating_start(entity this);
+void navigation_markroutes(entity this, entity fixed_source_waypoint);
void navigation_markroutes_inverted(entity fixed_source_waypoint);
-void navigation_routerating(entity e, float f, float rangebias);
+void navigation_routerating(entity this, entity e, float f, float rangebias);
bool tracewalk(entity e, vector start, vector m1, vector m2, vector end, float movemode);
void waypoint_spawnforteleporter(entity e, vector destination, float timetaken);
void waypoint_spawnforteleporter_v(entity e, vector org, vector destination, float timetaken);
entity waypoint_spawn(vector m1, vector m2, float f);
-
-#endif