Open source remastering of the Freespace 2 engine
aibig.cpp File Reference
#include "ai/aibig.h"
#include "ai/aigoals.h"
#include "freespace2/freespace.h"
#include "globalincs/linklist.h"
#include "iff_defs/iff_defs.h"
#include "io/timer.h"
#include "math/staticrand.h"
#include "mission/missionparse.h"
#include "object/object.h"
#include "ship/afterburner.h"
#include "ship/ship.h"
#include "weapon/weapon.h"

Go to the source code of this file.




void ai_big_evade_ship ()
void ai_big_chase_attack (ai_info *aip, ship_info *sip, vec3d *enemy_pos, float dist_to_enemy, int modelnum)
void ai_big_avoid_ship ()
int ai_big_maybe_follow_subsys_path (int do_dot_check=1)
void ai_big_strafe_position ()
int model_which_octant_distant_many (vec3d *pnt, int model_num, matrix *model_orient, vec3d *model_pos, polymodel **pm, int *octs)
void compute_desired_rvec (vec3d *rvec, vec3d *goal_pos, vec3d *cur_pos)
void big_ship_collide_recover_start (object *objp, object *big_objp, vec3d *collide_pos, vec3d *collision_normal)
void ai_bpap (object *objp, vec3d *attacker_objp_pos, vec3d *attacker_objp_fvec, vec3d *attack_point, vec3d *local_attack_point, float fov, float weapon_travel_dist, vec3d *surface_normal, ship_subsys *ss)
void ai_big_pick_attack_point_turret (object *objp, ship_subsys *ssp, vec3d *gpos, vec3d *gvec, vec3d *attack_point, float fov, float weapon_travel_dist)
void ai_big_pick_attack_point (object *objp, object *attacker_objp, vec3d *attack_point, float fov)
void ai_big_subsys_path_cleanup (ai_info *aip)
int ai_big_maybe_start_strafe (ai_info *aip, ship_info *sip)
void ai_big_chase_ct ()
void ai_select_secondary_weapon (object *objp, ship_weapon *swp, int priority1=-1, int priority2=-1)
float set_secondary_fire_delay (ai_info *aip, ship *shipp, weapon_info *swip, bool burst)
void ai_choose_secondary_weapon (object *objp, ai_info *aip, object *en_objp)
int maybe_avoid_big_ship (object *objp, object *ignore_objp, ai_info *aip, vec3d *goal_point, float delta_time)
void maybe_cheat_fire_synaptic (object *objp, ai_info *aip)
void ai_big_maybe_fire_weapons (float dist_to_enemy, float dot_to_enemy, vec3d *firing_pos, vec3d *enemy_pos, vec3d *enemy_vel)
void ai_big_switch_to_chase_mode (ai_info *aip)
int ai_big_strafe_maybe_retreat (float dist, vec3d *target_pos)
void ai_big_chase ()
void ai_big_ship (object *objp)
void ai_big_attack_get_data (vec3d *enemy_pos, float *dist_to_enemy, float *dot_to_enemy)
void ai_big_strafe_attack ()
void ai_big_strafe_glide_attack ()
void ai_big_strafe_avoid ()
void ai_big_strafe_retreat1 ()
void ai_big_strafe_retreat2 ()
void ai_big_strafe ()
int ai_big_maybe_enter_strafe_mode (object *pl_objp, int weapon_objnum, int consider_target_only)
void ai_big_strafe_maybe_attack_turret (object *ship_objp, object *weapon_objp)

Macro Definition Documentation


Definition at line 52 of file aibig.cpp.


Definition at line 53 of file aibig.cpp.


Definition at line 51 of file aibig.cpp.


Definition at line 54 of file aibig.cpp.


Definition at line 55 of file aibig.cpp.


Definition at line 49 of file aibig.cpp.


Definition at line 35 of file aibig.cpp.


Definition at line 46 of file aibig.cpp.


Definition at line 47 of file aibig.cpp.


Definition at line 57 of file aibig.cpp.


Definition at line 59 of file aibig.cpp.


Definition at line 58 of file aibig.cpp.


Definition at line 38 of file aibig.cpp.


Definition at line 37 of file aibig.cpp.


Definition at line 31 of file aibig.cpp.


Definition at line 44 of file aibig.cpp.


Definition at line 43 of file aibig.cpp.


Definition at line 42 of file aibig.cpp.


Definition at line 41 of file aibig.cpp.

Function Documentation

void ai_big_attack_get_data ( vec3d enemy_pos,
float dist_to_enemy,
float dot_to_enemy 

Definition at line 1167 of file aibig.cpp.

void ai_big_avoid_ship ( )

Definition at line 345 of file aibig.cpp.

void ai_big_chase ( )

Definition at line 851 of file aibig.cpp.

void ai_big_chase_attack ( ai_info aip,
ship_info sip,
vec3d enemy_pos,
float  dist_to_enemy,
int  modelnum 

Definition at line 544 of file aibig.cpp.

void ai_big_chase_ct ( )

Definition at line 700 of file aibig.cpp.

void ai_big_evade_ship ( )

Definition at line 297 of file aibig.cpp.

int ai_big_maybe_enter_strafe_mode ( object pl_objp,
int  weapon_objnum,
int  consider_target_only 

Definition at line 1704 of file aibig.cpp.

void ai_big_maybe_fire_weapons ( float  dist_to_enemy,
float  dot_to_enemy,
vec3d firing_pos,
vec3d enemy_pos,
vec3d enemy_vel 

Definition at line 717 of file aibig.cpp.

int ai_big_maybe_follow_subsys_path ( int  do_dot_check = 1)

Definition at line 366 of file aibig.cpp.

int ai_big_maybe_start_strafe ( ai_info aip,
ship_info sip 

Definition at line 509 of file aibig.cpp.

void ai_big_pick_attack_point ( object objp,
object attacker_objp,
vec3d attack_point,
float  fov 

Definition at line 228 of file aibig.cpp.

void ai_big_pick_attack_point_turret ( object objp,
ship_subsys ssp,
vec3d gpos,
vec3d gvec,
vec3d attack_point,
float  fov,
float  weapon_travel_dist 

Definition at line 208 of file aibig.cpp.

void ai_big_ship ( object objp)

Definition at line 1156 of file aibig.cpp.

void ai_big_strafe ( )

Definition at line 1638 of file aibig.cpp.

void ai_big_strafe_attack ( )

Definition at line 1287 of file aibig.cpp.

void ai_big_strafe_avoid ( )

Definition at line 1505 of file aibig.cpp.

void ai_big_strafe_glide_attack ( )

Definition at line 1390 of file aibig.cpp.

void ai_big_strafe_maybe_attack_turret ( object ship_objp,
object weapon_objp 

Definition at line 1778 of file aibig.cpp.

int ai_big_strafe_maybe_retreat ( float  dist,
vec3d target_pos 

Definition at line 1231 of file aibig.cpp.

void ai_big_strafe_position ( )

Definition at line 1614 of file aibig.cpp.

void ai_big_strafe_retreat1 ( )

Definition at line 1529 of file aibig.cpp.

void ai_big_strafe_retreat2 ( )

Definition at line 1575 of file aibig.cpp.

void ai_big_subsys_path_cleanup ( ai_info aip)

Definition at line 351 of file aibig.cpp.

void ai_big_switch_to_chase_mode ( ai_info aip)

Definition at line 840 of file aibig.cpp.

void ai_bpap ( object objp,
vec3d attacker_objp_pos,
vec3d attacker_objp_fvec,
vec3d attack_point,
vec3d local_attack_point,
float  fov,
float  weapon_travel_dist,
vec3d surface_normal,
ship_subsys ss 

Definition at line 78 of file aibig.cpp.

void ai_choose_secondary_weapon ( object objp,
ai_info aip,
object en_objp 

Definition at line 7700 of file aicode.cpp.

void ai_select_secondary_weapon ( object objp,
ship_weapon swp,
int  priority1 = -1,
int  priority2 = -1 
void big_ship_collide_recover_start ( object objp,
object big_objp,
vec3d collide_pos,
vec3d collision_normal 

Definition at line 14843 of file aicode.cpp.

void compute_desired_rvec ( vec3d rvec,
vec3d goal_pos,
vec3d cur_pos 

Set desired right vector for ships flying towards another ship. Since this is governed only by vector to target, it causes ships to align bank and look less chaotic.

Definition at line 6995 of file aicode.cpp.

int maybe_avoid_big_ship ( object objp,
object ignore_objp,
ai_info aip,
vec3d goal_point,
float  delta_time 

Return true if a large ship is being ignored.

Definition at line 6955 of file aicode.cpp.

void maybe_cheat_fire_synaptic ( object objp,
ai_info aip 

Definition at line 15575 of file aicode.cpp.

int model_which_octant_distant_many ( vec3d pnt,
int  model_num,
matrix model_orient,
vec3d model_pos,
polymodel **  pm,
int octs 

Definition at line 390 of file modeloctant.cpp.

float set_secondary_fire_delay ( ai_info aip,
ship shipp,
weapon_info swip,
bool  burst 

Return time, in seconds, at which this ship can next fire its current secondary weapon.

Definition at line 7785 of file aicode.cpp.