naev 0.12.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,
29 double trackmax );
30
31/*
32 * Electronic warfare updating.
33 */
34int pilot_ewScanCheck( const Pilot *p );
35double pilot_ewScanTime( const Pilot *p );
36void pilot_ewScanStart( Pilot *p );
38void pilot_ewUpdateDynamic( Pilot *p, double dt );
39
40/*
41 * Stealth.
42 */
43void pilot_ewUpdateStealth( Pilot *p, double dt );
44int pilot_stealth( Pilot *p );
45void 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:497
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:256
void pilot_ewUpdateDynamic(Pilot *p, double dt)
Updates the pilot's dynamic electronic warfare properties.
Definition pilot_ew.c:113
int pilot_ewScanCheck(const Pilot *p)
Checks to see if a scan is done.
Definition pilot_ew.c:74
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:293
void pilot_updateSensorRange(void)
Updates the system's base sensor range.
Definition pilot_ew.c:208
void pilot_destealth(Pilot *p)
Destealths a pilot.
Definition pilot_ew.c:585
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:361
void pilot_ewScanStart(Pilot *p)
Initializes the scan timer for a pilot.
Definition pilot_ew.c:54
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:407
void pilot_ewUpdateStatic(Pilot *p)
Updates the pilot's static electronic warfare properties.
Definition pilot_ew.c:101
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:324
double pilot_sensorRange(void)
Returns the default sensor range for the current system.
Definition pilot_ew.c:218
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:231
int pilot_stealth(Pilot *p)
Stealths a pilot.
Definition pilot_ew.c:543
The representation of an in-game pilot.
Definition pilot.h:263