]> icculus.org git repositories - divverent/nexuiz.git/blob - data/qcsrc/server/defs.qh
latch the mutator cvars too
[divverent/nexuiz.git] / data / qcsrc / server / defs.qh
1 // Globals
2
3 float g_domination, g_ctf, g_tdm, g_keyhunt, g_onslaught, g_assault, g_arena, g_lms;
4 float g_cloaked, g_footsteps, g_grappling_hook, g_instagib, g_laserguided_missile, g_midair, g_minstagib, g_nixnex, g_nixnex_with_laser, g_norecoil, g_rocketarena, g_vampire;
5
6 float sv_cheats;
7
8 entity  activator;
9 string  string_null;
10
11 float player_count;
12 float currentbots;
13 float bots_would_leave;
14 float lms_lowest_lives;
15 float lms_next_place;
16 float() LMS_NewPlayerLives;
17
18 void(entity player, float f) UpdateFrags;
19 .float totalfrags;
20
21 float team1_score, team2_score, team3_score, team4_score;
22
23 float maxclients;
24
25 #define NEWLINES "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
26
27 // Fields
28
29 .void(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force) event_damage;
30
31 //.string       wad;
32 //.string       map;
33
34 //.float        worldtype;
35 .float  delay;
36 .float  wait;
37 .float  lip;
38 //.float        light_lev;
39 .float  speed;
40 //.float        style;
41 //.float        skill;
42 .float  sounds;
43
44 .string killtarget;
45
46 .vector pos1, pos2;
47 .vector mangle;
48
49 .float  pain_finished;                  //Added by Supajoe
50 .float  pain_frame;                     //"
51 .float  statdraintime;                  // record the one-second intervals between draining health and armour when they're over 100
52 .float  crouch; // Crouching or not?
53
54 .float  strength_finished;
55 //.float        speed_finished;
56 .float  invincible_finished;
57 //.float        slowmo_finished;
58
59 .vector         finaldest, finalangle;          //plat.qc stuff
60 .void()         think1;
61 .float state;
62 .float          t_length, t_width;
63
64 .vector destvec;                // for rain
65 .float cnt;             // for rain
66 .float count;
67 //.float cnt2;
68
69 .float play_time;
70 .float death_time;
71 .float dead_time;
72 .float dead_frame;
73 .float die_frame;
74 .float fade_time;
75 .float fade_rate;
76
77 .string mdl;
78
79 .string playermodel;
80 .string playerskin;
81
82 .float  respawntime;
83 //.float        chasecam;
84
85 .float  damageforcescale;
86
87 //.float          gravity;
88
89 .float          dmg;
90
91 // for railgun damage (hitting multiple enemies)
92 .float railgunhit;
93 .float railgunhitsolidbackup;
94 .vector railgunhitloc;
95
96 .float          air_finished;
97 .float          dmgtime;
98
99 .float          killcount;
100 .float hitsound;
101
102 .float watersound_finished;
103 .float iscreature;
104 .vector oldvelocity;
105
106 .float pauseregen_finished;
107 .float pauserothealth_finished;
108 .float pauserotarmor_finished;
109 .string item_pickupsound;
110
111 // definitions for weaponsystem
112
113 .entity weaponentity;
114 .entity exteriorweaponentity;
115 .float switchweapon;
116 .float autoswitch;
117 float(float wpn, float wrequest) weapon_action;
118 float(entity cl, float wpn, float andammo, float complain) client_hasweapon;
119 void() w_clear;
120 void() w_ready;
121 // VorteX: standalone think for weapons, so normal think on weaponentity can be reserved by weaponflashes (which needs update even player dies)
122 .float weapon_nextthink;
123 .void() weapon_think;
124 .float weapon_nextthink_lastframe;
125
126 //float PLAYER_WEAPONSELECTION_DELAY = );
127 float   PLAYER_WEAPONSELECTION_SPEED = 18;
128 vector  PLAYER_WEAPONSELECTION_RANGE = '0 20 -40';
129
130 // weapon states (self.weaponentity.state)
131 float WS_CLEAR                  = 0; // no weapon selected
132 float WS_RAISE                  = 1; // raise frame
133 float WS_DROP                   = 2; // deselecting frame
134 float WS_INUSE                  = 3; // fire state
135 float WS_READY                  = 4; // idle frame
136
137 // weapon requests
138 float WR_SETUP            = 1; // setup weapon data
139 float WR_THINK            = 2; // logic to run every frame
140 float WR_CHECKAMMO1       = 3; // checks ammo for weapon
141 float WR_CHECKAMMO2       = 4; // checks ammo for weapon
142 float WR_AIM              = 5; // runs bot aiming code for this weapon
143 float WR_PRECACHE         = 6; // precaches models/sounds used by this weapon
144 float WR_REGISTER         = 7; // send data about the weapon to the client self (for ClientConnect)
145
146 // Weapon indexes
147 float WEP_LASER                         = 1; // float   IT_LASER                                = 4096;
148 float WEP_SHOTGUN                       = 2; // float   IT_SHOTGUN                              = 1;
149 float WEP_UZI                           = 3; // float   IT_UZI                                  = 2;
150 float WEP_GRENADE_LAUNCHER      = 4; // float   IT_GRENADE_LAUNCHER             = 4;
151 float WEP_ELECTRO                       = 5; // float   IT_ELECTRO                              = 8;
152 float WEP_CRYLINK                       = 6; // float   IT_CRYLINK                              = 16;
153 float WEP_NEX                           = 7; // float   IT_NEX                                  = 32;
154 float WEP_HAGAR                         = 8; // float   IT_HAGAR                                = 64;
155 float WEP_ROCKET_LAUNCHER       = 9; // float   IT_ROCKET_LAUNCHER              = 128;
156
157 // For weapon cycling commands
158 float WEP_FIRST                         = 1;
159 float WEP_LAST                          = 9;
160
161 void(entity client, string s)   stuffcmd = #21;
162 void(entity client, string s)   sprint = #24;
163 vector(entity e, float sped)    aim = #44;
164 void(entity client, string s)   centerprint_builtin = #73;
165 void(entity e)                  setspawnparms = #78;
166 void(float to, float f)         WriteByte = #52;
167 void(float to, float f)         WriteChar = #53;
168 void(float to, float f)         WriteShort = #54;
169 void(float to, float f)         WriteLong = #55;
170 void(float to, float f)         WriteCoord = #56;
171 void(float to, float f)         WriteAngle = #57;
172 void(float to, string s)        WriteString     = #58;
173 void(float to, entity s)        WriteEntity     = #59;
174 .vector dest1, dest2;
175
176 float gameover;
177 float intermission_running;
178 float intermission_exittime;
179 float alreadychangedlevel;
180
181
182 .float runes;
183
184
185 .float welcomemessage_time;
186 .float version;
187
188 // stahl's voting
189 float votecalled;
190 string votecalledvote;
191 string votecalledvote_display;
192 float votecalledmaster;
193 entity votecaller;
194 float votefinished;
195 .float vote_master;
196 .float vote_next;
197 .float vote_vote;
198 void VoteThink();
199 string VoteParse();
200 float VoteAllowed(string vote);
201 void VoteReset();
202 void VoteAccept();
203 void VoteReject();
204 void VoteTimeout();
205 void VoteStop(entity stopper);
206 void VoteCount();
207
208 // Wazat's grappling hook
209 .entity         hook;
210 void GrapplingHookFrame();
211 void RemoveGrapplingHook(entity pl);
212 void SetGrappleHookBindings();
213 // hook impulses
214 float GRAPHOOK_FIRE             = 20;
215 float GRAPHOOK_RELEASE          = 21;
216 // (note: you can change the hook impulse #'s to whatever you please)
217 .float hook_time;
218
219 // Laser target for laser-guided weapons
220 .entity lasertarget;
221 .float laser_on;
222
223 // minstagib vars
224 .float jump_interval;    // laser refire
225
226 //swamp
227 .float in_swamp;              // bool
228 .entity swampslug;            // Uses this to release from swamp ("untouch" fix)
229
230 // footstep interval
231 .float nextstep;
232
233 .float ready;
234
235 .float winning;
236 .float deaths;
237 .float jointime;
238
239 .float spawnshieldtime;
240
241 .float lms_nextcheck;
242 .float lms_traveled_distance;
243
244 .entity flagcarried;
245
246 .entity lastrocket;
247
248 .float playerid;
249 float playerid_last;
250 .float noalign;         // if set to 1, the item or spawnpoint won't be dropped to the floor
251
252 .vector spawnorigin;
253
254 .vector death_origin;
255 .vector killer_origin;
256
257 .float isdecor;
258
259 float default_player_alpha;
260 float default_weapon_alpha;
261
262 .float has_zoomed;
263
264 .float() customizeentityforclient;
265 .float cvar_cl_handicap;
266 .float cvar_cl_zoomfactor;
267 .float cvar_cl_zoomspeed;
268 .float cvar_cl_playerdetailreduction;
269 .float cvar_cl_nogibs;
270 .float cvar_scr_centertime;
271 .float cvar_cl_shownames;
272 .float cvar_cl_hidewaypoints;
273 .string cvar_g_nexuizversion;
274
275 .float version_nagtime;
276
277 #ifdef ALLOW_VARIABLE_LOD
278 .float modelindex_lod0;
279 .float modelindex_lod1;
280 .float modelindex_lod2;
281 #endif
282
283 #define NUM_JUMPPADSUSED 3
284 .float jumppadcount;
285 .entity jumppadsused[NUM_JUMPPADSUSED];
286
287 string gamemode_name;
288 float teams_matter;
289
290 float startitem_failed;
291
292 void DropFlag(entity flag);
293 void DropAllRunes(entity pl);
294
295
296 typedef .float floatfield;
297 floatfield Item_CounterField(float it);
298 float Item_WeaponCode(float it);
299 void Item_SpawnByItemCode(float it);
300
301 float W_AmmoItemCode(float wpn);
302 float W_ItemCode(float wpn);
303 string W_Name(float weaponid);
304
305 void UpdateSelectedPlayer();
306 void ClearSelectedPlayer();
307 .entity selected_player;
308 .entity last_selected_player;
309 .float selected_player_time; // when this player has been selected
310 .float selected_player_count; // how long this player has been directly pointed to
311 .float selected_player_display_needs_update; // are regular updates necessary? (health)
312 .float selected_player_display_timeout; // when the selection will time out
313
314 void FixIntermissionClient(entity e);
315 void FixClientCvars(entity e);
316
317 float itemsInMap;
318
319 void centerprint_atprio(entity e, float prio, string s);
320 void centerprint_expire(entity e, float prio);
321 void centerprint(entity e, string s);
322
323 .float respawn_countdown; // next number to count
324
325 float bot_waypoints_for_items;
326
327 .float  attack_finished_for[WEP_LAST + 1];
328 .float attack_finished_single;
329 #define ATTACK_FINISHED(ent) ((ent).(attack_finished_for[(ent).weapon]))
330
331 // assault game mode: Which team is attacking in this round?
332 float assault_attacker_team;