|
UFO: Alien Invasion
|
this is a fire definition for our weapons/ammo More...
#include <inv_shared.h>

Public Member Functions | |
| void | getShotOrigin (const vec3_t from, const vec3_t dir, bool crouching, vec3_t shotOrigin) const |
Data Fields | |
| const char * | name |
| const char * | projectile |
| const char * | impact |
| const char * | impactSound |
| const char * | hitBody |
| const char * | hitBodySound |
| const char * | fireSound |
| const char * | bounceSound |
| float | fireAttenuation |
| float | impactAttenuation |
| const struct objDef_s * | obj |
| weaponFireDefIndex_t | weapFdsIdx |
| fireDefIndex_t | fdIdx |
| itemEffect_t * | activeEffect |
| itemEffect_t * | deactiveEffect |
| itemEffect_t * | overdoseEffect |
| bool | soundOnce |
| bool | gravity |
| bool | launched |
| bool | rolled |
| bool | reaction |
| bool | irgoggles |
| byte | dmgweight |
| int | throughWall |
| 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 | rounds |
this is a fire definition for our weapons/ammo
Definition at line 110 of file inv_shared.h.
| void fireDef_t::getShotOrigin | ( | const vec3_t | from, |
| const vec3_t | dir, | ||
| bool | crouching, | ||
| vec3_t | shotOrigin ) const |
Definition at line 1039 of file inv_shared.cpp.
References AngleToDir(), dvecs, EYE_STAND, length, PLAYER_CROUCH, shotOrg, todeg, and VectorCopy.
Referenced by AI_CheckLineOfFire(), and G_ClientShoot().
| itemEffect_t* fireDef_t::activeEffect |
Definition at line 131 of file inv_shared.h.
Referenced by Com_ParseFireEffect(), and RunImplant().
| int fireDef_t::ammo |
how many ammo this firemode will use
Definition at line 154 of file inv_shared.h.
Referenced by G_ClientShoot(), G_ShootGrenade(), G_ShootSingle(), HUD_DisplayFiremodeEntry(), and HUD_UpdateActorFireMode().
| int fireDef_t::bounce |
amount of max possible bounces, for example grenades
Definition at line 149 of file inv_shared.h.
Referenced by AI_CheckLineOfFire(), CL_ActorShootHidden(), G_ShootGrenade(), G_ShootSingle(), LE_AddGrenade(), and LE_AddProjectile().
| float fireDef_t::bounceFac |
used in G_ShootGrenade() to apply VectorScale() effect
Definition at line 150 of file inv_shared.h.
Referenced by G_ShootGrenade().
| const char* fireDef_t::bounceSound |
bouncing sound
Definition at line 118 of file inv_shared.h.
Referenced by CL_ActorShootHidden(), LE_AddGrenade(), LE_AddProjectile(), S_PrecacheSamples(), and TEST_F().
| float fireDef_t::crouch |
used for accuracy calculations - must be greater than 0.0
Definition at line 151 of file inv_shared.h.
Referenced by CL_GetHitProbability(), and G_CalcEffectiveSpread().
| vec2_t fireDef_t::damage |
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 158 of file inv_shared.h.
Referenced by AI_CheckLineOfFire(), AI_FindBestFiredef(), AI_HideNeeded(), G_ClientShoot(), G_ShootSingle(), G_ShotMorale(), INV_ItemDescription(), and LE_AddProjectile().
| itemEffect_t* fireDef_t::deactiveEffect |
Definition at line 132 of file inv_shared.h.
Referenced by Com_ParseFireEffect(), and RunImplant().
| int fireDef_t::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 147 of file inv_shared.h.
Referenced by G_ShootGrenade(), and G_ShootSingle().
| float fireDef_t::delayBetweenShots |
delay between shots (sounds and particles) for this firemode; the higher the value, the less the delay (1000/delay)
Definition at line 155 of file inv_shared.h.
Referenced by CL_ActorDoShootTime(), CL_ActorShootHiddenTime(), and Com_ParseFire().
| byte fireDef_t::dmgweight |
used in G_Damage() to apply damagetype effects - redundant with obj->dmgtype
Definition at line 141 of file inv_shared.h.
Referenced by G_ClientShoot(), G_Damage(), G_SplashDamage(), and G_TreatActor().
| fireDefIndex_t fireDef_t::fdIdx |
Self link of the fd in the objDef_t->fd[][fdIdx] array.
Definition at line 130 of file inv_shared.h.
Referenced by actorL_throwgrenade(), AI_ActorThink(), AI_CalcShotDamage(), Com_ParseFireDefinition(), G_EventShoot(), G_EventShootHidden(), G_EventThrow(), and HUD_DisplayFiremodeEntry().
| float fireDef_t::fireAttenuation |
attenuation of firing (less louder over distance), see S_PlaySample()
Definition at line 120 of file inv_shared.h.
Referenced by CL_ActorDoShoot(), CL_ActorShootHidden(), Com_ParseFire(), and Com_ParseFireDefinition().
| const char* fireDef_t::fireSound |
the sound when a recruits fires
Definition at line 117 of file inv_shared.h.
Referenced by CL_ActorDoShoot(), CL_ActorDoThrow(), CL_ActorShootHidden(), S_PrecacheSamples(), and TEST_F().
| bool fireDef_t::gravity |
Does gravity have any influence on this item?
Definition at line 136 of file inv_shared.h.
Referenced by AI_CalcShotDamage(), AI_CheckLineOfFire(), AI_FindBestFiredef(), AIL_GetBestShot(), and G_ClientShoot().
| const char* fireDef_t::hitBody |
hit the body particles
Definition at line 115 of file inv_shared.h.
Referenced by LE_AddGrenade(), LE_AddProjectile(), and TEST_F().
| const char* fireDef_t::hitBodySound |
the sound that is played on hitting a body
Definition at line 116 of file inv_shared.h.
Referenced by CL_ActorShootHidden(), LE_AddGrenade(), LE_AddProjectile(), S_PrecacheSamples(), and TEST_F().
| const char* fireDef_t::impact |
impact particle
Definition at line 113 of file inv_shared.h.
Referenced by LE_AddGrenade(), LE_AddProjectile(), and TEST_F().
| float fireDef_t::impactAttenuation |
attenuation of impact (less louder over distance), see S_PlaySample()
Definition at line 121 of file inv_shared.h.
Referenced by CL_ActorShootHidden(), Com_ParseFire(), Com_ParseFireDefinition(), LE_AddProjectile(), and LET_Projectile().
| const char* fireDef_t::impactSound |
the sound that is played on impact
Definition at line 114 of file inv_shared.h.
Referenced by CL_ActorShootHidden(), LE_AddGrenade(), LE_AddProjectile(), S_PrecacheSamples(), and TEST_F().
| bool fireDef_t::irgoggles |
Is this an irgoggle?
Definition at line 140 of file inv_shared.h.
Referenced by CL_ActorDoShoot(), G_ClientShoot(), G_ShotMorale(), and G_SplashDamage().
| bool fireDef_t::launched |
used for calculating parabolas in Com_GrenadeTarget()
Definition at line 137 of file inv_shared.h.
Referenced by AI_CheckLineOfFire(), AI_FindBestFiredef(), AIL_GetBestShot(), and G_ShootGrenade().
| const char* fireDef_t::name |
fire definition name (translatable)
Definition at line 111 of file inv_shared.h.
Referenced by CL_ActorReactionFireAddTarget(), Com_ParseFire(), G_PrintActorStats(), HUD_DisplayFiremodeEntry(), HUD_PopupFiremodeReservation(), HUD_UpdateActorFireMode(), HUD_UpdateActorLoad_f(), INV_ItemDescription(), and TEST_F().
| const struct objDef_s* fireDef_t::obj |
The weapon/ammo item this fd is located in.
Definition at line 125 of file inv_shared.h.
Referenced by G_ActorHasWorkingFireModeSet(), G_ClientShoot(), G_Damage(), G_EventShoot(), G_EventShootHidden(), G_EventThrow(), G_FireAffectedSurface(), G_SplashDamage(), HUD_CheckFiremodeReservation(), HUD_DisplayActions(), HUD_FireWeapon_f(), HUD_PopupFiremodeReservation(), HUD_UpdateReactionFiremodes(), LE_AddProjectile(), and LET_Projectile().
| itemEffect_t* fireDef_t::overdoseEffect |
Definition at line 133 of file inv_shared.h.
Referenced by Com_ParseFireEffect(), and RunImplant().
| const char* fireDef_t::projectile |
projectile particle
Definition at line 112 of file inv_shared.h.
Referenced by LE_AddGrenade(), LE_AddProjectile(), and TEST_F().
| float fireDef_t::range |
range of the weapon ammunition, defined per firemode
Definition at line 152 of file inv_shared.h.
Referenced by AI_CheckLineOfFire(), AI_FighterCheckShoot(), AI_HideNeeded(), CL_ActorIsReactionFireOutOfRange(), CL_ActorReactionFireAddTarget(), Com_ParseFire(), G_ClientShoot(), G_ShootGrenade(), G_ShootSingle(), INV_ItemDescription(), and ReactionFire::isInWeaponRange().
| bool fireDef_t::reaction |
This firemode can be used/selected for reaction fire.
Definition at line 139 of file inv_shared.h.
Referenced by Item::getReactionFireWeaponType(), and HUD_DisplayFiremodeEntry().
| bool fireDef_t::rolled |
Can it be rolled - e.g. grenades - used in "Roll" firemodes, see Com_GrenadeTarget()
Definition at line 138 of file inv_shared.h.
Referenced by AI_CheckLineOfFire(), AI_FindBestFiredef(), AIL_GetBestShot(), and G_ShootGrenade().
| int fireDef_t::rounds |
e.g. for incendiary grenades
Definition at line 163 of file inv_shared.h.
Referenced by G_ClientShoot().
| vec2_t fireDef_t::shotOrg |
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 145 of file inv_shared.h.
Referenced by getShotOrigin().
| int fireDef_t::shots |
how many shots this firemode will produce
Definition at line 153 of file inv_shared.h.
Referenced by AI_CalcShotDamage(), AI_CheckLineOfFire(), Com_ParseFire(), G_ClientShoot(), INV_ItemDescription(), and ReactionFire::shoot().
| bool fireDef_t::soundOnce |
when set, firing sound is played only once, see CL_ActorDoThrow() and CL_ActorShootHidden()
Definition at line 135 of file inv_shared.h.
Referenced by CL_ActorDoShoot(), and CL_ActorShootHidden().
| float fireDef_t::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 143 of file inv_shared.h.
Referenced by CL_ActorDoShootTime(), and LE_AddProjectile().
| vec2_t fireDef_t::spldmg |
G_SplashDamage(), currently we use only first value (spldmg[0]) for apply splashdamage effect
Definition at line 160 of file inv_shared.h.
Referenced by AI_FindBestFiredef(), AI_HideNeeded(), G_SplashDamage(), and INV_ItemDescription().
| float fireDef_t::splrad |
splash damage radius
Definition at line 161 of file inv_shared.h.
Referenced by actorL_throwgrenade(), AI_CalcShotDamage(), AI_CheckLineOfFire(), AI_FighterCheckShoot(), AI_FindBestFiredef(), CL_ActorShootHidden(), Com_ParseFire(), G_ClientShoot(), G_Damage(), G_ShootGrenade(), G_ShootSingle(), G_SplashDamage(), LE_AddGrenade(), and LE_AddProjectile().
| vec2_t fireDef_t::spread |
used for accuracy calculations (G_ShootGrenade(), G_ShootSingle())
Definition at line 146 of file inv_shared.h.
Referenced by CL_GetHitProbability(), G_CalcEffectiveSpread(), and INV_ItemDescription().
| int fireDef_t::throughWall |
allow the shooting through a wall
Definition at line 142 of file inv_shared.h.
Referenced by G_ShootSingle().
| int fireDef_t::time |
amount of TU used for this firemode
Definition at line 157 of file inv_shared.h.
Referenced by AIL_tusforshooting(), CL_ActorTimeForFireDef(), InventoryInterface::EquipActorNormal(), G_ActorGetModifiedTimeForFiredef(), Item::getFastestFireDef(), InventoryInterface::GetInventoryState(), HUD_GetMinimumTUsForUsage(), HUD_UpdateActorLoad_f(), and INV_ItemDescription().
| weaponFireDefIndex_t fireDef_t::weapFdsIdx |
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 126 of file inv_shared.h.
Referenced by actorL_throwgrenade(), AI_FindBestFiredef(), AI_HasLineOfFire(), AIL_GetBestShot(), CL_GetSkillIndicator(), Com_ParseFireDefinition(), G_ActorHasWorkingFireModeSet(), G_EventShoot(), G_EventShootHidden(), G_EventThrow(), Item::getNumFiredefs(), HUD_CheckFiremodeReservation(), HUD_DisplayActions(), HUD_FireWeapon_f(), HUD_PopupFiremodeReservation(), HUD_UpdateActorFireMode(), and HUD_UpdateReactionFiremodes().
| int fireDef_t::weaponSkill |
What weapon skill is needed to fire this weapon.
Definition at line 162 of file inv_shared.h.
Referenced by CL_GetHitProbability(), CL_GetSkillIndicator(), Com_ParseFire(), G_CalcEffectiveSpread(), G_ClientShoot(), G_UpdateCharacterBodycount(), G_UpdateHitScore(), and INV_ItemDescription().