/* * Globals and Fields */ float AI_STATUS_ROAMING = 1; // Bot is just crawling the map. No enemies at sight float AI_STATUS_ATTACKING = 2; // There are enemies at sight float AI_STATUS_RUNNING = 4; // Bot is bunny hopping float AI_STATUS_DANGER_AHEAD = 8; // There is lava/slime/trigger_hurt ahead float AI_STATUS_OUT_JUMPPAD = 16; // Trying to get out of a "vertical" jump pad float AI_STATUS_OUT_WATER = 32; // Trying to get out of water float AI_STATUS_WAYPOINT_PERSONAL_LINKING = 64; // Waiting for the personal waypoint to be linked float AI_STATUS_WAYPOINT_PERSONAL_GOING = 128; // Going to a personal waypoint float AI_STATUS_WAYPOINT_PERSONAL_REACHED = 256; // Personal waypoint reached float AI_STATUS_JETPACK_FLYING = 512; float AI_STATUS_JETPACK_LANDING = 1024; .float isbot; // true if this client is actually a bot .float aistatus; // Skill system float skill; float autoskill_nextthink; .float bot_thinkskill; .float bot_mouseskill; .float bot_predictionskill; .float bot_offsetskill; .float totalfrags_lastcheck; // Custom weapon priorities float bot_custom_weapon; float bot_distance_far; float bot_distance_close; float bot_weapons_far[WEP_LAST]; float bot_weapons_mid[WEP_LAST]; float bot_weapons_close[WEP_LAST]; entity bot_list; entity player_list; .entity nextbot; .entity nextplayer; .string netname_freeme; .string playermodel_freeme; .string playerskin_freeme; .float bot_nextthink; .float createdtime; .float bot_preferredcolors; .float bot_attack; .float bot_dodge; .float bot_dodgerating; .float bot_pickup; .float bot_pickupbasevalue; .float bot_canfire; .float bot_strategytime; .float bot_forced_team; .float bot_config_loaded; float bot_strategytoken_taken; entity bot_strategytoken; float botframe_spawnedwaypoints; float botframe_nextthink; float botframe_nextdangertime; float bot_cvar_nextthink; float bot_ignore_bots; // let bots not attack other bots (only works in non-teamplay) /* * Functions */ entity bot_spawn(); void bot_think(); void bot_setnameandstuff(); void bot_custom_weapon_priority_setup(); void bot_endgame(); void bot_relinkplayerlist(); void bot_clientdisconnect(); void bot_clientconnect(); void bot_removefromlargestteam(); void bot_removenewest(); void autoskill(float factor); void bot_serverframe(); .void() bot_ai; .float(entity player, entity item) bot_pickupevalfunc; /* * Imports */ float sv_maxspeed; void() havocbot_setupbot; float c1, c2, c3, c4; void CheckAllowedTeams(entity for_whom); void GetTeamCounts(entity other); float JoinBestTeam(entity pl, float only_return_best, float forcebestteam);