|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include "bot.qh"#include <common/constants.qh>#include <common/mapinfo.qh>#include <common/net_linked.qh>#include <common/notifications/all.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/weapons/selection.qh>#include <server/world.qh>#include <server/command/vote.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 569 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 615 of file bot.qc.
References autocvar_sv_gravity, autocvar_sv_jumpvelocity, autocvar_sv_stepheight, jumpheight_time, jumpheight_vec, jumpstepheightvec, and stepheightvec.
Referenced by bot_serverframe(), STATIC_INIT(), and waypoint_think().
Definition at line 469 of file bot.qc.
References bot_config_loaded, bot_nextthink, bot_preferredcolors, bot_setclientfields(), bot_setnameandstuff(), clientcolors, createdtime, entity(), havocbot_setupbot(), IS_BOT_CLIENT, isbot, random(), and time.
Referenced by ClientConnect().
Definition at line 454 of file bot.qc.
References bot_clearqueue(), bot_cmd_current, bot_waypoint_queue_owner, cleanname, entity(), IS_BOT_CLIENT, netname_freeme, NULL, playermodel_freeme, playerskin_freeme, and strfree.
Referenced by ClientState_detach().
| void bot_custom_weapon_priority_setup | ( | ) |
Definition at line 351 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 412 of file bot.qc.
References bot_list, bot_relinkplayerlist(), entity(), and setcolor.
Referenced by Shutdown().
Definition at line 623 of file bot.qc.
References autocvar_bot_join_empty, autocvar_bot_number, autocvar_bot_vs_human, autocvar_minplayers, autocvar_minplayers_per_team, AVAILABLE_TEAMS, 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 424 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(), MUTATOR_HOOKFUNCTION(), PutClientInServer(), and PutObserverInServer().
| void bot_removefromlargestteam | ( | ) |
Definition at line 486 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 533 of file bot.qc.
References best, bot_removefromlargestteam(), entity(), FOREACH_CLIENT, NULL, and teamplay.
Referenced by bot_fixcount().
| void bot_serverframe | ( | ) |
Definition at line 689 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, game_stopped, IL_EACH, intermission_running, IS_BOT_CLIENT, IS_DEAD, IS_REAL_CLIENT, localcmd(), MOVE_NOMONSTERS, MOVE_NORMAL, NULL, skill, STAT, time, waypoint_load_hardwiredlinks(), waypoint_load_links(), waypoint_loadall(), waypoint_updatecost_foralllinks(), and waypointeditor_enabled.
Referenced by StartFrame().
Definition at line 39 of file bot.qc.
References CS_CVAR, and entity().
Referenced by bot_clientconnect(), and bot_spawn().
Definition at line 163 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, AVAILABLE_TEAMS, 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(), SUPERBOT, team, 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 45 of file bot.qc.
References bot_setclientfields(), bot_setnameandstuff(), ClientConnect, currentbots, entity(), NULL, PutClientInServer, Send_Notification(), setItemGroupCount(), and teamplay.
Referenced by bot_fixcount().
Definition at line 62 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, entity(), fixangle, FL_GODMODE, flags, game_starttime, 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(), ready, ReadyCount(), skill, SUPERBOT, time, v_angle, and warmup_stage.
Referenced by sys_phys_ai().
| STATIC_INIT | ( | bot | ) |
Definition at line 36 of file bot.qc.
References bot_calculate_stepheightvec().