Nuclide
Software Development Kit for id Technology

Public Member Functions

void Damage (entity targetEnt, entity inflictingEnt, entity attackingEnt, string damageDef, vector damageOrigin, vector damageDir, vector hitLocation)
 Applies damage to a given entity. More...
 
void RadiusDamage (vector damageCenter, float damageRange, int damageMin, int damageMax, entity attackingEnt, string damageDef)
 Does damage to all entities within a specified radius with a linear falloff. More...
 
void Obituary (string targetName, string attackerName, string weaponDef, string meansOfDeath)
 Lets everyone in the game know that something, or something, has passed. More...
 

Member Function Documentation

◆ Damage()

void combatAPI_t::Damage ( entity  targetEnt,
entity  inflictingEnt,
entity  attackingEnt,
string  damageDef,
vector  damageOrigin,
vector  damageDir,
vector  hitLocation 
)

Applies damage to a given entity.

Requires the use of damageDef/entityDef since we're run out of parameters in QuakeC.

Parameters
targetEntis the entity receiving the damage.
inflictingEntis the entity causing the damage (e.g. a projectile, rocket)
attackingEntis the entity owning up to the damage.
damageDefis the damageDef containing all the info, including damage points
damageOriginis the location where the damage comes from.
damageDiris the direction the damage is coming from.
hitLocationis the final hit location, where the damage is applied.

◆ Obituary()

void combatAPI_t::Obituary ( string  targetName,
string  attackerName,
string  weaponDef,
string  meansOfDeath 
)

Lets everyone in the game know that something, or something, has passed.

Parameters
targetNameis the entity that has passed away.
attackerNameis responsible. Can be empty.
weaponDefis the weapon used. Can be empty.
meansOfDeathis the additional means. Could mean something extra.

◆ RadiusDamage()

void combatAPI_t::RadiusDamage ( vector  damageCenter,
float  damageRange,
int  damageMin,
int  damageMax,
entity  attackingEnt,
string  damageDef 
)

Does damage to all entities within a specified radius with a linear falloff.

If a negative damageMax value is supplied, then no collision checks will be performed. So radiusDamage calls will not be obstructed by level or entity geometry.

Parameters
damageCenteris the location of the center, at which the wave originates.
damageRangeis the radius (in game units) of the wave.
damageMaxis the maximum damage that can be done by this wave.
damageMinis the minimum amount of damage done, at the very edge.
attackingEntis the entity owning up to the damage.
attackingEntis the entity owning up to the damage.

The documentation for this struct was generated from the following file: