|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include "havocbot.qh"#include <common/constants.qh>#include <common/impulses/all.qh>#include <common/items/_mod.qh>#include <common/mapobjects/func/ladder.qh>#include <common/mapobjects/teleporters.qh>#include <common/mapobjects/trigger/hurt.qh>#include <common/mapobjects/trigger/jumppads.qh>#include <common/mutators/mutator/powerups/_mod.qh>#include <common/mutators/mutator/status_effects/_mod.qh>#include <common/net_linked.qh>#include <common/physics/player.qh>#include <common/state.qh>#include <common/stats.qh>#include <common/weapons/_all.qh>#include <common/wepent.qh>#include <lib/warpzone/common.qh>#include <server/bot/api.qh>#include <server/bot/default/aim.qh>#include <server/bot/default/bot.qh>#include <server/bot/default/cvars.qh>#include <server/bot/default/havocbot/roles.qh>#include <server/bot/default/navigation.qh>#include <server/bot/default/scripting.qh>#include <server/bot/default/waypoints.qh>#include <server/client.qh>#include <server/damage.qh>#include <server/items/items.qh>#include <server/mutators/_mod.qh>#include <server/weapons/selection.qh>#include <server/weapons/weaponsystem.qh>#include <server/world.qh>Go to the source code of this file.
Macros | |
| #define | ROCKETJUMP_DAMAGE() |
Functions | |
| void | havocbot_ai (entity this) |
| void | havocbot_aim (entity this) |
| void | havocbot_bunnyhop (entity this, vector dir) |
| int | havocbot_checkdanger (entity this, vector dst_ahead) |
| bool | havocbot_checkgoaldistance (entity this, vector gco) |
| void | havocbot_chooseenemy (entity this) |
| void | havocbot_chooseweapon (entity this,.entity weaponentity) |
| bool | havocbot_chooseweapon_checkreload (entity this,.entity weaponentity, int new_weapon) |
| vector | havocbot_dodge (entity this) |
| void | havocbot_keyboard_movement (entity this, vector destorg) |
| float | havocbot_moveto (entity this, vector pos) |
| bool | havocbot_moveto_refresh_route (entity this) |
| void | havocbot_movetogoal (entity this) |
| float | havocbot_resetgoal (entity this) |
| entity | havocbot_select_an_item_of_group (entity this, int gr) |
| void | havocbot_setupbot (entity this) |
| #define ROCKETJUMP_DAMAGE | ( | ) |
Referenced by havocbot_movetogoal().
Definition at line 35 of file havocbot.qc.
References AI_STATUS_ATTACKING, AI_STATUS_OUT_WATER, AI_STATUS_ROAMING, aistatus, autocvar_bot_ai_chooseweaponinterval, autocvar_bot_nofire, bot_aimdir(), bot_aimdir_executed, bot_chooseweapontime, bot_execute_commands(), bot_ispaused(), bot_strategytoken, bot_strategytoken_taken, clip_load, clip_size, CS(), dir, draggedby, enemy, entity(), FOREACH, g_waypoints, get_closer_dest(), goalcurrent, goalcurrent_prev, havocbot_aim(), havocbot_blockhead, havocbot_chooseenemy(), havocbot_chooseweapon(), havocbot_movetogoal(), IL_EACH, IS_DEAD, IS_INDEPENDENT_PLAYER, IS_ONGROUND, IS_PLAYER, jumppadcount, lastfiredweapon, lastteleporttime, m_switchweapon, m_weapon, MAX_WEAPONSLOTS, navigation_clearroute(), navigation_goalrating_timeout_force(), navigation_pushroute(), NULL, origin, PHYS_INPUT_BUTTON_ATCK, PHYS_INPUT_BUTTON_ATCK2, skill, STAT, StatusEffects_active(), time, vdist, vector, view_ofs, waterlevel, WATERLEVEL_SWIMMING, WAYPOINTFLAG_JUMP, weaponentities, Weapons, WEP_FLAG_RELOADABLE, and Weapon::wr_aim().
Referenced by havocbot_setupbot().
Definition at line 1609 of file havocbot.qc.
References enemy, entity(), MUTATOR_CALLHOOK, nextaim, time, vector, velocity, and waterlevel.
Referenced by havocbot_ai().
Definition at line 215 of file havocbot.qc.
References AI_STATUS_ATTACKING, AI_STATUS_DANGER_AHEAD, AI_STATUS_RUNNING, aistatus, ang, autocvar_bot_ai_bunnyhop_dir_deviation_max, autocvar_bot_ai_bunnyhop_downward_pitch_max, autocvar_bot_ai_bunnyhop_turn_angle_max, autocvar_bot_ai_bunnyhop_turn_angle_min, autocvar_bot_ai_bunnyhop_turn_angle_reduction, autocvar_sv_maxspeed, bot_jump_time, dir, entity(), fabs(), get_closer_dest(), goalcurrent, goalcurrent_prev, goalstack01, IS_DUCKED, IS_ONGROUND, IS_PLAYER, max(), origin, PHYS_INPUT_BUTTON_JUMP, time, vdist, vec2, vectoangles(), vector, velocity, vlen(), waterlevel, WATERLEVEL_WETFEET, WAYPOINTFLAG_JUMP, and WAYPOINTFLAG_TELEPORT.
Referenced by havocbot_movetogoal().
Definition at line 401 of file havocbot.qc.
References AI_STATUS_ROAMING, AI_STATUS_RUNNING, aistatus, CONTENT_LAVA, CONTENT_SLIME, CONTENT_SOLID, entity(), goalcurrent, goalcurrent_prev, IS_ONGROUND, jumppadcount, maxs, min(), mins, NULL, origin, PHYS_INPUT_BUTTON_JUMP, Q3SURFACEFLAG_SKY, trace_dphitq3surfaceflags, trace_endpos, trace_fraction, tracebox_hits_trigger_hurt(), vector, view_ofs, waypoint_is_hardwiredlink(), and WAYPOINTFLAG_JUMP.
Referenced by havocbot_movetogoal().
Definition at line 344 of file havocbot.qc.
References bot_stop_moving_timeout, entity(), fabs(), goalcurrent_distance_2d, goalcurrent_distance_time, goalcurrent_distance_z, max(), origin, time, vec2, vector, and vlen().
Referenced by havocbot_movetogoal().
Definition at line 1334 of file havocbot.qc.
References autocvar_bot_ai_enemydetectioninterval, autocvar_bot_ai_enemydetectionradius, autocvar_bot_nofire, best, bot_shouldattack(), bound(), DPCONTENTS_BODY, DPCONTENTS_CORPSE, DPCONTENTS_OPAQUE, DPCONTENTS_SOLID, dphitcontentsmask, enemy, entity(), g_bot_targets, GetResource(), havocbot_chooseenemy_finished, havocbot_stickenemy_time, health, IL_EACH, IS_INDEPENDENT_PLAYER, LABEL, NULL, origin, RES_ARMOR, STAT, SUPERBOT, time, trace_ent, trace_fraction, vdist, vector, view_ofs, and vlen2.
Referenced by havocbot_ai().
Definition at line 1495 of file havocbot.qc.
References ATTACK_FINISHED, autocvar_bot_ai_weapon_combo, autocvar_bot_ai_weapon_combo_threshold, bot_custom_weapon, bot_distance_close, bot_distance_far, bot_rangepreference, bot_weapons_close, bot_weapons_far, bot_weapons_mid, bot_weaponskill, bound(), client_hasweapon(), enemy, entity(), FOREACH, g_weaponarena_weapons, havocbot_chooseweapon_checkreload(), lastcombotime, m_switchweapon, m_weapon, NULL, origin, REGISTRY_COUNT, REGISTRY_GET, skill, time, vlen(), Weapons, and WEPSET.
Referenced by havocbot_ai().
Definition at line 1473 of file havocbot.qc.
References entity(), FOREACH, IT_UNLIMITED_AMMO, items, skill, weapon_load, and Weapons.
Referenced by havocbot_chooseweapon().
Definition at line 1774 of file havocbot.qc.
References autocvar_sv_maxspeed, bot_dodge, entity(), findchainfloat(), normalize(), origin, SUPERBOT, vector, and vlen().
Referenced by havocbot_movetogoal().
Definition at line 272 of file havocbot.qc.
References autocvar_bot_ai_keyboard_distance, autocvar_bot_ai_keyboard_threshold, autocvar_sv_maxspeed, bot_moveskill, bound(), CS(), entity(), havocbot_ducktime, havocbot_keyboard, havocbot_keyboardskill, havocbot_keyboardtime, max(), min(), origin, PHYS_INPUT_BUTTON_CROUCH, random(), skill, time, vector, and vlen().
Referenced by havocbot_movetogoal().
Definition at line 1641 of file havocbot.qc.
References AI_STATUS_WAYPOINT_PERSONAL_GOING, AI_STATUS_WAYPOINT_PERSONAL_LINKING, AI_STATUS_WAYPOINT_PERSONAL_REACHED, aistatus, autocvar_bot_debug_goalstack, bot_aimdir(), bot_aimdir_executed, bot_strategytoken_taken, CMD_STATUS_ERROR, CMD_STATUS_EXECUTING, CMD_STATUS_FINISHED, debuggoalstack(), dir, entity(), ftos(), g_teleporters, get_closer_dest(), goalcurrent, havocbot_moveto_refresh_route(), havocbot_movetogoal(), havocbot_personal_waypoint, havocbot_personal_waypoint_failcounter, havocbot_personal_waypoint_searchtime, IL_EACH, lastteleporttime, LOG_TRACE, netname, NULL, origin, time, vector, view_ofs, vtos(), WarpZoneLib_BoxTouchesBrush(), waypoint_remove(), waypoint_spawnpersonal(), and WAYPOINTFLAG_TELEPORT.
Referenced by havocbot_setupbot().
Definition at line 1630 of file havocbot.qc.
References entity(), goalentity, havocbot_personal_waypoint, navigation_goalrating_end(), navigation_goalrating_start(), navigation_routerating(), and NULL.
Referenced by havocbot_moveto().
Definition at line 446 of file havocbot.qc.
References AI_STATUS_ATTACKING, AI_STATUS_DANGER_AHEAD, AI_STATUS_JETPACK_FLYING, AI_STATUS_JETPACK_LANDING, AI_STATUS_OUT_JUMPPAD, AI_STATUS_OUT_WATER, aistatus, autocvar_bot_ai_bunnyhop_skilloffset, autocvar_bot_ai_ignoregoal_timeout, autocvar_bot_debug_goalstack, autocvar_g_jetpack_acceleration_side, autocvar_sv_jumpvelocity, autocvar_sv_maxspeed, boolean, bot_aimdir(), bot_aimdir_executed, bot_dodgeskill, bot_jump_time, bot_moveskill, bot_navigation_movemode, bot_stop_moving_timeout, bot_tracewalk_time, bound(), boxesoverlap(), checkpvs(), client_hasweapon(), CONTENT_WATER, cos(), crandom, CS(), debuggoalstack(), DEG2RAD, dir, enemy, entity(), eZ, fabs(), FLOAT_MAX, frametime, g_items, g_waypoints, get_closer_dest(), GetResource(), goalcurrent, goalcurrent_distance_2d, goalcurrent_distance_time, goalcurrent_distance_z, goalcurrent_prev, goalentity, goalentity_lock_timeout, goalentity_shouldbefrozen, goalstack01, havocbot_blockhead, havocbot_bunnyhop(), havocbot_checkdanger(), havocbot_checkgoaldistance(), havocbot_dodge(), havocbot_ducktime, havocbot_keyboard_movement(), havocbot_select_an_item_of_group(), ignoregoal, ignoregoaltime, IL_EACH, IS_DEAD, IS_DUCKED, IS_MONSTER, IS_ONGROUND, IS_PLAYER, IT_JETPACK, IT_UNLIMITED_AMMO, item_group, ITEM_IS_LOOT, items, jumpheight_vec, jumppadcount, jumpstepheightvec, LABEL, ladder_entity, LOG_TRACE, M_SQRT2, m_switchweapon, m_weapon, makevectors, max(), MAX_WEAPONSLOTS, maxs, mins, MOVE_NOMONSTERS, navigation_clearroute(), navigation_goalrating_timeout_can_be_anticipated(), navigation_goalrating_timeout_expire(), navigation_goalrating_timeout_force(), navigation_jetpack_goal, navigation_jetpack_point, navigation_poptouchedgoals(), navigation_pushroute(), navigation_routetogoal(), navigation_shortenpath(), netname, normalize(), NULL, origin, PHYS_INPUT_BUTTON_ATCK, PHYS_INPUT_BUTTON_ATCK2, PHYS_INPUT_BUTTON_CROUCH, PHYS_INPUT_BUTTON_JETPACK, PHYS_INPUT_BUTTON_JUMP, PL_MAX_CONST, PL_MIN_CONST, point_line_vec(), random(), randomdirection, randomdirectiontime, RES_ARMOR, ROCKETJUMP_DAMAGE, rocketjumptime, set_tracewalk_dest(), skill, STAT, stepheightvec, SUPERBOT, time, trace_endpos, trace_ent, trace_fraction, trace_plane_normal, trace_startsolid, tracebox_hits_trigger_hurt(), tracewalk(), tracewalk_dest, tracewalk_dest_height, v_angle, v_forward, v_right, v_up, vdist, vec2, vectoangles(), vector, velocity, view_ofs, vlen(), vlen2, vtos(), waterlevel, WATERLEVEL_SWIMMING, WATERLEVEL_WETFEET, waypoint_is_hardwiredlink(), WAYPOINTFLAG_CROUCH, WAYPOINTFLAG_JUMP, WAYPOINTFLAG_LADDER, WAYPOINTFLAG_TELEPORT, weaponentities, and WEP_CVAR.
Referenced by havocbot_ai(), and havocbot_moveto().
Definition at line 1758 of file havocbot.qc.
References CMD_STATUS_FINISHED, entity(), and navigation_clearroute().
Referenced by havocbot_setupbot().
Definition at line 370 of file havocbot.qc.
References entity(), g_items, IL_EACH, and NULL.
Referenced by havocbot_movetogoal().
Definition at line 1764 of file havocbot.qc.
References entity(), havocbot_ai(), havocbot_chooserole(), havocbot_moveto(), and havocbot_resetgoal().
Referenced by bot_clientconnect(), and float().