]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/g_damage.qh
Merge branch 'master' into terencehill/min_spec_time
[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 <server/defs.qh>
7     #include <server/miscfunctions.qh>
8     #include <lib/warpzone/common.qh>
9     #include <common/constants.qh>
10     #include <common/teams.qh>
11     #include <common/util.qh>
12     #include <common/weapons/_all.qh>
13     #include "weapons/accuracy.qh"
14     #include "weapons/csqcprojectile.qh"
15     #include "weapons/selection.qh"
16     #include <common/t_items.qh>
17     #include "autocvars.qh"
18     #include "constants.qh"
19     #include "defs.qh"
20     #include <common/notifications/all.qh>
21     #include <common/deathtypes/all.qh>
22     #include "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>
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 bool Damage_DamageInfo_SendEntity(entity this, entity to, int sf);
38
39 void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, int 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, int f);
58
59 // NOTE: f=0 means still count as a (positive) kill, but count no frags for it
60 void W_SwitchWeapon_Force(Player this, Weapon w, .entity weaponentity);
61 entity GiveFrags_randomweapons;
62 void GiveFrags (entity attacker, entity targ, float f, int deathtype, .entity weaponentity);
63
64 string AppendItemcodes(string s, entity player);
65
66 void LogDeath(string mode, int deathtype, entity killer, entity killed);
67
68 void Obituary_SpecialDeath(
69         entity notif_target,
70         float murder,
71         int 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         int deathtype,
80         string s1, string s2, string s3,
81         float f1, float f2);
82
83 void Obituary(entity attacker, entity inflictor, entity targ, int deathtype, .entity weaponentity);
84
85 void Ice_Think(entity this);
86
87 void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypoint);
88
89 void Unfreeze (entity targ);
90
91 // NOTE: the .weaponentity parameter can be set to DMG_NOWEP if the attack wasn't caused by a weapon or player
92 void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force);
93
94 float RadiusDamage_running;
95 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 weaponentity, entity directhitentity);
96         // Returns total damage applies to creatures
97
98 float RadiusDamage (entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, .entity weaponentity, entity directhitentity);
99
100 .float fire_damagepersec;
101 .float fire_endtime;
102 .float fire_deathtype;
103 .entity fire_owner;
104 .float fire_hitsound;
105 .entity fire_burner;
106
107 void fireburner_think(entity this);
108
109 float Fire_IsBurning(entity e);
110
111 float Fire_AddDamage(entity e, entity o, float d, float t, float dt);
112
113 void Fire_ApplyDamage(entity e);
114
115 void Fire_ApplyEffect(entity e);