X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fbot%2Fapi.qh;h=64957b92e09c0b7ea7b26e8955cebcc3e784a60f;hb=268f9c69576b6bb929f66d19f0d077d19ba47edd;hp=9dc20ebb3b70e765544fc5331aaad5ade413cb63;hpb=a39af09cb4b15ec94461af2c1f314098ffe7ce0c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/bot/api.qh b/qcsrc/server/bot/api.qh index 9dc20ebb3..64957b92e 100644 --- a/qcsrc/server/bot/api.qh +++ b/qcsrc/server/bot/api.qh @@ -1,30 +1,23 @@ -#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 -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; @@ -53,9 +46,9 @@ float skill; .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(); @@ -64,22 +57,21 @@ void bot_queuecommand(entity bot, string cmdstring); 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); @@ -92,5 +84,3 @@ void waypoint_spawnforitem_force(entity e, vector org); 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