Increase the maximum number of mutators
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / api.qh
1 #ifndef BOT_API_H
2 #define BOT_API_H
3
4 #include "../defs.qh"
5 #include "../autocvars.qh"
6 #include "../../common/weapons/all.qh"
7 #include "../../common/teams.qh"
8 #include "../teamplay.qh"
9 #include "../miscfunctions.qh"
10 #include "../campaign.qh"
11 #include "../cl_client.qh"
12 #include "../mutators/mutators_include.qh"
13 #include "../constants.qh"
14 #include "../weapons/weaponsystem.qh"
15
16 const int WAYPOINTFLAG_GENERATED = 0x800000;
17
18 int autocvar_bot_vs_human;
19 int autocvar_bot_number;
20 bool autocvar_bot_sound_monopoly;
21 float autocvar_bot_ai_strategyinterval;
22
23 float bot_custom_weapon;
24 float bot_weapons_close[Weapons_MAX];
25 float bot_weapons_far[Weapons_MAX];
26 float bot_weapons_mid[Weapons_MAX];
27 float currentbots;
28 float skill;
29
30 .float bot_attack;
31 .float bot_dodgerating;
32 .float bot_dodge;
33 .float bot_forced_team;
34 .float bot_moveskill; // moving technique
35 .float bot_pickup;
36 .float(entity player, entity item) bot_pickupevalfunc;
37 .float bot_strategytime;
38 .string cleanname;
39 .float havocbot_role_timeout;
40 .float isbot; // true if this client is actually a bot
41 .float lastteleporttime;
42 .float navigation_hasgoals;
43 .float nearestwaypointtimeout;
44 .entity nearestwaypoint;
45 .float speed;
46 .entity wp00, wp01, wp02, wp03, wp04, wp05, wp06, wp07, wp08, wp09, wp10, wp11, wp12, wp13, wp14, wp15;
47 .entity wp16, wp17, wp18, wp19, wp20, wp21, wp22, wp23, wp24, wp25, wp26, wp27, wp28, wp29, wp30, wp31;
48 .float wp00mincost, wp01mincost, wp02mincost, wp03mincost, wp04mincost, wp05mincost, wp06mincost, wp07mincost;
49 .float wp08mincost, wp09mincost, wp10mincost, wp11mincost, wp12mincost, wp13mincost, wp14mincost, wp15mincost;
50 .float wp16mincost, wp17mincost, wp18mincost, wp19mincost, wp20mincost, wp21mincost, wp22mincost, wp23mincost;
51 .float wp24mincost, wp25mincost, wp26mincost, wp27mincost, wp28mincost, wp29mincost, wp30mincost, wp31mincost;
52 .float wpconsidered;
53 .float wpcost;
54 .int wpflags;
55
56 bool bot_aim(float shotspeed, float shotspeedupward, float maxshottime, float applygravity);
57 void bot_clientconnect();
58 void bot_clientdisconnect();
59 void bot_cmdhelp(string scmd);
60 void bot_endgame();
61 bool bot_fixcount();
62 void bot_list_commands();
63 void bot_queuecommand(entity bot, string cmdstring);
64 void bot_relinkplayerlist();
65 void bot_resetqueues();
66 void bot_serverframe();
67 bool bot_shouldattack(entity e);
68 void bot_think();
69
70 entity find_bot_by_name(string name);
71 entity find_bot_by_number(float number);
72
73 void havocbot_goalrating_controlpoints(float ratingscale, vector org, float sradius);
74 void havocbot_goalrating_enemyplayers(float ratingscale, vector org, float sradius);
75 void havocbot_goalrating_items(float ratingscale, vector org, float sradius);
76
77 entity navigation_findnearestwaypoint(entity ent, float walkfromwp);
78 void navigation_goalrating_end();
79 void navigation_goalrating_start();
80 void navigation_markroutes(entity fixed_source_waypoint);
81 void navigation_markroutes_inverted(entity fixed_source_waypoint);
82 void navigation_routerating(entity e, float f, float rangebias);
83
84 bool tracewalk(entity e, vector start, vector m1, vector m2, vector end, float movemode);
85
86 void waypoint_remove(entity e);
87 void waypoint_saveall();
88 void waypoint_schedulerelinkall();
89 void waypoint_schedulerelink(entity wp);
90 void waypoint_spawnforitem(entity e);
91 void waypoint_spawnforitem_force(entity e, vector org);
92 void waypoint_spawnforteleporter(entity e, vector destination, float timetaken);
93 void waypoint_spawnforteleporter_v(entity e, vector org, vector destination, float timetaken);
94 entity waypoint_spawn(vector m1, vector m2, float f);
95
96 #endif