this is a fire definition for our weapons/ammo More...
#include <inv_shared.h>
Data Fields | |
char | name [MAX_VAR] |
char | projectile [MAX_VAR] |
char | impact [MAX_VAR] |
char | hitBody [MAX_VAR] |
char | fireSound [MAX_VAR] |
char | impactSound [MAX_VAR] |
char | hitBodySound [MAX_VAR] |
float | fireAttenuation |
float | impactAttenuation |
char | bounceSound [MAX_VAR] |
struct objDef_s * | obj |
weaponFireDefIndex_t | weapFdsIdx |
fireDefIndex_t | fdIdx |
qboolean | soundOnce |
qboolean | gravity |
qboolean | launched |
qboolean | rolled |
qboolean | reaction |
int | throughWall |
byte | dmgweight |
float | speed |
vec2_t | shotOrg |
vec2_t | spread |
int | delay |
int | bounce |
float | bounceFac |
float | crouch |
float | range |
int | shots |
int | ammo |
float | delayBetweenShots |
int | time |
vec2_t | damage |
vec2_t | spldmg |
float | splrad |
int | weaponSkill |
int | irgoggles |
this is a fire definition for our weapons/ammo
Definition at line 76 of file inv_shared.h.
int fireDef_s::ammo |
how many ammo this firemode will use
Definition at line 115 of file inv_shared.h.
Referenced by G_ClientShoot(), G_ShootGrenade(), G_ShootSingle(), HUD_DisplayFiremodeEntry(), and HUD_UpdateActorFireMode().
amount of max possible bounces, for example grenades
Definition at line 110 of file inv_shared.h.
Referenced by G_ShootGrenade(), G_ShootSingle(), LE_AddGrenade(), and LE_AddProjectile().
float fireDef_s::bounceFac |
used in G_ShootGrenade() to apply VectorScale() effect
Definition at line 111 of file inv_shared.h.
Referenced by G_ShootGrenade().
char fireDef_s::bounceSound[MAX_VAR] |
bouncing sound
Definition at line 86 of file inv_shared.h.
Referenced by LE_AddGrenade(), LE_AddProjectile(), and S_LoadSamples().
float fireDef_s::crouch |
used for accuracy calculations (G_ShootGrenade(), G_ShootSingle())
Definition at line 112 of file inv_shared.h.
Referenced by CL_GetHitProbability(), and G_ShootSingle().
G_Damage(), damage[0] is min value of damage, damage[1] is used for randomized calculations of additional damage; damage[0] < 0 means healing, not applying damage
Definition at line 119 of file inv_shared.h.
Referenced by AI_HideNeeded(), AI_SearchBestTarget(), G_ShootSingle(), and INV_ItemDescription().
int fireDef_s::delay |
applied on grenades and grenade launcher. If no delay is set, a touch with an actor will lead to an explosion or a hit of the projectile. If a delay is set, the (e.g. grenade) may bounce away again.
Definition at line 108 of file inv_shared.h.
Referenced by G_ShootGrenade(), and G_ShootSingle().
delay between shots (sounds and particles) for this firemode; the higher the value, the less the delay (1000/delay)
Definition at line 116 of file inv_shared.h.
Referenced by CL_ActorDoShootTime(), CL_ActorShootHiddenTime(), and CL_GetEventTime().
used in G_Damage() to apply damagetype effects - redundant with obj->dmgtype
Definition at line 103 of file inv_shared.h.
Referenced by G_Damage().
Self link of the fd in the objDef_t->fd[][fdIdx] array.
Definition at line 95 of file inv_shared.h.
Referenced by AI_ActorThink(), Com_ParseItem(), G_EventShoot(), G_EventShootHidden(), G_EventThrow(), and HUD_DisplayFiremodeEntry().
attenuation of firing (less louder over distance), see S_PlaySample()
Definition at line 84 of file inv_shared.h.
Referenced by CL_ActorDoShoot(), Com_ParseFire(), and Com_ParseItem().
char fireDef_s::fireSound[MAX_VAR] |
the sound when a recruits fires
Definition at line 81 of file inv_shared.h.
Referenced by CL_ActorDoShoot(), CL_ActorDoThrow(), CL_ActorShootHidden(), and S_LoadSamples().
Does gravity has any influence on this item?
Definition at line 98 of file inv_shared.h.
Referenced by CL_ActorTargetAlign_f(), CL_AddTargeting(), and G_ClientShoot().
char fireDef_s::hitBody[MAX_VAR] |
hit the body particles
Definition at line 80 of file inv_shared.h.
Referenced by LE_AddGrenade(), and LE_AddProjectile().
char fireDef_s::hitBodySound[MAX_VAR] |
the sound that is played on hitting a body
Definition at line 83 of file inv_shared.h.
Referenced by LE_AddGrenade(), LE_AddProjectile(), and S_LoadSamples().
char fireDef_s::impact[MAX_VAR] |
impact particle
Definition at line 79 of file inv_shared.h.
Referenced by LE_AddGrenade(), and LE_AddProjectile().
attenuation of impact (less louder over distance), see S_PlaySample()
Definition at line 85 of file inv_shared.h.
Referenced by Com_ParseFire(), Com_ParseItem(), LE_AddProjectile(), and LET_Projectile().
char fireDef_s::impactSound[MAX_VAR] |
the sound that is played on impact
Definition at line 82 of file inv_shared.h.
Referenced by LE_AddGrenade(), LE_AddProjectile(), and S_LoadSamples().
Is this an irgoogle?
Definition at line 124 of file inv_shared.h.
Referenced by CL_ActorDoShoot(), G_ClientShoot(), and G_SplashDamage().
used for calculating parabolas in Com_GrenadeTarget()
Definition at line 99 of file inv_shared.h.
Referenced by CL_TargetingGrenade(), and G_ShootGrenade().
char fireDef_s::name[MAX_VAR] |
fire defintion name (translatable)
Definition at line 77 of file inv_shared.h.
Referenced by G_PrintActorStats(), HUD_DisplayFiremodeEntry(), HUD_PopupFiremodeReservation(), HUD_UpdateActorFireMode(), and INV_ItemDescription().
struct objDef_s* fireDef_s::obj |
The weapon/ammo item this fd is located in.
Definition at line 90 of file inv_shared.h.
Referenced by Com_AddObjectLinks(), G_ActorHasWorkingFireModeSet(), G_Damage(), G_EventShoot(), G_EventShootHidden(), G_EventThrow(), G_FireAffectedSurface(), G_SplashDamage(), HUD_CheckFiremodeReservation(), HUD_DisplayFiremodes(), HUD_FireWeapon_f(), HUD_PopupFiremodeReservation(), HUD_UpdateReactionFiremodes(), LE_AddProjectile(), and LET_Projectile().
char fireDef_s::projectile[MAX_VAR] |
projectile particle
Definition at line 78 of file inv_shared.h.
Referenced by LE_AddGrenade(), and LE_AddProjectile().
float fireDef_s::range |
range of the weapon ammunition, defined per firemode
Definition at line 113 of file inv_shared.h.
Referenced by AI_FighterCheckShoot(), AI_HideNeeded(), CL_TargetingGrenade(), CL_TargetingStraight(), Com_ParseFire(), G_ClientShoot(), G_ShootGrenade(), G_ShootSingle(), and INV_ItemDescription().
This firemode can be used/selected for reaction fire.
Definition at line 101 of file inv_shared.h.
Referenced by HUD_DisplayFiremodeEntry(), and INVSH_HasReactionFireEnabledWeapon().
Can it be rolled - e.g. grenades - used in "Roll" firemodes, see Com_GrenadeTarget()
Definition at line 100 of file inv_shared.h.
Referenced by CL_TargetingGrenade(), and G_ShootGrenade().
This can shift a muzzle vertically (first value) and horizontally (second value) for the trace that is done on the server side.
Definition at line 106 of file inv_shared.h.
Referenced by CL_TargetingGrenade(), and G_GetShotOrigin().
int fireDef_s::shots |
how many shots this firemode will produce
Definition at line 114 of file inv_shared.h.
Referenced by AI_SearchBestTarget(), G_ClientShoot(), and INV_ItemDescription().
when set, firing sound is played only once, see CL_ActorDoThrow() and CL_ActorShootHidden()
Definition at line 97 of file inv_shared.h.
Referenced by CL_ActorDoShoot(), and CL_ActorShootHidden().
float fireDef_s::speed |
projectile-related; zero value means unlimited speed (most of the cases). for that unlimited speed we use special particle (which cannot work with speed non-zero valued.
Definition at line 104 of file inv_shared.h.
Referenced by CL_ActorDoShootTime(), CL_GetEventTime(), and LE_AddProjectile().
G_SplashDamage(), currently we use only first value (spldmg[0]) for apply splashdamage effect
Definition at line 121 of file inv_shared.h.
Referenced by AI_SearchBestTarget(), G_SplashDamage(), and INV_ItemDescription().
float fireDef_s::splrad |
splash damage radius
Definition at line 122 of file inv_shared.h.
Referenced by CL_TargetingGrenade(), Com_ParseFire(), G_ClientShoot(), G_Damage(), G_ShootGrenade(), G_ShootSingle(), G_SplashDamage(), LE_AddGrenade(), and LE_AddProjectile().
used for accuracy calculations (G_ShootGrenade(), G_ShootSingle())
Definition at line 107 of file inv_shared.h.
Referenced by AI_FighterCheckShoot(), AI_SearchBestTarget(), CL_GetHitProbability(), G_ShootGrenade(), G_ShootSingle(), and INV_ItemDescription().
allow the shooting through a wall
Definition at line 102 of file inv_shared.h.
Referenced by G_ShootSingle().
int fireDef_s::time |
amount of TU used for this firemode
Definition at line 118 of file inv_shared.h.
Referenced by actorL_shoot(), AI_SearchBestTarget(), G_ActorGetTUForReactionFire(), G_ClientShoot(), G_ReactionFireGetTUsForItem(), HUD_CheckFiremodeReservation(), HUD_DisplayFiremodeEntry(), HUD_FireWeapon_f(), HUD_GetMinimumTUsForUsage(), HUD_PopupFiremodeReservation(), HUD_UpdateActorFireMode(), and INV_ItemDescription().
The index of the "weapon_mod" entry (objDef_t->fd[weapFdsIdx]) this fd is located in. Depending on this value you can find out via objDef_t->weapIdx[weapFdsIdx] what weapon this firemode is used for. This does _NOT_ equal the index of the weapon object in ods.
Definition at line 91 of file inv_shared.h.
Referenced by AI_SearchBestTarget(), CL_SwapSkills(), Com_ParseItem(), G_ActorHasWorkingFireModeSet(), G_EventShoot(), G_EventShootHidden(), G_EventThrow(), HUD_CheckFiremodeReservation(), HUD_DisplayFiremodes(), HUD_FireWeapon_f(), HUD_PopupFiremodeReservation(), HUD_UpdateActorFireMode(), and HUD_UpdateReactionFiremodes().
What weapon skill is needed to fire this weapon.
Definition at line 123 of file inv_shared.h.
Referenced by AI_SearchBestTarget(), CL_GetHitProbability(), Com_ParseFire(), G_ClientShoot(), G_ShootGrenade(), G_ShootSingle(), G_UpdateCharacterBodycount(), G_UpdateHitScore(), and INV_ItemDescription().