![]() |
Nuclide
Software Development Kit for id Technology (BETA)
|
Combat library.
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. | |
| 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. | |
| void | Obituary (string targetName, string attackerName, string weaponDef, string meansOfDeath) |
| Lets everyone in the game know that something, or something, has passed. | |
| 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.
| targetEnt | is the entity receiving the damage. |
| inflictingEnt | is the entity causing the damage (e.g. a projectile, rocket) |
| attackingEnt | is the entity owning up to the damage. |
| damageDef | is the damageDef containing all the info, including damage points |
| damageOrigin | is the location where the damage comes from. |
| damageDir | is the direction the damage is coming from. |
| hitLocation | is the final hit location, where the damage is applied. |
| void combatAPI_t::Obituary | ( | string | targetName, |
| string | attackerName, | ||
| string | weaponDef, | ||
| string | meansOfDeath ) |
Lets everyone in the game know that something, or something, has passed.
| targetName | is the entity that has passed away. |
| attackerName | is responsible. Can be empty. |
| weaponDef | is the weapon used. Can be empty. |
| meansOfDeath | is the additional means. Could mean something extra. |
| 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.
| damageCenter | is the location of the center, at which the wave originates. |
| damageRange | is the radius (in game units) of the wave. |
| damageMax | is the maximum damage that can be done by this wave. |
| damageMin | is the minimum amount of damage done, at the very edge. |
| attackingEnt | is the entity owning up to the damage. |
| damageDef | is decl containing damage info. |