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