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