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