Open source remastering of the Freespace 2 engine
flak.cpp File Reference
#include "object/object.h"
#include "weapon/flak.h"
#include "weapon/muzzleflash.h"

Go to the source code of this file.


void flak_level_init ()
void flak_level_close ()
void flak_pick_range (object *objp, vec3d *firing_pos, vec3d *predicted_target_pos, float weapon_subsys_strength)
void flak_jitter_aim (vec3d *dir, float dist_to_target, float weapon_subsys_strength, weapon_info *wip)
void flak_muzzle_flash (vec3d *pos, vec3d *dir, physics_info *pip, int turret_weapon_class)
void flak_set_range (object *objp, float range)
float flak_get_range (object *objp)

Function Documentation

float flak_get_range ( object objp)

Get the current range for the flak object

Definition at line 154 of file flak.cpp.

void flak_jitter_aim ( vec3d dir,
float  dist_to_target,
float  weapon_subsys_strength,
weapon_info wip 

Add some jitter to a flak gun's aiming direction, take into account range to target so that we're never too far off assumes dir is normalized

Definition at line 86 of file flak.cpp.

void flak_level_close ( )

Close down flak stuff

Definition at line 30 of file flak.cpp.

void flak_level_init ( )

Initialize flak stuff for the level

Definition at line 23 of file flak.cpp.

void flak_muzzle_flash ( vec3d pos,
vec3d dir,
physics_info pip,
int  turret_weapon_class 

Create a muzzle flash from a flak gun based upon firing position and weapon type

Definition at line 120 of file flak.cpp.

void flak_pick_range ( object objp,
vec3d firing_pos,
vec3d predicted_target_pos,
float  weapon_subsys_strength 

Given a just fired flak shell, pick a detonating distance for it

Definition at line 37 of file flak.cpp.

void flak_set_range ( object objp,
float  range 

Given a just fired flak shell, pick a detonating distance for it

Definition at line 142 of file flak.cpp.