Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
damage.qh
Go to the documentation of this file.
1#pragma once
2
4
29
30.void(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force) event_damage;
31
32.bool(entity targ, entity inflictor, float amount, float limit) event_heal;
33
34.float dmg;
35.float dmg_edge;
36.float dmg_force;
38
39bool Damage_DamageInfo_SendEntity(entity this, entity to, int sf);
40
41void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, int deathtype, float bloodtype, entity dmgowner);
42
44
47
48float yoda;
50
51.float pain_finished; // Added by Supajoe
52
53.float dmg_team;
57.entity pusher;
60
62
64
66
68
71
72// used for custom deathtype
74
75float IsFlying(entity a);
76
77// NOTE: f=0 means still count as a (positive) kill, but count no frags for it
78void W_SwitchWeapon_Force(Player this, Weapon w, .entity weaponentity);
79void GiveFrags (entity attacker, entity targ, float f, int deathtype, .entity weaponentity);
80
81string AppendItemcodes(string s, entity player);
82
83void LogDeath(string mode, int deathtype, entity killer, entity killed);
84
86 entity notif_target,
87 bool murder,
88 bool msg_from_ent,
89 int deathtype,
90 string s1, string s2, string s3, string s4,
91 float f1, float f2, float f3);
92
95 entity notif_target,
96 float murder,
97 int deathtype,
98 string s1, string s2, string s3,
99 float f1, float f2);
100
101void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .entity weaponentity);
102
103// WEAPONTODO
104#define DMG_NOWEP (weaponentities[0])
105
107
108// NOTE: the .weaponentity parameter can be set to DMG_NOWEP if the attack wasn't caused by a weapon or player
109void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force);
110
113 entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker,
114 float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe,
115 bool inflictorselfdamage, float forceintensity, vector forcexyzscale,
116 int deathtype, .entity weaponentity, entity directhitentity);
117 // Returns total damage applies to creatures
118
119float RadiusDamage(
120 entity inflictor, entity attacker,
121 float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe,
122 float forceintensity,
123 int deathtype, .entity weaponentity, entity directhitentity);
124
126const float MIN_DAMAGEEXTRARADIUS = 0.1;
127const float MAX_DAMAGEEXTRARADIUS = 16;
129
130// Calls .event_heal on the target so that they can handle healing themselves
131// a limit of RES_LIMIT_NONE should be handled by the entity as its max health (if applicable)
132bool Heal(entity targ, entity inflictor, float amount, float limit);
133
138
139float Fire_AddDamage(entity e, entity o, float d, float t, float dt);
140
142
float dmg_force
Definition breakable.qc:15
float dmg
Definition breakable.qc:12
float dmg_edge
Definition breakable.qc:13
float dmg_radius
Definition breakable.qc:14
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float pain_finished
limitations: NULL cannot be present elements can only be present once a maximum of IL_MAX lists can e...
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition weapon.qh:42
float hitsound_damage_dealt
Definition damage.qh:69
int killsound
Definition damage.qh:70
float taunt_soundtime
Definition damage.qh:59
entity teamkill_soundsource
Definition damage.qh:56
bool RadiusDamage_running
Definition damage.qh:111
bool autocvar_g_mirrordamage_virtual
Definition damage.qh:15
bool autocvar_g_mirrordamage_onlyweapons
Definition damage.qh:16
vector death_origin
Definition damage.qh:67
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
Definition damage.qc:493
float yoda
Definition damage.qh:48
float dmg_team
Definition damage.qh:53
bool Heal(entity targ, entity inflictor, float amount, float limit)
Definition damage.qc:957
float RadiusDamage(entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype,.entity weaponentity, entity directhitentity)
Definition damage.qc:943
int autocvar_g_balance_firetransfer_damage
Definition damage.qh:19
int autocvar_g_player_damageplayercenter
Definition damage.qh:106
float autocvar_g_throughfloor_force_max_stddev
Definition damage.qh:9
string deathmessage
Definition damage.qh:73
float damagedbycontents
Definition damage.qh:45
float autocvar_g_friendlyfire_virtual_force
Definition damage.qh:28
void GiveFrags(entity attacker, entity targ, float f, int deathtype,.entity weaponentity)
Definition damage.qc:43
int totalfrags
Definition damage.qh:63
float autocvar_g_throughfloor_damage_max_stddev
Definition damage.qh:8
float autocvar_g_balance_armor_blockpercent
Definition damage.qh:21
bool Damage_DamageInfo_SendEntity(entity this, entity to, int sf)
float Obituary_WeaponDeath(entity notif_target, float murder, int deathtype, string s1, string s2, string s3, float f1, float f2)
Definition damage.qc:165
float damagedbytriggers
Definition damage.qh:46
IntrusiveList g_damagedbycontents
Definition damage.qh:143
float autocvar_g_teamdamage_resetspeed
Definition damage.qh:22
float autocvar_g_throughfloor_force
Definition damage.qh:7
float fire_deathtype
Definition damage.qh:135
float teamkill_soundtime
Definition damage.qh:55
int impressive_hits
Definition damage.qh:49
float Fire_AddDamage(entity e, entity o, float d, float t, float dt)
Definition damage.qc:974
bool canteamdamage
Definition damage.qh:65
float spawnshieldtime
Definition damage.qh:61
float autocvar_g_balance_selfdamagepercent
Definition damage.qh:25
bool autocvar_g_throughfloor_debug
Definition damage.qh:5
float checkrules_firstblood
Definition damage.qh:43
float autocvar_g_friendlyfire_virtual
Definition damage.qh:27
entity fire_owner
Definition damage.qh:136
float autocvar_g_teamdamage_threshold
Definition damage.qh:23
float RadiusDamageForSource(entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, bool inflictorselfdamage, float forceintensity, vector forcexyzscale, int deathtype,.entity weaponentity, entity directhitentity)
Definition damage.qc:718
int autocvar_g_balance_firetransfer_time
Definition damage.qh:20
void W_SwitchWeapon_Force(Player this, Weapon w,.entity weaponentity)
Definition selection.qc:237
void Fire_ApplyDamage(entity e)
Definition damage.qc:1081
void Obituary_SpecialDeath(entity notif_target, bool murder, bool msg_from_ent, int deathtype, string s1, string s2, string s3, string s4, float f1, float f2, float f3)
float autocvar_g_throughfloor_min_steps_other
Definition damage.qh:12
float teamkill_complain
Definition damage.qh:54
float autocvar_g_friendlyfire
Definition damage.qh:26
float autocvar_g_throughfloor_min_steps_player
Definition damage.qh:10
float IsFlying(entity a)
Definition player.qc:843
float autocvar_g_balance_damagepush_speedfactor
Definition damage.qh:18
float autocvar_g_throughfloor_damage
Definition damage.qh:6
float autocvar_g_throughfloor_max_steps_other
Definition damage.qh:13
float autocvar_g_throughfloor_max_steps_player
Definition damage.qh:11
string AppendItemcodes(string s, entity player)
Definition damage.qc:81
float autocvar_g_maxpushtime
Definition damage.qh:17
int typehitsound
Definition damage.qh:70
float fire_damagepersec
Definition damage.qh:134
float autocvar_g_mirrordamage
Definition damage.qh:14
void Obituary(entity attacker, entity inflictor, entity targ, int deathtype,.entity weaponentity)
Definition damage.qc:222
void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, int deathtype, float bloodtype, entity dmgowner)
float fire_hitsound
Definition damage.qh:137
bool autocvar_g_teamkill_punishing
Definition damage.qh:24
void LogDeath(string mode, int deathtype, entity killer, entity killed)
Definition damage.qc:100
const float MAX_DAMAGEEXTRARADIUS
float damageextraradius
int w_deathtype
float damageforcescale
const float MIN_DAMAGEEXTRARADIUS
#define IL_NEW()
bool istypefrag
Definition jumppads.qh:22
entity pusher
Definition laser.qc:57
spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2 f1points f2
Definition all.inc:366
spree_inf s1 s2 s3loc s2 s1
Definition all.inc:281
spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 spree_inf s1 s2 s3loc s2 s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2loc s1 s2 f1points s1 s2
Definition all.inc:471
f1
Definition all.inc:563
vector
Definition self.qh:92
vector org
Definition self.qh:92
#define STATIC_INIT(func)
during worldspawn
Definition static.qh:32