naev 0.11.5
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#define EW_ASTEROID_DIST 7.5e3
11#define EW_JUMPDETECT_DIST 7.5e3
12#define EW_SPOBDETECT_DIST 20e3 /* TODO something better than this. */
13
14/*
15 * Sensors and range.
16 */
17void pilot_updateSensorRange (void);
18double pilot_sensorRange( void );
19int pilot_inRange( const Pilot *p, double x, double y );
20int pilot_inRangePilot( const Pilot *p, const Pilot *target, double *dist2);
21int pilot_inRangeSpob( const Pilot *p, int target );
22int pilot_inRangeAsteroid( const Pilot *p, int ast, int fie );
23int pilot_inRangeJump( const Pilot *p, int target );
24
25/*
26 * Weapon tracking.
27 */
28double pilot_ewWeaponTrack( const Pilot *p, const Pilot *t, double trackmin, double trackmax );
29
30/*
31 * Electronic warfare updating.
32 */
33int pilot_ewScanCheck( const Pilot *p );
34double pilot_ewScanTime( const Pilot *p );
35void pilot_ewScanStart( Pilot *p );
37void pilot_ewUpdateDynamic( Pilot *p, double dt );
38
39/*
40 * Stealth.
41 */
42void pilot_ewUpdateStealth( Pilot *p, double dt );
43int pilot_stealth( Pilot *p );
44void 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:244
void pilot_ewUpdateDynamic(Pilot *p, double dt)
Updates the pilot's dynamic electronic warfare properties.
Definition pilot_ew.c:106
int pilot_ewScanCheck(const Pilot *p)
Checks to see if a scan is done.
Definition pilot_ew.c:71
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:279
void pilot_updateSensorRange(void)
Updates the system's base sensor range.
Definition pilot_ew.c:198
void pilot_destealth(Pilot *p)
Destealths a pilot.
Definition pilot_ew.c:552
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:344
void pilot_ewScanStart(Pilot *p)
Initializes the scan timer for a pilot.
Definition pilot_ew.c:51
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:389
void pilot_ewUpdateStatic(Pilot *p)
Updates the pilot's static electronic warfare properties.
Definition pilot_ew.c:94
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:309
double pilot_sensorRange(void)
Returns the default sensor range for the current system.
Definition pilot_ew.c:208
double pilot_ewScanTime(const Pilot *p)
Gets the time it takes to scan a pilot.
Definition pilot_ew.c:40
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:221
int pilot_stealth(Pilot *p)
Stealths a pilot.
Definition pilot_ew.c:513
The representation of an in-game pilot.
Definition pilot.h:217