Open source remastering of the Freespace 2 engine
collideshipweapon.cpp File Reference
#include "hud/hudshield.h"
#include "hud/hudwingmanstatus.h"
#include "io/timer.h"
#include "network/multi.h"
#include "network/multimsgs.h"
#include "network/multiutil.h"
#include "object/objcollide.h"
#include "object/object.h"
#include "parse/scripting.h"
#include "playerman/player.h"
#include "ship/ship.h"
#include "ship/shipfx.h"
#include "ship/shiphit.h"
#include "weapon/weapon.h"

Go to the source code of this file.


#define ERROR_STD   2


float ai_endangered_time (object *ship_objp, object *weapon_objp)
int check_inside_radius_for_big_ships (object *ship, object *weapon_obj, obj_pair *pair)
float estimate_ship_speed_upper_limit (object *ship, float time)
void update_danger_weapon (object *pship_obj, object *weapon_obj)
void ship_weapon_do_hit_stuff (object *pship_obj, object *weapon_obj, vec3d *world_hitpos, vec3d *hitpos, int quadrant_num, int submodel_num, vec3d hit_dir)
int ship_weapon_check_collision (object *ship_objp, object *weapon_objp, float time_limit=0.0f, int *next_hit=NULL)
int collide_ship_weapon (obj_pair *pair)


float flFrametime
int Framecount

Macro Definition Documentation

#define ERROR_STD   2

Definition at line 539 of file collideshipweapon.cpp.

Function Documentation

float ai_endangered_time ( object ship_objp,
object weapon_objp 

Definition at line 6565 of file aicode.cpp.

int check_inside_radius_for_big_ships ( object ship,
object weapon_obj,
obj_pair pair 

When inside radius of big ship, check if we can cull collision pair determine the time when pair should next be checked

1 if pair can be culled
0 if pair can not be culled

Definition at line 546 of file collideshipweapon.cpp.

int collide_ship_weapon ( obj_pair pair)

Checks ship-weapon collisions.

pairobj_pair pointer to the two objects. pair->a is ship and pair->b is weapon.
1 if all future collisions between these can be ignored

Definition at line 469 of file collideshipweapon.cpp.

float estimate_ship_speed_upper_limit ( object ship,
float  time 

Upper limit estimate ship speed at end of time

Definition at line 518 of file collideshipweapon.cpp.

int ship_weapon_check_collision ( object ship_objp,
object weapon_objp,
float  time_limit = 0.0f,
int next_hit = NULL 

Definition at line 123 of file collideshipweapon.cpp.

void ship_weapon_do_hit_stuff ( object pship_obj,
object weapon_obj,
vec3d world_hitpos,
vec3d hitpos,
int  quadrant_num,
int  submodel_num,
vec3d  hit_dir 

Deal with weapon-ship hit stuff. Separated from check_collision routine below because of multiplayer reasons.

Definition at line 66 of file collideshipweapon.cpp.

void update_danger_weapon ( object pship_obj,
object weapon_obj 

If weapon_obj is likely to hit ship_obj sooner than current aip->danger_weapon_objnum, then update danger_weapon_objnum.

Definition at line 38 of file collideshipweapon.cpp.

Variable Documentation

float flFrametime

Definition at line 22 of file fredstubs.cpp.

int Framecount

Definition at line 22 of file systemvars.cpp.