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

1068{
1069 entity o;
1070 float t;
1071 for (t = 0, o = e.owner; o.owner && t < 16; o = o.owner, ++t);
1072 if (IS_NOT_A_CLIENT(o))
1073 o = e.fire_owner;
1074
1075 float fireendtime = StatusEffects_gettime(STATUSEFFECT_Burning, e);
1076 t = min(frametime, fireendtime - time);
1077 float d = e.fire_damagepersec * t;
1078
1079 float hi = e.fire_owner.hitsound_damage_dealt;
1080 float ty = e.fire_owner.typehitsound;
1081 Damage(e, e, e.fire_owner, d, e.fire_deathtype, DMG_NOWEP, e.origin, '0 0 0');
1082 if (e.fire_hitsound && e.fire_owner)
1083 {
1084 e.fire_owner.hitsound_damage_dealt = hi;
1085 e.fire_owner.typehitsound = ty;
1086 }
1087 e.fire_hitsound = true;
1088
1089 if (!IS_INDEPENDENT_PLAYER(e) && !STAT(FROZEN, e) && !StatusEffects_active(STATUSEFFECT_Frozen, e))
1090 IL_EACH(g_damagedbycontents, it.damagedbycontents && it != e,
1091 {
1092 if (!IS_DEAD(it) && it.takedamage && !IS_INDEPENDENT_PLAYER(it)
1093 && boxesoverlap(e.absmin - '1 1 1', e.absmax + '1 1 1', it.absmin, it.absmax))
1094 {
1095 t = autocvar_g_balance_firetransfer_time * (fireendtime - time);
1096 d = autocvar_g_balance_firetransfer_damage * e.fire_damagepersec * t;
1097 Fire_AddDamage(it, o, d, t, DEATH_FIRE.m_id);
1098 }
1099 });
1100}
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:484
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"  )