]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/g_damage.qh
Notifications: relocate
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qh
1 #ifndef G_DAMAGE_H
2 #define G_DAMAGE_H
3
4 #if defined(CSQC)
5 #elif defined(MENUQC)
6 #elif defined(SVQC)
7     #include "../lib/warpzone/common.qh"
8     #include "../common/constants.qh"
9     #include "../common/teams.qh"
10     #include "../common/util.qh"
11     #include "../common/weapons/all.qh"
12     #include "weapons/accuracy.qh"
13     #include "weapons/csqcprojectile.qh"
14     #include "weapons/selection.qh"
15     #include "../common/t_items.qh"
16     #include "autocvars.qh"
17     #include "constants.qh"
18     #include "defs.qh"
19     #include "../common/notifications/all.qh"
20     #include "../common/deathtypes/all.qh"
21     #include "mutators/all.qh"
22     #include "../common/turrets/sv_turrets.qh"
23     #include "../common/vehicles/all.qh"
24     #include "../lib/csqcmodel/sv_model.qh"
25     #include "../common/playerstats.qh"
26     #include "g_hook.qh"
27     #include "scores.qh"
28     #include "spawnpoints.qh"
29 #endif
30
31 .float dmg;
32 .float dmg_edge;
33 .float dmg_force;
34 .float dmg_radius;
35
36 bool Damage_DamageInfo_SendEntity(entity this, entity to, int sf);
37
38 void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, int deathtype, float bloodtype, entity dmgowner);
39
40 float checkrules_firstblood;
41
42 float yoda;
43 float damage_goodhits;
44 float damage_gooddamage;
45
46 .float dmg_team;
47 .float teamkill_complain;
48 .float teamkill_soundtime;
49 .entity teamkill_soundsource;
50 .entity pusher;
51 .float istypefrag;
52 .float taunt_soundtime;
53
54 float IsFlying(entity a);
55
56 void UpdateFrags(entity player, float f);
57
58 // NOTE: f=0 means still count as a (positive) kill, but count no frags for it
59 void W_SwitchWeapon_Force(entity e, Weapon w);
60 entity GiveFrags_randomweapons;
61 void GiveFrags (entity attacker, entity targ, float f, int deathtype);
62
63 string AppendItemcodes(string s, entity player);
64
65 void LogDeath(string mode, int deathtype, entity killer, entity killed);
66
67 void Obituary_SpecialDeath(
68         entity notif_target,
69         float murder,
70         int deathtype,
71         string s1, string s2, string s3,
72         float f1, float f2, float f3);
73
74 float w_deathtype;
75 float Obituary_WeaponDeath(
76         entity notif_target,
77         float murder,
78         int deathtype,
79         string s1, string s2, string s3,
80         float f1, float f2);
81
82 void Obituary(entity attacker, entity inflictor, entity targ, int deathtype);
83
84 void Ice_Think();
85
86 void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypoint);
87
88 void Unfreeze (entity targ);
89
90 // these are updated by each Damage call for use in button triggering and such
91 entity damage_targ;
92 entity damage_inflictor;
93 entity damage_attacker;
94
95 void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force);
96
97 float RadiusDamage_running;
98 float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector inflictorvelocity, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float inflictorselfdamage, float forceintensity, int deathtype, entity directhitentity);
99         // Returns total damage applies to creatures
100
101 float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, entity directhitentity);
102
103 .float fire_damagepersec;
104 .float fire_endtime;
105 .float fire_deathtype;
106 .entity fire_owner;
107 .float fire_hitsound;
108 .entity fire_burner;
109
110 void fireburner_think();
111
112 float Fire_IsBurning(entity e);
113
114 float Fire_AddDamage(entity e, entity o, float d, float t, float dt);
115
116 void Fire_ApplyDamage(entity e);
117
118 void Fire_ApplyEffect(entity e);
119
120 void fireburner_think();
121 #endif