FS2_Open
Open source remastering of the Freespace 2 engine
afterburner.h File Reference

Go to the source code of this file.

Macros

#define AFTERBURNER_MIN_DELAY   1000
 
#define ABURN_DECAY_TIME   1500
 

Functions

void afterburners_start (object *objp)
 
void afterburners_stop (object *objp, int key_released=0)
 
void afterburner_stop_sounds ()
 
void afterburners_update (object *objp, float fl_frametime)
 
void afterburner_level_init ()
 

Macro Definition Documentation

#define ABURN_DECAY_TIME   1500

Definition at line 16 of file afterburner.h.

#define AFTERBURNER_MIN_DELAY   1000

Definition at line 15 of file afterburner.h.

Function Documentation

void afterburner_level_init ( )

Call at the start of a mission

Definition at line 53 of file afterburner.cpp.

void afterburner_stop_sounds ( )

Terminates any looping afterburner sounds. This should only be called when the game decides to stop all looping sounds.

Definition at line 332 of file afterburner.cpp.

void afterburners_start ( object objp)

Called when a ship engages the afterburners. This function should only be called once when afterburners first start. This is to start an appropriate sound effect and do any one-time initializations.

Parameters
*objppointer to the object starting afterburners

Definition at line 68 of file afterburner.cpp.

void afterburners_stop ( object objp,
int  key_released 
)

Called when a ship disengages the afterburners.

Parameters
*objppointer to the object starting afterburners
key_releasedOPTIONAL parameter (default value 0) This is only used for the player object, to manage starting/stopping

Definition at line 279 of file afterburner.cpp.

void afterburners_update ( object objp,
float  fl_frametime 
)

Update the state of the afterburner fuel remaining for an object using the afterburner.

For the player ship, key_up_time() is called for the afterburner key to detect when afterburners disengage.

Parameters
*objppointer to the object starting afterburners
fl_frametimetime in seconds of the last frame

Definition at line 168 of file afterburner.cpp.