Open source remastering of the Freespace 2 engine
swarm.cpp File Reference
#include "globalincs/linklist.h"
#include "io/timer.h"
#include "object/object.h"
#include "ship/ship.h"
#include "weapon/swarm.h"
#include "weapon/weapon.h"

Go to the source code of this file.


#define SWARM_DIST_OFFSET   2.0f
#define SWARM_CONE_LENGTH   10000.0f
#define SWARM_ANGLE_CHANGE   (4*PI/180)
#define SWARM_USED   (1<<0)
#define SWARM_POSITIVE_PATH   (1<<1)


void swarm_level_init ()
void swarm_maybe_fire_missile (int shipnum)
int swarm_create ()
void swarm_delete (int i)
void swarm_update_direction (object *objp, float frametime)
int turret_swarm_create ()
void turret_swarm_delete (int i)
void turret_swarm_set_up_info (int parent_objnum, ship_subsys *turret, weapon_info *wip, int weapon_num)
void turret_swarm_fire_from_turret (turret_swarm_info *tsi)
void turret_swarm_maybe_fire_missile (int shipnum)
void turret_swarm_check_validity ()


swarm_info Swarm_missiles [MAX_SWARM_MISSILES]
turret_swarm_info Turret_swarm_info [MAX_TURRET_SWARM_INFO]
int Turret_swarm_validity_next_check_time

Macro Definition Documentation

#define SWARM_ANGLE_CHANGE   (4*PI/180)

Definition at line 24 of file swarm.cpp.


Definition at line 23 of file swarm.cpp.

#define SWARM_CONE_LENGTH   10000.0f

Definition at line 22 of file swarm.cpp.

#define SWARM_DIST_OFFSET   2.0f

Definition at line 21 of file swarm.cpp.


Definition at line 33 of file swarm.cpp.

#define SWARM_POSITIVE_PATH   (1<<1)

Definition at line 38 of file swarm.cpp.


Definition at line 31 of file swarm.cpp.

#define SWARM_USED   (1<<0)

Definition at line 37 of file swarm.cpp.


Definition at line 35 of file swarm.cpp.

Function Documentation

int swarm_create ( )

Definition at line 136 of file swarm.cpp.

void swarm_delete ( int  i)

Definition at line 165 of file swarm.cpp.

void swarm_level_init ( )

Definition at line 52 of file swarm.cpp.

void swarm_maybe_fire_missile ( int  shipnum)

Definition at line 90 of file swarm.cpp.

void swarm_update_direction ( object objp,
float  frametime 

Definition at line 184 of file swarm.cpp.

void turret_swarm_check_validity ( )

Definition at line 632 of file swarm.cpp.

int turret_swarm_create ( )

Definition at line 374 of file swarm.cpp.

void turret_swarm_delete ( int  i)

Definition at line 408 of file swarm.cpp.

void turret_swarm_fire_from_turret ( turret_swarm_info tsi)

Definition at line 2137 of file aiturret.cpp.

void turret_swarm_maybe_fire_missile ( int  shipnum)

Definition at line 522 of file swarm.cpp.

void turret_swarm_set_up_info ( int  parent_objnum,
ship_subsys turret,
weapon_info wip,
int  weapon_num 

Definition at line 423 of file swarm.cpp.

Variable Documentation

swarm_info Swarm_missiles[MAX_SWARM_MISSILES]

Definition at line 41 of file swarm.cpp.

Definition at line 43 of file swarm.cpp.

int Turret_swarm_validity_next_check_time

Definition at line 45 of file swarm.cpp.