]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/server/defs.qh
Some more defs.qh cleanup, update gameplay hash
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / defs.qh
1 #pragma once
2
3 #include <common/weapons/_all.qh>
4 #include <common/stats.qh>
5
6 // Globals
7
8 float g_footsteps, g_grappling_hook;
9 float g_warmup_allguns;
10 float g_warmup_allow_timeout;
11 float warmup_stage;
12 float g_jetpack;
13
14 bool sv_ready_restart;
15 bool sv_ready_restart_after_countdown;
16 bool sv_ready_restart_repeatable;
17
18 float sv_clones;
19 float sv_foginterval;
20
21 // Fields
22
23 //.string       wad;
24 //.string       map;
25
26 //.float        worldtype;
27
28 .float  pain_finished;                  //Added by Supajoe
29 .float  pain_frame;                     //"
30
31 .float cnt; // used in too many places
32 .float count;
33 //.float cnt2;
34
35 .float fade_time;
36 .float fade_rate;
37
38 .string mdl;
39
40 .string playermodel;
41 .string playerskin;
42
43 .float species;
44
45 .float  scheduledrespawntime;
46 .float  respawntime;
47 .float  respawntimejitter;
48 .float  respawntimestart;
49 //.float        chasecam;
50
51 //.float          gravity;
52
53 .float          dmg;
54
55 // for railgun damage (hitting multiple enemies)
56 .bool railgunhit;
57 .float railgunhitsolidbackup;
58 .vector railgunhitloc;
59
60 .float          dmgtime;
61
62 .float          killcount;
63 .float damage_dealt, typehitsound, killsound;
64
65 // string overrides entity
66 .string item_pickupsound;
67 .entity item_pickupsound_ent;
68 .entity item_model_ent;
69
70 .float winning;
71
72 .float spawnshieldtime;
73
74 .int playerid;
75 .float noalign;         // if set to 1, the item or spawnpoint won't be dropped to the floor
76
77 .vector death_origin;
78
79 float default_player_alpha;
80 float default_weapon_alpha;
81
82 .int team_saved;
83
84 bool some_spawn_has_been_used;
85 int have_team_spawns; // 0 = no team spawns requested, -1 = team spawns requested but none found, 1 = team spawns requested and found
86 int have_team_spawns_forteams; // if Xth bit is 1 then team X has spawns else it has no spawns; team 0 is the "no-team"
87
88 .bool canteamdamage;
89
90 int autocvar__independent_players;
91 bool independent_players;
92 #define INDEPENDENT_PLAYERS (autocvar__independent_players ? (autocvar__independent_players > 0) : independent_players)
93 #define IS_INDEPENDENT_PLAYER(e) ((e).solid == SOLID_TRIGGER)
94 #define MAKE_INDEPENDENT_PLAYER(e) (((e).solid = SOLID_TRIGGER), ((e).frags = FRAGS_PLAYER_OUT_OF_GAME))
95
96 string clientstuff;
97 .float phase;
98 .int pressedkeys;
99
100 .string fog;
101
102 string cvar_changes;
103 string cvar_purechanges;
104 float cvar_purechanges_count;
105
106 //float game_starttime; //point in time when the countdown to game start is over
107 //float round_starttime; //point in time when the countdown to round start is over
108
109 .int projectiledeathtype;
110
111 .string message2;
112
113 // reset to 0 on weapon switch
114 // may be useful to all weapons
115 .float bulletcounter;
116
117 // Nexball
118 float g_nexball_meter_period;
119
120 .void(entity this) reset; // if set, an entity is reset using this
121 .void(entity this) reset2; // if set, an entity is reset using this (after calling ALL the reset functions for other entities)
122
123 .bool wasplayer;
124
125 string matchid;
126
127 bool radar_showenemies;
128
129 .int minelayer_mines;
130 .float vortex_charge;
131 .float vortex_charge_rottime;
132 .float vortex_chargepool_ammo;
133 .float oknex_charge;
134 .float oknex_charge_rottime;
135 .float oknex_chargepool_ammo;
136 .int hagar_load;
137
138 .int grab; // 0 = can't grab, 1 = owner can grab, 2 = owner and team mates can grab, 3 = anyone can grab
139
140 #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_CORPSE; (e).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE
141 // when doing this, hagar can go through clones
142 // #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_BBOX
143
144 .int spectatee_status;
145 .bool zoomstate;
146
147 .entity personal;
148
149 .bool just_joined;
150
151 .entity realowner;
152
153 //float serverflags;
154
155 .bool player_blocked;
156
157 ////
158
159 .WepSet dual_weapons;
160
161 IntrusiveList g_monsters;
162 IntrusiveList g_waypoints;
163 IntrusiveList g_vehicles;
164 IntrusiveList g_turrets;
165 IntrusiveList g_mines;
166 IntrusiveList g_projectiles;
167 IntrusiveList g_items;
168 IntrusiveList g_initforplayer;
169 IntrusiveList g_clones;
170 IntrusiveList g_spawnpoints;
171 IntrusiveList g_bot_targets;
172 IntrusiveList g_bot_dodge;
173 IntrusiveList g_damagedbycontents;
174 IntrusiveList g_railgunhit;
175 IntrusiveList g_ladders;
176 IntrusiveList g_locations;
177 IntrusiveList g_saved_team;
178 IntrusiveList g_monster_targets;
179 IntrusiveList g_pathlib_nodes;
180 IntrusiveList g_moveables;
181 STATIC_INIT(defs)
182 {
183         g_monsters = IL_NEW();
184         g_waypoints = IL_NEW();
185         g_vehicles = IL_NEW();
186         g_turrets = IL_NEW();
187         g_mines = IL_NEW();
188         g_projectiles = IL_NEW();
189         g_items = IL_NEW();
190         g_initforplayer = IL_NEW();
191         g_clones = IL_NEW();
192         g_spawnpoints = IL_NEW();
193         g_bot_targets = IL_NEW();
194         g_bot_dodge = IL_NEW();
195         g_damagedbycontents = IL_NEW();
196         g_railgunhit = IL_NEW();
197         g_ladders = IL_NEW();
198         g_locations = IL_NEW();
199         g_saved_team = IL_NEW();
200         g_monster_targets = IL_NEW();
201         g_pathlib_nodes = IL_NEW();
202         g_moveables = IL_NEW();
203 }