18 #define PF_ACCELERATES (1 << 1)
19 #define PF_USE_VEL (1 << 2) // Use velocity present in physics_info struct, don't call physics_sim_vel.
20 #define PF_AFTERBURNER_ON (1 << 3) // Afterburner currently engaged.
21 #define PF_SLIDE_ENABLED (1 << 4) // Allow descent style sliding
22 #define PF_REDUCED_DAMP (1 << 5) // Allows reduced damping on z (for death, shockwave) (CAN be reset in physics)
23 #define PF_IN_SHOCKWAVE (1 << 6) // Indicates whether object has recently been hit by shockwave (used to enable shake)
24 #define PF_DEAD_DAMP (1 << 7) // Makes forward damping same as sideways (NOT reset in physics)
25 #define PF_AFTERBURNER_WAIT (1 << 8) // true when afterburner cannot be used. replaces variable used in afterburner code
26 #define PF_CONST_VEL (1 << 9) // Use velocity in phys_info struct. Optimize weapons in phys_sim
27 #define PF_WARP_IN (1 << 10) // Use when ship is warping in
28 #define PF_SPECIAL_WARP_IN (1 << 11) // Use when ship is warping in and we want to slow the ship faster than normal game physics
29 #define PF_WARP_OUT (1 << 12) // Use when ship is warping out
30 #define PF_SPECIAL_WARP_OUT (1 << 13) // Use when ship is warping out and we want to slow the ship faster than normal game physics
31 #define PF_BOOSTER_ON (1 << 14)
32 #define PF_GLIDING (1 << 15)
33 #define PF_FORCE_GLIDE (1 << 16)
153 #define PHYSICS_VIEWER_FRONT 0
154 #define PHYSICS_VIEWER_LEFT 1
155 #define PHYSICS_VIEWER_RIGHT 2
156 #define PHYSICS_VIEWER_REAR 3
157 #define PHYSICS_VIEWER_UP 4
161 void apply_physics(
float damping,
float desired_vel,
float initial_vel,
float t,
float * new_vel,
float * delta_pos );
192 void get(
float Time,
float *Position,
float *Velocity);
193 void get(
float *Position,
float *Velocity);
195 void set(
float position);
196 void setAVD(
float final_position,
float total_movement_time,
float starting_accleration_time,
float ending_acceleration_time,
float final_velocity);
197 void setVD(
float total_movement_time,
float ending_acceleration_time,
float final_velocity);
int fire_countermeasure_count
void physics_sim(vec3d *position, matrix *orient, physics_info *pi, float sim_time)
void setVD(float total_movement_time, float ending_acceleration_time, float final_velocity)
void physics_init(physics_info *pi)
float afterburner_forward_accel_time_const
void physics_apply_shock(vec3d *direction_vec, float pressure, physics_info *pi, matrix *orient, vec3d *min, vec3d *max, float radius)
float side_slip_time_const
void physics_sim_vel(vec3d *position, physics_info *pi, float sim_time, matrix *orient)
void physics_read_flying_controls(matrix *orient, physics_info *pi, control_info *ci, float sim_time, vec3d *wash_rot=NULL)
float afterburner_reverse_accel
float booster_forward_accel_time_const
float forward_decel_time_const
struct control_info control_info
void physics_apply_whack(vec3d *force, vec3d *pos, physics_info *pi, matrix *orient, float mass)
struct physics_info physics_info
float Physics_viewer_bank
float slide_decel_time_const
void apply_physics(float damping, float desired_vel, float initial_vel, float t, float *new_vel, float *delta_pos)
int check_rotvel_limit(physics_info *pi)
void physics_predict_pos(physics_info *pi, float delta_time, vec3d *predicted_pos)
void setAVD(float final_position, float total_movement_time, float starting_accleration_time, float ending_acceleration_time, float final_velocity)
vec3d afterburner_max_vel
float forward_cruise_percent
void physics_predict_pos_and_vel(physics_info *pi, float delta_time, vec3d *predicted_vel, vec3d *predicted_pos)
void physics_set_viewer(physics_info *p, int dir)
float forward_accel_time_const
float slide_accel_time_const
void physics_predict_vel(physics_info *pi, float delta_time, vec3d *predicted_vel)
float afterburner_max_reverse_vel
float shockwave_shake_amp
void physics_sim_rot(matrix *orient, physics_info *pi, float sim_time)
void physics_collide_whack(vec3d *impulse, vec3d *delta_rotvel, physics_info *pi, matrix *orient, bool is_landing)
void physics_sim_editor(vec3d *position, matrix *orient, physics_info *pi, float sim_time)