‪Black Ops 3 Source Code Explorer  0.1
‪An script explorer for Black Ops 3 by ZeRoY
All Data Structures Files Functions Variables Macros
_bot.gsc File Reference

Go to the source code of this file.

Macros

#define APPROACH_GOAL_RADIUS_MAX   1500
 
#define APPROACH_GOAL_SPACING   128
 
#define BOT_DIVE_RADIUS   128
 
#define BOT_MAX_STUCK_CYCLES   3
 
#define BOT_POSITION_HISTORY_SIZE   5
 
#define BOT_STUCK_DISTANCE   128
 
#define BOT_STUCK_RESOLUTION_S   1.5
 
#define BOT_SWIM_HEIGHT_MAX   45
 
#define BOT_SWIM_HEIGHT_MIN   25
 
#define COOP_FOLLOW_RADIUS_MAX   300
 
#define COOP_FOLLOW_RADIUS_MIN   150
 
#define DEFAULT_CORNER_DIST   128
 
#define DEFAULT_START_CORNER_DIST   64
 

Functions

function __init__ ()
 
function activate_hero_gadget (weapon)
 
function add_bot (team)
 
function add_bot_at_eye_trace (team)
 
function add_bots (count, team)
 
function approach_goal_trigger (trigger, radiusMax, spacing)
 
function approach_point (point, radiusMin, radiusMax, spacing)
 
function bot_devgui_think ()
 
function bot_think ()
 
function bot_think_loop ()
 
function bot_unhandled ()
 
function bot_update ()
 
function bot_void ()
 
function camp ()
 
function check_stuck ()
 
function check_stuck_position ()
 
function clear_stuck ()
 
function coop_bot_devgui_cmd (cmd)
 
function coop_post_combat ()
 
function coop_pre_combat ()
 
function debug_patrol (points)
 
function debug_star (origin, seconds, color)
 
function devgui_debug_route ()
 
function end_sprint_to_goal ()
 
function eye_trace ()
 
function filter_bots (players)
 
function finish_corner ()
 
function follow_coop_players ()
 
function follow_entity (entity, radiusMin, radiusMax)
 
function fwd_dot (point)
 
function get_bot_default_settings ()
 
function get_host_player ()
 
function get_nav_points ()
 
function get_ready_gadget ()
 
function get_ready_gun_gadget ()
 
function get_team_players_in_laststand ()
 
function get_trigger_height (trigger)
 
function get_trigger_radius (trigger)
 
function goal_in_trigger (trigger)
 
function has_launcher ()
 
function init ()
 
function init_bot_settings ()
 
function is_bot_ranked_match ()
 
function is_gun_gadget (weapon)
 
function kill_bot ()
 
function kill_bots ()
 
function lead_player (player, followMin)
 
function navmesh_wander (fwd, radiusMin, radiusMax, spacing, fwdDot)
 
function on_player_connect ()
 
function on_player_killed ()
 
function on_player_spawned ()
 
function path_to_point_in_trigger (trigger)
 
function path_to_trigger (trigger, radius)
 
function point_in_goal (point)
 
function remove_bot (bot)
 
function remove_bots (count, team)
 
function revive_player (player)
 
function revive_players ()
 
function sprint_think ()
 
function sprint_to_goal ()
 
function stow_gun_gadget ()
 
function stuck_resolution ()
 
function update_swim ()
 
function wait_bot_goal_reached_loop ()
 
function wait_bot_path_failed_loop ()
 
function wait_corner_radius (startCornerDistSq, centerPoint, enterPoint, leavePoint, angle, nextEnterPoint)
 
function wait_release_swim_buttons (waitTime)
 
function watch_bot_corner (startCornerDist, cornerDist)
 

Macro Definition Documentation

◆ APPROACH_GOAL_RADIUS_MAX

#define APPROACH_GOAL_RADIUS_MAX   1500

Definition at line 1065 of file _bot.gsc.

◆ APPROACH_GOAL_SPACING

#define APPROACH_GOAL_SPACING   128

Definition at line 1066 of file _bot.gsc.

◆ BOT_DIVE_RADIUS

#define BOT_DIVE_RADIUS   128

Definition at line 24 of file _bot.gsc.

◆ BOT_MAX_STUCK_CYCLES

#define BOT_MAX_STUCK_CYCLES   3

Definition at line 18 of file _bot.gsc.

◆ BOT_POSITION_HISTORY_SIZE

#define BOT_POSITION_HISTORY_SIZE   5

Definition at line 20 of file _bot.gsc.

◆ BOT_STUCK_DISTANCE

#define BOT_STUCK_DISTANCE   128

Definition at line 19 of file _bot.gsc.

◆ BOT_STUCK_RESOLUTION_S

#define BOT_STUCK_RESOLUTION_S   1.5

Definition at line 22 of file _bot.gsc.

◆ BOT_SWIM_HEIGHT_MAX

#define BOT_SWIM_HEIGHT_MAX   45

Definition at line 26 of file _bot.gsc.

◆ BOT_SWIM_HEIGHT_MIN

#define BOT_SWIM_HEIGHT_MIN   25

Definition at line 25 of file _bot.gsc.

◆ COOP_FOLLOW_RADIUS_MAX

#define COOP_FOLLOW_RADIUS_MAX   300

Definition at line 927 of file _bot.gsc.

◆ COOP_FOLLOW_RADIUS_MIN

#define COOP_FOLLOW_RADIUS_MIN   150

Definition at line 926 of file _bot.gsc.

◆ DEFAULT_CORNER_DIST

#define DEFAULT_CORNER_DIST   128

Definition at line 1194 of file _bot.gsc.

◆ DEFAULT_START_CORNER_DIST

#define DEFAULT_START_CORNER_DIST   64

Definition at line 1193 of file _bot.gsc.

Function Documentation

◆ __init__()

◆ activate_hero_gadget()

function activate_hero_gadget ( weapon  )

Definition at line 847 of file _bot.gsc.

References is_gun_gadget(), and tap_offhand_special_button().

Referenced by switch_weapon().

◆ add_bot()

function add_bot ( team  )

◆ add_bot_at_eye_trace()

function add_bot_at_eye_trace ( team  )

Definition at line 1331 of file _bot.gsc.

References add_bot(), eye_trace(), getHostPlayer(), and trace().

Referenced by coop_bot_devgui_cmd().

◆ add_bots()

function add_bots ( count  ,
team   
)

Definition at line 97 of file _bot.gsc.

References add_bot().

Referenced by coop_bot_devgui_cmd().

◆ approach_goal_trigger()

function approach_goal_trigger ( trigger  ,
radiusMax  ,
spacing   
)

◆ approach_point()

function approach_point ( point  ,
radiusMin  ,
radiusMax  ,
spacing   
)

◆ bot_devgui_think()

function bot_devgui_think ( )

Definition at line 1463 of file _bot.gsc.

References devgui_debug_route(), getHostPlayer(), kill_bots(), and remove_bots().

Referenced by __init__().

◆ bot_think()

function bot_think ( )

Definition at line 274 of file _bot.gsc.

References check_stuck(), has_threat(), sprint_think(), and update_swim().

Referenced by bot_think_loop().

◆ bot_think_loop()

function bot_think_loop ( )

Definition at line 261 of file _bot.gsc.

References bot_think().

Referenced by on_player_spawned().

◆ bot_unhandled()

function bot_unhandled ( )

Definition at line 89 of file _bot.gsc.

◆ bot_update()

function bot_update ( )

Definition at line 306 of file _bot.gsc.

Referenced by __init__().

◆ bot_void()

function bot_void ( )

Definition at line 85 of file _bot.gsc.

Referenced by __init__().

◆ camp()

function camp ( )

Definition at line 716 of file _bot.gsc.

References press_crouch_button().

◆ check_stuck()

function check_stuck ( )

◆ check_stuck_position()

function check_stuck_position ( )

Definition at line 643 of file _bot.gsc.

References BOT_POSITION_HISTORY_SIZE, BOT_STUCK_DISTANCE, name, and stuck_resolution().

Referenced by check_stuck().

◆ clear_stuck()

function clear_stuck ( )

Definition at line 708 of file _bot.gsc.

Referenced by on_player_spawned(), stuck_resolution(), and wait_bot_goal_reached_loop().

◆ coop_bot_devgui_cmd()

function coop_bot_devgui_cmd ( cmd  )

Definition at line 1495 of file _bot.gsc.

References add_bot(), add_bot_at_eye_trace(), add_bots(), get_host_player(), and remove_bots().

◆ coop_post_combat()

function coop_post_combat ( )

Definition at line 907 of file _bot.gsc.

References bot_post_combat(), clear_threat(), has_threat(), and revive_players().

◆ coop_pre_combat()

function coop_pre_combat ( )

Definition at line 874 of file _bot.gsc.

References bot_pre_combat(), has_threat(), reload_weapon(), and switch_weapon().

◆ debug_patrol()

function debug_patrol ( points  )

Definition at line 1439 of file _bot.gsc.

References BOT_DEFAULT_GOAL_RADIUS, and sprint_to_goal().

Referenced by devgui_debug_route().

◆ debug_star()

function debug_star ( origin  ,
seconds  ,
color   
)

Definition at line 1522 of file _bot.gsc.

◆ devgui_debug_route()

function devgui_debug_route ( )

Definition at line 1369 of file _bot.gsc.

References debug_patrol(), get_nav_points(), and is_bot().

Referenced by bot_devgui_think().

◆ end_sprint_to_goal()

function end_sprint_to_goal ( )

Definition at line 459 of file _bot.gsc.

Referenced by bot_pre_combat(), combat_strafe(), and sprint_think().

◆ eye_trace()

function eye_trace ( )

Definition at line 1354 of file _bot.gsc.

Referenced by add_bot_at_eye_trace(), and get_nav_points().

◆ filter_bots()

function filter_bots ( players  )

Definition at line 177 of file _bot.gsc.

References is_bot().

Referenced by remove_best_bot().

◆ finish_corner()

function finish_corner ( )

Definition at line 1251 of file _bot.gsc.

References waittill_any().

Referenced by wait_corner_radius().

◆ follow_coop_players()

function follow_coop_players ( )

Definition at line 929 of file _bot.gsc.

References COOP_FOLLOW_RADIUS_MIN, get_host_player(), is_bot(), and lead_player().

◆ follow_entity()

function follow_entity ( entity  ,
radiusMin  ,
radiusMax   
)

Definition at line 983 of file _bot.gsc.

References BOT_DEFAULT_GOAL_RADIUS, DEFAULT, point_in_goal(), and sprint_to_goal().

◆ fwd_dot()

function fwd_dot ( point  )

Definition at line 1281 of file _bot.gsc.

Referenced by dot_product(), and update_threat().

◆ get_bot_default_settings()

function get_bot_default_settings ( )

Definition at line 446 of file _bot.gsc.

References get_script_bundle().

Referenced by __init__().

◆ get_host_player()

function get_host_player ( )

Definition at line 1266 of file _bot.gsc.

Referenced by coop_bot_devgui_cmd(), and follow_coop_players().

◆ get_nav_points()

function get_nav_points ( )

Definition at line 1394 of file _bot.gsc.

References eye_trace(), and WAIT_SERVER_FRAME.

Referenced by devgui_debug_route().

◆ get_ready_gadget()

function get_ready_gadget ( )

Definition at line 784 of file _bot.gsc.

Referenced by switch_weapon().

◆ get_ready_gun_gadget()

function get_ready_gun_gadget ( )

Definition at line 805 of file _bot.gsc.

References is_gun_gadget().

◆ get_team_players_in_laststand()

function get_team_players_in_laststand ( )

Definition at line 1156 of file _bot.gsc.

References player_is_in_laststand().

Referenced by revive_players().

◆ get_trigger_height()

function get_trigger_height ( trigger  )

Definition at line 573 of file _bot.gsc.

◆ get_trigger_radius()

function get_trigger_radius ( trigger  )

Definition at line 561 of file _bot.gsc.

Referenced by approach_goal_trigger(), bot_idle(), goal_in_trigger(), and path_to_trigger().

◆ goal_in_trigger()

function goal_in_trigger ( trigger  )

Definition at line 479 of file _bot.gsc.

References get_trigger_radius().

Referenced by bot_update().

◆ has_launcher()

function has_launcher ( )

Definition at line 1295 of file _bot.gsc.

Referenced by bot_ignore_threat(), and update_player_threat().

◆ init()

function init ( )

Definition at line 75 of file _bot.gsc.

References init_bot_settings().

◆ init_bot_settings()

function init_bot_settings ( )

Definition at line 396 of file _bot.gsc.

References VAL.

Referenced by init().

◆ is_bot_ranked_match()

function is_bot_ranked_match ( )

Definition at line 80 of file _bot.gsc.

Referenced by isGameRepEnabled(), precache_mp_leaderboards(), and updateWinStats().

◆ is_gun_gadget()

function is_gun_gadget ( weapon  )

Definition at line 831 of file _bot.gsc.

Referenced by activate_hero_gadget(), and get_ready_gun_gadget().

◆ kill_bot()

function kill_bot ( )

Definition at line 1310 of file _bot.gsc.

Referenced by kill_bots().

◆ kill_bots()

function kill_bots ( )

Definition at line 1320 of file _bot.gsc.

References is_bot(), and kill_bot().

Referenced by bot_devgui_think().

◆ lead_player()

function lead_player ( player  ,
followMin   
)

Definition at line 965 of file _bot.gsc.

References sprint_to_goal().

Referenced by follow_coop_players().

◆ navmesh_wander()

function navmesh_wander ( fwd  ,
radiusMin  ,
radiusMax  ,
spacing  ,
fwdDot   
)

Definition at line 1000 of file _bot.gsc.

References DEFAULT, name, stuck_resolution(), and VAL.

Referenced by bot_idle(), bot_pre_combat(), and chase_threat().

◆ on_player_connect()

function on_player_connect ( )

Definition at line 196 of file _bot.gsc.

References callback().

Referenced by __init__().

◆ on_player_killed()

function on_player_killed ( )

Definition at line 245 of file _bot.gsc.

References is_bot().

Referenced by __init__().

◆ on_player_spawned()

function on_player_spawned ( )

◆ path_to_point_in_trigger()

function path_to_point_in_trigger ( trigger  )

◆ path_to_trigger()

function path_to_trigger ( trigger  ,
radius   
)

Definition at line 494 of file _bot.gsc.

References DEFAULT, and get_trigger_radius().

Referenced by bot_idle(), path_to_point_in_trigger(), and set_goal_tag().

◆ point_in_goal()

function point_in_goal ( point  )

Definition at line 486 of file _bot.gsc.

Referenced by follow_entity(), and revive_player().

◆ remove_bot()

function remove_bot ( bot  )

Definition at line 162 of file _bot.gsc.

Referenced by remove_best_bot(), and remove_bots().

◆ remove_bots()

function remove_bots ( count  ,
team   
)

Definition at line 133 of file _bot.gsc.

References remove_bot().

Referenced by bot_devgui_think(), and coop_bot_devgui_cmd().

◆ revive_player()

function revive_player ( player  )

Definition at line 1173 of file _bot.gsc.

References point_in_goal(), sprint_to_goal(), and tap_use_button().

Referenced by revive_players().

◆ revive_players()

function revive_players ( )

Definition at line 1143 of file _bot.gsc.

References get_team_players_in_laststand(), and revive_player().

Referenced by coop_post_combat().

◆ sprint_think()

function sprint_think ( )

Definition at line 464 of file _bot.gsc.

References end_sprint_to_goal(), IS_TRUE, and press_sprint_button().

Referenced by bot_think().

◆ sprint_to_goal()

function sprint_to_goal ( )

◆ stow_gun_gadget()

function stow_gun_gadget ( )

Definition at line 768 of file _bot.gsc.

◆ stuck_resolution()

function stuck_resolution ( )

◆ update_swim()

function update_swim ( )

◆ wait_bot_goal_reached_loop()

function wait_bot_goal_reached_loop ( )

Definition at line 752 of file _bot.gsc.

References clear_stuck().

Referenced by on_player_spawned().

◆ wait_bot_path_failed_loop()

function wait_bot_path_failed_loop ( )

Definition at line 728 of file _bot.gsc.

References name, and stuck_resolution().

Referenced by on_player_spawned().

◆ wait_corner_radius()

function wait_corner_radius ( startCornerDistSq  ,
centerPoint  ,
enterPoint  ,
leavePoint  ,
angle  ,
nextEnterPoint   
)

Definition at line 1227 of file _bot.gsc.

References finish_corner(), has_threat(), and WAIT_SERVER_FRAME.

Referenced by watch_bot_corner().

◆ wait_release_swim_buttons()

function wait_release_swim_buttons ( waitTime  )

Definition at line 382 of file _bot.gsc.

References release_swim_down(), and release_swim_up().

Referenced by update_swim().

◆ watch_bot_corner()

function watch_bot_corner ( startCornerDist  ,
cornerDist   
)