6 #include <common/weapons/_all.qh>
7 #include <common/stats.qh>
8 #include <server/items/items.qh>
9 #include <lib/warpzone/common.qh>
10 #include <common/constants.qh>
11 #include <common/teams.qh>
12 #include <common/util.qh>
13 #include <common/weapons/_all.qh>
14 #include "weapons/accuracy.qh"
15 #include "weapons/csqcprojectile.qh"
16 #include "weapons/selection.qh"
17 #include "autocvars.qh"
18 #include <common/notifications/all.qh>
19 #include <common/deathtypes/all.qh>
20 #include <server/mutators/_mod.qh>
21 #include <common/turrets/sv_turrets.qh>
22 #include <common/vehicles/all.qh>
23 #include <lib/csqcmodel/sv_model.qh>
24 #include <common/playerstats.qh>
27 #include "spawnpoints.qh"
30 .void(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force) event_damage;
32 .bool(entity targ, entity inflictor, float amount, float limit) event_heal;
39 bool Damage_DamageInfo_SendEntity(entity this, entity to, int sf);
41 void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, int deathtype, float bloodtype, entity dmgowner);
43 float checkrules_firstblood;
45 .float damagedbycontents;
46 .float damagedbytriggers;
49 float damage_goodhits;
50 float damage_gooddamage;
52 .float pain_finished; // Added by Supajoe
55 .float teamkill_complain;
56 .float teamkill_soundtime;
57 .entity teamkill_soundsource;
60 .float taunt_soundtime;
62 .float spawnshieldtime;
70 .float damage_dealt, typehitsound, killsound;
72 // used for custom deathtype
75 float IsFlying(entity a);
77 void UpdateFrags(entity player, int f);
79 // NOTE: f=0 means still count as a (positive) kill, but count no frags for it
80 void W_SwitchWeapon_Force(Player this, Weapon w, .entity weaponentity);
81 void GiveFrags (entity attacker, entity targ, float f, int deathtype, .entity weaponentity);
83 string AppendItemcodes(string s, entity player);
85 void LogDeath(string mode, int deathtype, entity killer, entity killed);
87 void Obituary_SpecialDeath(
91 string s1, string s2, string s3,
92 float f1, float f2, float f3);
95 float Obituary_WeaponDeath(
99 string s1, string s2, string s3,
102 void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .entity weaponentity);
104 // Frozen status effect
105 //const int FROZEN_NOT = 0;
106 const int FROZEN_NORMAL = 1;
107 const int FROZEN_TEMP_REVIVING = 2;
108 const int FROZEN_TEMP_DYING = 3;
110 .float revival_time; // time at which player was last revived
111 .float revive_speed; // NOTE: multiplier (anything above 1 is instaheal)
114 .entity frozen_by; // for ice fields
116 void Ice_Think(entity this);
118 void Freeze(entity targ, float revivespeed, int frozen_type, bool show_waypoint);
120 void Unfreeze(entity targ, bool reset_health);
123 #define DMG_NOWEP (weaponentities[0])
125 // NOTE: the .weaponentity parameter can be set to DMG_NOWEP if the attack wasn't caused by a weapon or player
126 void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force);
128 float RadiusDamage_running;
129 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);
130 // Returns total damage applies to creatures
132 float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, .entity weaponentity, entity directhitentity);
134 .float damageforcescale;
135 const float MIN_DAMAGEEXTRARADIUS = 2;
136 const float MAX_DAMAGEEXTRARADIUS = 16;
137 .float damageextraradius;
139 // Calls .event_heal on the target so that they can handle healing themselves
140 // a limit of RES_LIMIT_NONE should be handled by the entity as its max health (if applicable)
141 bool Heal(entity targ, entity inflictor, float amount, float limit);
143 .float fire_damagepersec;
145 .float fire_deathtype;
147 .float fire_hitsound;
150 void fireburner_think(entity this);
152 float Fire_IsBurning(entity e);
154 float Fire_AddDamage(entity e, entity o, float d, float t, float dt);
156 void Fire_ApplyDamage(entity e);
158 void Fire_ApplyEffect(entity e);
160 IntrusiveList g_damagedbycontents;
161 STATIC_INIT(g_damagedbycontents) { g_damagedbycontents = IL_NEW(); }