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