10#define WEAPSET_INRANGE_PLAYER_DEF \
19 double time,
int aim );
36const char *pilot_weapSetTypeName( WeaponSetType t );
void pilot_weapSetAdd(Pilot *p, int id, const PilotOutfitSlot *o)
Adds an outfit to a weapon set.
int pilot_weapSetTypeCheck(Pilot *p, int id)
Checks the current weapon set type.
void pilot_getRateMod(double *rate_mod, double *energy_mod, const Pilot *p, const Outfit *o)
Gets applicable fire rate and energy modifications for a pilot's weapon.
void pilot_weapSetInrange(Pilot *p, int id, int inrange)
Changes the weapon set inrange property.
int pilot_afterburn(Pilot *p)
Activate the afterburner.
void pilot_weaponSafe(Pilot *p)
Sets the weapon set as safe.
void pilot_weapSetManual(Pilot *p, int id, int manual)
Changes the weapon set manual property.
void pilot_afterburnOver(Pilot *p)
Deactivates the afterburner.
void pilot_weapSetCleanup(Pilot *p, int id)
Cleans up a weapon set.
void pilot_weapSetVolley(Pilot *p, int id, int volley)
Changes the weapon set volley property.
int pilot_weapSetManualCheck(Pilot *p, int id)
Checks the current weapon set manual property.
void pilot_stopBeam(const Pilot *p, PilotOutfitSlot *w)
Stops a beam outfit and sets delay as appropriate.
void pilot_weapSetRm(Pilot *p, int id, const PilotOutfitSlot *o)
Removes a slot from a weapon set.
void pilot_weaponClear(Pilot *p)
Clears the pilots weapon settings.
void ws_copy(PilotWeaponSet dest[PILOT_WEAPON_SETS], const PilotWeaponSet src[PILOT_WEAPON_SETS])
Copies a weapon set over.
void ws_free(PilotWeaponSet ws[PILOT_WEAPON_SETS])
Frees a weapon set.
double pilot_weapSetRangeMin(Pilot *p, int id)
Gets the minimum range of the current pilot weapon set.
int pilot_weapSetVolleyCheck(Pilot *p, int id)
Checks the current weapon set volley property.
double pilot_weapFlyTime(const Outfit *o, const Pilot *parent, const vec2 *pos, const vec2 *vel)
Computes an estimation of ammo flying time.
void pilot_weapSetAIClear(Pilot *p)
Useful function for AI, clears activeness of all weapon sets.
PilotWeaponSet * pilot_weapSet(Pilot *p, int id)
Gets a weapon set from id.
Pilot * pilot_weaponTarget(Pilot *p, Target *wt)
Gets the weapon target of a pilot.
void pilot_weapSetUpdate(Pilot *p)
Updates the pilot's weapon sets.
int pilot_weapSetInSet(Pilot *p, int id, const PilotOutfitSlot *o)
Checks to see if a slot is in a weapon set.
int pilot_outfitOffAll(Pilot *p)
Disables all active outfits for a pilot.
double pilot_weapSetSpeed(Pilot *p, int id)
Gets the speed of the current pilot weapon set.
double pilot_weapSetAmmo(Pilot *p, int id)
Gets the ammo of the current pilot weapon set.
int pilot_weapSetCheck(Pilot *p, int id, const PilotOutfitSlot *o)
Checks to see if a slot is in a weapon set and usable.
PilotWeaponSetOutfit * pilot_weapSetList(Pilot *p, int id)
Lists the items in a pilot weapon set.
int pilot_outfitOn(Pilot *p, PilotOutfitSlot *pos)
Enable a given active outfit.
int pilot_outfitOff(Pilot *p, PilotOutfitSlot *o, int natural)
Disables a given active outfit.
void pilot_weapSetUpdateOutfitState(Pilot *p)
Updates the local state of all the pilot's outfits based on the weapon sets.
double pilot_weapSetRange(Pilot *p, int id)
Gets the range of the current pilot weapon set.
int pilot_shootWeapon(Pilot *p, PilotOutfitSlot *w, const Target *target, double time, int aim)
Actually handles the shooting, how often the player.p can shoot and such.
int pilot_outfitOffAllStealth(Pilot *p)
Disables all active outfits for a pilot.
void pilot_weapSetClear(Pilot *p, int id)
Clears a weapon set.
void pilot_weaponAuto(Pilot *p)
Tries to automatically set and create the pilot's weapon set.
int pilot_weapSetInrangeCheck(Pilot *p, int id)
Checks the current weapon set inrange property.
void pilot_weapSetFree(Pilot *p)
Frees a pilot's weapon sets.
int pilot_weapSetPress(Pilot *p, int id, int type)
Handles a weapon set press.
const char * pilot_weapSetName(Pilot *p, int id)
Gets the name of a weapon set.
void pilot_weapSetType(Pilot *p, int id, WeaponSetType type)
Changes the weapon sets mode.
void pilot_weapSetUpdateStats(Pilot *p)
Update the weapon sets given pilot stat changes.
A ship outfit, depends radically on the type.
Stores an outfit the pilot has.
A pilot Weapon Set Outfit.
A weapon set represents a set of weapons that have an action.
The representation of an in-game pilot.
Represents a weapon target.