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 1081 of file damage.qc.

1082{
1083 entity o;
1084 float t;
1085 for (t = 0, o = e.owner; o.owner && t < 16; o = o.owner, ++t);
1086 if (IS_NOT_A_CLIENT(o))
1087 o = e.fire_owner;
1088
1089 float fireendtime = StatusEffects_gettime(STATUSEFFECT_Burning, e);
1090 t = min(frametime, fireendtime - time);
1091 float d = e.fire_damagepersec * t;
1092
1093 float hi = e.fire_owner.hitsound_damage_dealt;
1094 float ty = e.fire_owner.typehitsound;
1095 Damage(e, e, e.fire_owner, d, e.fire_deathtype, DMG_NOWEP, e.origin, '0 0 0');
1096 if (e.fire_hitsound && e.fire_owner)
1097 {
1098 e.fire_owner.hitsound_damage_dealt = hi;
1099 e.fire_owner.typehitsound = ty;
1100 }
1101 e.fire_hitsound = true;
1102
1103 if (!IS_INDEPENDENT_PLAYER(e) && !STAT(FROZEN, e) && !StatusEffects_active(STATUSEFFECT_Frozen, e))
1104 IL_EACH(g_damagedbycontents, it.damagedbycontents && it != e,
1105 {
1106 if (!IS_DEAD(it) && it.takedamage && !IS_INDEPENDENT_PLAYER(it)
1107 && boxesoverlap(e.absmin, e.absmax, it.absmin, it.absmax))
1108 {
1109 t = autocvar_g_balance_firetransfer_time * (fireendtime - time);
1110 d = autocvar_g_balance_firetransfer_damage * e.fire_damagepersec * t;
1111 Fire_AddDamage(it, o, d, t, DEATH_FIRE.m_id);
1112 }
1113 });
1114}
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:493
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:82
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"  )