Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
burning.qh File Reference
Include dependency graph for burning.qh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Burning

Functions

void Fire_ApplyDamage (entity e)
 REGISTER_STATUSEFFECT (Burning, NEW(Burning))
 SOUND (Burning_Remove, "desertfactory/steam_burst")

Function Documentation

◆ Fire_ApplyDamage()

void Fire_ApplyDamage ( entity e)

Definition at line 1072 of file damage.qc.

1073{
1074 entity o;
1075 float t;
1076 for (t = 0, o = e.owner; o.owner && t < 16; o = o.owner, ++t);
1077 if (IS_NOT_A_CLIENT(o))
1078 o = e.fire_owner;
1079
1080 float fireendtime = StatusEffects_gettime(STATUSEFFECT_Burning, e);
1081 t = min(frametime, fireendtime - time);
1082 float d = e.fire_damagepersec * t;
1083
1084 float hi = e.fire_owner.hitsound_damage_dealt;
1085 float ty = e.fire_owner.typehitsound;
1086 Damage(e, e, e.fire_owner, d, e.fire_deathtype, DMG_NOWEP, e.origin, '0 0 0');
1087 if (e.fire_hitsound && e.fire_owner)
1088 {
1089 e.fire_owner.hitsound_damage_dealt = hi;
1090 e.fire_owner.typehitsound = ty;
1091 }
1092 e.fire_hitsound = true;
1093
1094 if (!IS_INDEPENDENT_PLAYER(e) && !STAT(FROZEN, e) && !StatusEffects_active(STATUSEFFECT_Frozen, e))
1095 IL_EACH(g_damagedbycontents, it.damagedbycontents && it != e,
1096 {
1097 if (!IS_DEAD(it) && it.takedamage && !IS_INDEPENDENT_PLAYER(it)
1098 && boxesoverlap(e.absmin, e.absmax, it.absmin, it.absmax))
1099 {
1100 t = autocvar_g_balance_firetransfer_time * (fireendtime - time);
1101 d = autocvar_g_balance_firetransfer_damage * e.fire_damagepersec * t;
1102 Fire_AddDamage(it, o, d, t, DEATH_FIRE.m_id);
1103 }
1104 });
1105}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define IS_NOT_A_CLIENT(s)
Definition player.qh:243
float frametime
float time
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
Definition damage.qc:483
IntrusiveList g_damagedbycontents
Definition damage.qh:143
#define DMG_NOWEP
Definition damage.qh:104
#define IL_EACH(this, cond, body)
#define STAT(...)
Definition stats.qh:94
float min(float f,...)
#define IS_INDEPENDENT_PLAYER(e)
Definition client.qh:312
float StatusEffects_gettime(StatusEffect this, entity actor)
bool StatusEffects_active(StatusEffect this, entity actor)

References Damage(), DMG_NOWEP, entity(), frametime, g_damagedbycontents, IL_EACH, IS_INDEPENDENT_PLAYER, IS_NOT_A_CLIENT, min(), STAT, StatusEffects_active(), StatusEffects_gettime(), and time.

◆ REGISTER_STATUSEFFECT()

REGISTER_STATUSEFFECT ( Burning ,
NEW(Burning)  )

References NEW, and REGISTER_STATUSEFFECT.

◆ SOUND()

SOUND ( Burning_Remove ,
"desertfactory/steam_burst"  )