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

1115{
1116 float t, d, hi, ty;
1117 entity o;
1118
1119 for(t = 0, o = e.owner; o.owner && t < 16; o = o.owner, ++t);
1120 if(IS_NOT_A_CLIENT(o))
1121 o = e.fire_owner;
1122
1123 float fireendtime = StatusEffects_gettime(STATUSEFFECT_Burning, e);
1124 t = min(frametime, fireendtime - time);
1125 d = e.fire_damagepersec * t;
1126
1127 hi = e.fire_owner.hitsound_damage_dealt;
1128 ty = e.fire_owner.typehitsound;
1129 Damage(e, e, e.fire_owner, d, e.fire_deathtype, DMG_NOWEP, e.origin, '0 0 0');
1130 if(e.fire_hitsound && e.fire_owner)
1131 {
1132 e.fire_owner.hitsound_damage_dealt = hi;
1133 e.fire_owner.typehitsound = ty;
1134 }
1135 e.fire_hitsound = true;
1136
1137 if(!IS_INDEPENDENT_PLAYER(e) && !STAT(FROZEN, e) && !StatusEffects_active(STATUSEFFECT_Frozen, e))
1138 {
1139 IL_EACH(g_damagedbycontents, it.damagedbycontents && it != e,
1140 {
1141 if(!IS_DEAD(it) && it.takedamage && !IS_INDEPENDENT_PLAYER(it))
1142 if(boxesoverlap(e.absmin, e.absmax, it.absmin, it.absmax))
1143 {
1144 t = autocvar_g_balance_firetransfer_time * (fireendtime - time);
1145 d = autocvar_g_balance_firetransfer_damage * e.fire_damagepersec * t;
1146 Fire_AddDamage(it, o, d, t, DEATH_FIRE.m_id);
1147 }
1148 });
1149 }
1150}
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define IS_NOT_A_CLIENT(s)
Definition player.qh:244
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:503
IntrusiveList g_damagedbycontents
Definition damage.qh:135
#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"  )