naev 0.10.4
pilot_ew.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
6#include "pilot.h"
7
8#define EW_JUMP_BONUS_RANGE 2500.
9
10/*
11 * Sensors and range.
12 */
13void pilot_updateSensorRange (void);
14double pilot_sensorRange( void );
15int pilot_inRange( const Pilot *p, double x, double y );
16int pilot_inRangePilot( const Pilot *p, const Pilot *target, double *dist2);
17int pilot_inRangeSpob( const Pilot *p, int target );
18int pilot_inRangeAsteroid( const Pilot *p, int ast, int fie );
19int pilot_inRangeJump( const Pilot *p, int target );
20
21/*
22 * Weapon tracking.
23 */
24double pilot_ewWeaponTrack( const Pilot *p, const Pilot *t, double trackmin, double trackmax );
25
26/*
27 * Electronic warfare updating.
28 */
29int pilot_ewScanCheck( const Pilot *p );
30double pilot_ewScanTime( const Pilot *p );
31void pilot_ewScanStart( Pilot *p );
33void pilot_ewUpdateDynamic( Pilot *p, double dt );
34
35/*
36 * Stealth.
37 */
38void pilot_ewUpdateStealth( Pilot *p, double dt );
39int pilot_stealth( Pilot *p );
40void pilot_destealth( Pilot *p );
void pilot_ewUpdateStealth(Pilot *p, double dt)
Updates the stealth mode and checks to see if it is getting broken.
Definition: pilot_ew.c:468
int pilot_inRangePilot(const Pilot *p, const Pilot *target, double *dist2)
Check to see if a pilot is in sensor range of another.
Definition: pilot_ew.c:242
void pilot_ewUpdateDynamic(Pilot *p, double dt)
Updates the pilot's dynamic electronic warfare properties.
Definition: pilot_ew.c:110
int pilot_ewScanCheck(const Pilot *p)
Checks to see if a scan is done.
Definition: pilot_ew.c:75
int pilot_inRangeSpob(const Pilot *p, int target)
Check to see if a spob is in sensor range of the pilot.
Definition: pilot_ew.c:277
void pilot_updateSensorRange(void)
Updates the system's base sensor range.
Definition: pilot_ew.c:202
void pilot_destealth(Pilot *p)
Destealths a pilot.
Definition: pilot_ew.c:549
int pilot_inRangeJump(const Pilot *p, int i)
Check to see if a jump point is in sensor range of the pilot.
Definition: pilot_ew.c:342
void pilot_ewScanStart(Pilot *p)
Initializes the scan timer for a pilot.
Definition: pilot_ew.c:55
double pilot_ewWeaponTrack(const Pilot *p, const Pilot *t, double trackmin, double trackmax)
Calculates the weapon lead (1. is 100%, 0. is 0%)..
Definition: pilot_ew.c:387
void pilot_ewUpdateStatic(Pilot *p)
Updates the pilot's static electronic warfare properties.
Definition: pilot_ew.c:98
int pilot_inRangeAsteroid(const Pilot *p, int ast, int fie)
Check to see if an asteroid is in sensor range of the pilot.
Definition: pilot_ew.c:307
double pilot_sensorRange(void)
Returns the default sensor range for the current system.
Definition: pilot_ew.c:212
double pilot_ewScanTime(const Pilot *p)
Gets the time it takes to scan a pilot.
Definition: pilot_ew.c:44
int pilot_inRange(const Pilot *p, double x, double y)
Check to see if a position is in range of the pilot.
Definition: pilot_ew.c:225
int pilot_stealth(Pilot *p)
Stealths a pilot.
Definition: pilot_ew.c:513
The representation of an in-game pilot.
Definition: pilot.h:210