3 #include <common/weapons/_all.qh>
5 bool autocvar_g_throughfloor_debug;
6 float autocvar_g_throughfloor_damage;
7 float autocvar_g_throughfloor_force;
8 float autocvar_g_throughfloor_damage_max_stddev;
9 float autocvar_g_throughfloor_force_max_stddev;
10 float autocvar_g_throughfloor_min_steps_player;
11 float autocvar_g_throughfloor_max_steps_player;
12 float autocvar_g_throughfloor_min_steps_other;
13 float autocvar_g_throughfloor_max_steps_other;
14 float autocvar_g_mirrordamage;
15 bool autocvar_g_mirrordamage_virtual;
16 bool autocvar_g_mirrordamage_onlyweapons;
17 float autocvar_g_maxpushtime;
18 float autocvar_g_balance_damagepush_speedfactor;
19 int autocvar_g_balance_firetransfer_damage;
20 int autocvar_g_balance_firetransfer_time;
21 float autocvar_g_balance_armor_blockpercent;
22 float autocvar_g_teamdamage_resetspeed;
23 float autocvar_g_teamdamage_threshold;
24 float autocvar_g_balance_selfdamagepercent;
25 float autocvar_g_friendlyfire;
26 float autocvar_g_friendlyfire_virtual;
27 float autocvar_g_friendlyfire_virtual_force;
28 float autocvar_g_frozen_revive_falldamage;
29 int autocvar_g_frozen_revive_falldamage_health;
30 bool autocvar_g_frozen_damage_trigger;
31 float autocvar_g_frozen_force;
33 .void(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force) event_damage;
35 .bool(entity targ, entity inflictor, float amount, float limit) event_heal;
42 bool Damage_DamageInfo_SendEntity(entity this, entity to, int sf);
44 void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, int deathtype, float bloodtype, entity dmgowner);
46 float checkrules_firstblood;
48 .float damagedbycontents;
49 .float damagedbytriggers;
52 float damage_goodhits;
53 float damage_gooddamage;
55 .float pain_finished; // Added by Supajoe
58 .float teamkill_complain;
59 .float teamkill_soundtime;
60 .entity teamkill_soundsource;
63 .float taunt_soundtime;
65 .float spawnshieldtime;
73 .float damage_dealt, typehitsound, killsound;
75 // used for custom deathtype
78 float IsFlying(entity a);
80 void UpdateFrags(entity player, int f);
82 // NOTE: f=0 means still count as a (positive) kill, but count no frags for it
83 void W_SwitchWeapon_Force(Player this, Weapon w, .entity weaponentity);
84 void GiveFrags (entity attacker, entity targ, float f, int deathtype, .entity weaponentity);
86 string AppendItemcodes(string s, entity player);
88 void LogDeath(string mode, int deathtype, entity killer, entity killed);
90 void Obituary_SpecialDeath(
94 string s1, string s2, string s3,
95 float f1, float f2, float f3);
98 float Obituary_WeaponDeath(
102 string s1, string s2, string s3,
105 void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .entity weaponentity);
107 // Frozen status effect
108 //const int FROZEN_NOT = 0;
109 const int FROZEN_NORMAL = 1;
110 const int FROZEN_TEMP_REVIVING = 2;
111 const int FROZEN_TEMP_DYING = 3;
113 .float revival_time; // time at which player was last revived
114 .float revive_speed; // NOTE: multiplier (anything above 1 is instaheal)
117 .entity frozen_by; // for ice fields
119 void Ice_Think(entity this);
121 void Freeze(entity targ, float revivespeed, int frozen_type, bool show_waypoint);
123 void Unfreeze(entity targ, bool reset_health);
126 #define DMG_NOWEP (weaponentities[0])
128 // NOTE: the .weaponentity parameter can be set to DMG_NOWEP if the attack wasn't caused by a weapon or player
129 void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force);
131 float RadiusDamage_running;
132 float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, float forcezscale, int deathtype, .entity weaponentity, entity directhitentity);
133 // Returns total damage applies to creatures
135 float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, .entity weaponentity, entity directhitentity);
137 .float damageforcescale;
138 const float MIN_DAMAGEEXTRARADIUS = 2;
139 const float MAX_DAMAGEEXTRARADIUS = 16;
140 .float damageextraradius;
142 // Calls .event_heal on the target so that they can handle healing themselves
143 // a limit of RES_LIMIT_NONE should be handled by the entity as its max health (if applicable)
144 bool Heal(entity targ, entity inflictor, float amount, float limit);
146 .float fire_damagepersec;
148 .float fire_deathtype;
150 .float fire_hitsound;
153 void fireburner_think(entity this);
155 float Fire_IsBurning(entity e);
157 float Fire_AddDamage(entity e, entity o, float d, float t, float dt);
159 void Fire_ApplyDamage(entity e);
161 void Fire_ApplyEffect(entity e);
163 IntrusiveList g_damagedbycontents;
164 STATIC_INIT(g_damagedbycontents) { g_damagedbycontents = IL_NEW(); }