Xonotic
|
#include "bot.qh"
#include <common/constants.qh>
#include <common/mapinfo.qh>
#include <common/net_linked.qh>
#include <common/physics/player.qh>
#include <common/stats.qh>
#include <common/teams.qh>
#include <common/util.qh>
#include <common/weapons/_all.qh>
#include <lib/csqcmodel/sv_model.qh>
#include <lib/warpzone/common.qh>
#include <lib/warpzone/util_server.qh>
#include <server/antilag.qh>
#include <server/bot/default/aim.qh>
#include <server/bot/default/cvars.qh>
#include <server/bot/default/havocbot/havocbot.qh>
#include <server/bot/default/havocbot/scripting.qh>
#include <server/bot/default/navigation.qh>
#include <server/bot/default/scripting.qh>
#include <server/bot/default/waypoints.qh>
#include <server/campaign.qh>
#include <server/client.qh>
#include <server/damage.qh>
#include <server/items/items.qh>
#include <server/mutators/_mod.qh>
#include <server/race.qh>
#include <server/scores_rules.qh>
#include <server/teamplay.qh>
#include <server/weapons/accuracy.qh>
#include <server/world.qh>
Go to the source code of this file.
Macros | |
#define | PARSE_WEAPON_PRIORITIES(dist) |
#define | READSKILL(f, w, r) |
Functions | |
void | autoskill (float factor) |
void | bot_calculate_stepheightvec () |
void | bot_clientconnect (entity this) |
void | bot_clientdisconnect (entity this) |
void | bot_custom_weapon_priority_setup () |
void | bot_endgame () |
bool | bot_fixcount (bool multiple_per_frame) |
void | bot_relinkplayerlist () |
void | bot_removefromlargestteam () |
void | bot_removenewest () |
void | bot_serverframe () |
void | bot_setclientfields (entity this) |
void | bot_setnameandstuff (entity this) |
entity | bot_spawn () |
void | bot_think (entity this) |
STATIC_INIT (bot) | |
#define PARSE_WEAPON_PRIORITIES | ( | dist | ) |
Referenced by bot_custom_weapon_priority_setup().
#define READSKILL | ( | f, | |
w, | |||
r | |||
) |
Referenced by bot_setnameandstuff().
Definition at line 537 of file bot.qc.
References autocvar_skill, bprint(), cvar_set(), FOREACH_CLIENT, ftos(), IS_PLAYER, IS_REAL_CLIENT, LOG_DEBUG, max(), and strcat().
Referenced by bot_serverframe().
void bot_calculate_stepheightvec | ( | ) |
Definition at line 583 of file bot.qc.
References jumpheight_time, jumpheight_vec, jumpstepheightvec, and stepheightvec.
Referenced by bot_serverframe(), STATIC_INIT(), and waypoint_think().
Definition at line 426 of file bot.qc.
References bot_config_loaded, bot_forced_team, bot_lagfunc(), bot_nextthink, bot_preferredcolors, bot_setclientfields(), bot_setnameandstuff(), clientcolors, createdtime, havocbot_setupbot(), IS_BOT_CLIENT, isbot, random(), SetPlayerTeam(), TEAM_CHANGE_MANUAL, Team_IsValidIndex(), TeamBalance_JoinBestTeam(), teamplay, and time.
Referenced by ClientConnect(), and PlayerState_detach().
Definition at line 411 of file bot.qc.
References bot_clearqueue(), bot_cmd_current, bot_waypoint_queue_owner, cleanname, IS_BOT_CLIENT, netname_freeme, NULL, playermodel_freeme, playerskin_freeme, and strfree.
Referenced by ClientState_attach(), and ClientState_detach().
void bot_custom_weapon_priority_setup | ( | ) |
Definition at line 308 of file bot.qc.
References argv(), autocvar_bot_ai_custom_weapon_priority_close, autocvar_bot_ai_custom_weapon_priority_distances, autocvar_bot_ai_custom_weapon_priority_far, autocvar_bot_ai_custom_weapon_priority_mid, bot_custom_weapon, bot_distance_close, bot_distance_far, PARSE_WEAPON_PRIORITIES, stof(), strcpy, and tokenizebyseparator.
Referenced by bot_serverframe().
void bot_endgame | ( | ) |
Definition at line 369 of file bot.qc.
References bot_list, bot_relinkplayerlist(), entity(), and setcolor.
Referenced by Shutdown().
Definition at line 591 of file bot.qc.
References autocvar_bot_join_empty, autocvar_bot_number, autocvar_bot_vs_human, autocvar_minplayers, autocvar_minplayers_per_team, AvailableTeams(), bot_removenewest(), bot_spawn(), botframe_nextthink, bots_would_leave, bprint(), ceil(), currentbots, fabs(), floor(), FOREACH_CLIENT, GetPlayerLimit(), IS_PLAYER, IS_REAL_CLIENT, M_ARGV, max(), maxclients, min(), MUTATOR_CALLHOOK, NULL, teamplay, and time.
Referenced by bot_serverframe(), GameCommand_bot_cmd(), and GameCommand_setbots().
void bot_relinkplayerlist | ( | ) |
Definition at line 381 of file bot.qc.
References bot_ispaused(), bot_list, bot_strategytoken, bot_strategytoken_taken, currentbots, entity(), FOREACH_CLIENT, IS_BOT_CLIENT, IS_OBSERVER, NULL, and player_count.
Referenced by bot_cmd_continue(), bot_cmd_pause(), bot_endgame(), ClientConnect(), ClientDisconnect(), PutClientInServer(), and PutObserverInServer().
void bot_removefromlargestteam | ( | ) |
Definition at line 454 of file bot.qc.
References best, entity(), FOREACH_CLIENT, if(), NULL, Team_IsValidTeam(), TeamBalance_CheckAllowedTeams(), and TeamBalance_GetTeamCounts().
Referenced by bot_removenewest().
void bot_removenewest | ( | ) |
Definition at line 501 of file bot.qc.
References best, bot_removefromlargestteam(), currentbots, entity(), FOREACH_CLIENT, NULL, and teamplay.
Referenced by bot_fixcount().
void bot_serverframe | ( | ) |
Definition at line 658 of file bot.qc.
References autocvar_bot_ai_bunnyhop_skilloffset, autocvar_bot_ai_dangerdetectioninterval, autocvar_bot_ai_dangerdetectionupdates, autocvar_bot_navigation_ignoreplayers, autocvar_g_waypointeditor_auto, autocvar_skill, autocvar_skill_auto, autocvar_waypoint_benchmark, autoskill(), autoskill_nextthink, bot_calculate_stepheightvec(), bot_custom_weapon_priority_setup(), bot_fixcount(), bot_list, bot_navigation_movemode, bot_strategytoken, bot_strategytoken_taken, botframe_autowaypoints(), botframe_cachedwaypointlinks, botframe_loadedforcedlinks, botframe_nextdangertime, botframe_nextthink, botframe_showwaypointlinks(), botframe_spawnedwaypoints, botframe_updatedangerousobjects(), currentbots, entity(), FOREACH_CLIENT, g_waypoints, IL_EACH, intermission_running, IS_BOT_CLIENT, IS_DEAD, IS_REAL_CLIENT, localcmd, MOVE_NOMONSTERS, MOVE_NORMAL, NULL, skill, time, waypoint_load_hardwiredlinks(), waypoint_load_links(), waypoint_loadall(), waypoint_updatecost_foralllinks(), and waypointeditor_enabled.
Referenced by StartFrame().
Definition at line 36 of file bot.qc.
References CS_CVAR.
Referenced by bot_clientconnect(), and bot_spawn().
Definition at line 143 of file bot.qc.
References argv(), autocvar_bot_config_file, autocvar_bot_prefix, autocvar_bot_suffix, autocvar_bot_usemodelnames, autocvar_bot_vs_human, autocvar_g_campaign, AvailableTeams(), bot_aggresskill, bot_aimskill, bot_aiskill, bot_config_loaded, bot_dodgeskill, bot_forced_team, bot_mouseskill, bot_moveskill, bot_offsetskill, bot_pingskill, bot_preferredcolors, bot_rangepreference, bot_thinkskill, bot_weaponskill, cleanname, clientcolors, count, entity(), etof(), fclose(), fgets(), FILE_READ, floor(), fopen(), FOREACH_CLIENT, ftos(), havocbot_keyboardskill, IS_BOT_CLIENT, LOG_INFOF, name, netname, netname_freeme, NULL, playermodel, playermodel_freeme, playerskin, playerskin_freeme, random(), RandomSelection_AddString, RandomSelection_chosen_string, RandomSelection_Init(), READSKILL, setcolor, stof(), strcat(), strzone(), substring(), Team_IsValidIndex(), TeamBalance_CheckAllowedTeams(), TeamBalance_Destroy(), TeamBalance_GetNumberOfPlayers(), TeamBalance_GetTeamCounts(), teamplay, and tokenizebyseparator.
Referenced by bot_clientconnect(), and bot_spawn().
entity bot_spawn | ( | ) |
Definition at line 42 of file bot.qc.
References bot_setclientfields(), bot_setnameandstuff(), ClientConnect(), currentbots, entity(), PutClientInServer(), and setItemGroupCount().
Referenced by bot_fixcount().
Definition at line 57 of file bot.qc.
References AI_STATUS_STUCK, aistatus, angles, autocvar_bot_ai_thinkinterval, autocvar_bot_god, autocvar_g_campaign, bot_aiskill, bot_jump_time, bot_nextthink, bot_pingskill, bot_waypoint_queue_owner, bound(), campaign_bots_may_start, CS(), DEAD_DEAD, DEAD_DYING, deadflag, dmg_inflictor, dmg_save, dmg_take, fixangle, FL_GODMODE, flags, IS_DEAD, IS_OBSERVER, IS_PLAYER, max(), min(), navigation_goalrating_timeout(), navigation_goalrating_timeout_force(), navigation_unstuck(), NULL, PHYS_INPUT_BUTTON_ATCK, PHYS_INPUT_BUTTON_ATCK2, PHYS_INPUT_BUTTON_CHAT, PHYS_INPUT_BUTTON_CROUCH, PHYS_INPUT_BUTTON_DRAG, PHYS_INPUT_BUTTON_HOOK, PHYS_INPUT_BUTTON_INFO, PHYS_INPUT_BUTTON_JUMP, PHYS_INPUT_BUTTON_USE, PHYS_INPUT_BUTTON_ZOOM, random(), skill, time, and v_angle.
Referenced by sys_phys_ai().
STATIC_INIT | ( | bot | ) |
Definition at line 33 of file bot.qc.
References bot_calculate_stepheightvec().