]> icculus.org git repositories - divverent/nexuiz.git/blob - data/qcsrc/server/defs.qh
changed all te_ effects (except te_bloodshower) to pointparticles()
[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, g_runematch;
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, g_minstagib_invis_alpha;
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_frame;
72 .float fade_time;
73 .float fade_rate;
74
75 // player animation state
76 .float animstate_startframe;
77 .float animstate_numframes;
78 .float animstate_framerate;
79 .float animstate_starttime;
80 .float animstate_endtime;
81 .float animstate_override;
82 .float animstate_looping;
83
84 // player animation data for this model
85 // each vector is as follows:
86 // _x = startframe
87 // _y = numframes
88 // _z = framerate
89 .vector anim_die1; // player dies
90 .vector anim_die2; // player dies differently
91 .vector anim_draw; // player pulls out a weapon
92 .vector anim_duck; // player crouches (from idle to duckidle)
93 .vector anim_duckwalk; // player walking while crouching
94 .vector anim_duckjump; // player jumping from a crouch
95 .vector anim_duckidle; // player idling while crouching
96 .vector anim_idle; // player standing
97 .vector anim_jump; // player jump
98 .vector anim_pain1; // player flinches from pain
99 .vector anim_pain2; // player flinches from pain, differently
100 .vector anim_shoot; // player shoots
101 .vector anim_taunt; // player taunts others (FIXME: no code references this)
102 .vector anim_run; // player running forward
103 .vector anim_runbackwards; // player running backward
104 .vector anim_strafeleft; // player shuffling left quickly
105 .vector anim_straferight; // player shuffling right quickly
106 .vector anim_dead1; // player dead (must be identical to last frame of die1)
107 .vector anim_dead2; // player dead (must be identical to last frame of die2)
108 .vector anim_forwardright; // player running forward and right
109 .vector anim_forwardleft; // player running forward and left
110 .vector anim_backright; // player running backward and right
111 .vector anim_backleft; // player running back and left
112
113 void() player_setupanimsformodel;
114 void(vector anim, float looping, float override, float restart) player_setanim;
115
116 .string mdl;
117
118 .string playermodel;
119 .string playerskin;
120
121 .float  respawntime;
122 //.float        chasecam;
123
124 .float  damageforcescale;
125
126 //.float          gravity;
127
128 .float          dmg;
129
130 // for railgun damage (hitting multiple enemies)
131 .float railgunhit;
132 .float railgunhitsolidbackup;
133 .vector railgunhitloc;
134
135 .float          air_finished;
136 .float          dmgtime;
137
138 .float          killcount;
139 .float hitsound;
140
141 .float watersound_finished;
142 .float iscreature;
143 .vector oldvelocity;
144
145 .float pauseregen_finished;
146 .float pauserothealth_finished;
147 .float pauserotarmor_finished;
148 .string item_pickupsound;
149
150 // definitions for weaponsystem
151
152 .entity weaponentity;
153 .entity exteriorweaponentity;
154 .float switchweapon;
155 .float autoswitch;
156 float(float wpn, float wrequest) weapon_action;
157 float(entity cl, float wpn, float andammo, float complain) client_hasweapon;
158 void() w_clear;
159 void() w_ready;
160 // VorteX: standalone think for weapons, so normal think on weaponentity can be reserved by weaponflashes (which needs update even player dies)
161 .float weapon_nextthink;
162 .void() weapon_think;
163
164 //float PLAYER_WEAPONSELECTION_DELAY = );
165 float   PLAYER_WEAPONSELECTION_SPEED = 18;
166 vector  PLAYER_WEAPONSELECTION_RANGE = '0 20 -40';
167
168 // weapon states (self.weaponentity.state)
169 float WS_CLEAR                  = 0; // no weapon selected
170 float WS_RAISE                  = 1; // raise frame
171 float WS_DROP                   = 2; // deselecting frame
172 float WS_INUSE                  = 3; // fire state
173 float WS_READY                  = 4; // idle frame
174
175 // weapon requests
176 float WR_SETUP            = 1; // setup weapon data
177 float WR_THINK            = 2; // logic to run every frame
178 float WR_CHECKAMMO1       = 3; // checks ammo for weapon
179 float WR_CHECKAMMO2       = 4; // checks ammo for weapon
180 float WR_AIM              = 5; // runs bot aiming code for this weapon
181 float WR_PRECACHE         = 6; // precaches models/sounds used by this weapon
182 float WR_REGISTER         = 7; // send data about the weapon to the client self (for ClientConnect)
183
184 // Weapon indexes
185 float WEP_LASER                         = 1; // float   IT_LASER                                = 4096;
186 float WEP_SHOTGUN                       = 2; // float   IT_SHOTGUN                              = 1;
187 float WEP_UZI                           = 3; // float   IT_UZI                                  = 2;
188 float WEP_GRENADE_LAUNCHER      = 4; // float   IT_GRENADE_LAUNCHER             = 4;
189 float WEP_ELECTRO                       = 5; // float   IT_ELECTRO                              = 8;
190 float WEP_CRYLINK                       = 6; // float   IT_CRYLINK                              = 16;
191 float WEP_NEX                           = 7; // float   IT_NEX                                  = 32;
192 float WEP_HAGAR                         = 8; // float   IT_HAGAR                                = 64;
193 float WEP_ROCKET_LAUNCHER       = 9; // float   IT_ROCKET_LAUNCHER              = 128;
194
195 // For weapon cycling commands
196 float WEP_FIRST                         = 1;
197 float WEP_LAST                          = 9;
198
199 void(entity client, string s)   stuffcmd = #21;
200 void(entity client, string s)   sprint = #24;
201 vector(entity e, float sped)    aim = #44;
202 void(entity client, string s)   centerprint_builtin = #73;
203 void(entity e)                  setspawnparms = #78;
204 void(float to, float f)         WriteByte = #52;
205 void(float to, float f)         WriteChar = #53;
206 void(float to, float f)         WriteShort = #54;
207 void(float to, float f)         WriteLong = #55;
208 void(float to, float f)         WriteCoord = #56;
209 void(float to, float f)         WriteAngle = #57;
210 void(float to, string s)        WriteString     = #58;
211 void(float to, entity s)        WriteEntity     = #59;
212 .vector dest1, dest2;
213
214 float gameover;
215 float intermission_running;
216 float intermission_exittime;
217 float alreadychangedlevel;
218
219
220 .float runes;
221
222
223 .float welcomemessage_time;
224 .float version;
225
226 // stahl's voting
227 float votecalled;
228 string votecalledvote;
229 string votecalledvote_display;
230 float votecalledmaster;
231 entity votecaller;
232 float votefinished;
233 .float vote_master;
234 .float vote_next;
235 .float vote_vote;
236 void VoteThink();
237 string VoteParse();
238 float VoteAllowed(string vote);
239 void VoteReset();
240 void VoteAccept();
241 void VoteReject();
242 void VoteTimeout();
243 void VoteStop(entity stopper);
244 void VoteCount();
245
246 // Wazat's grappling hook
247 .entity         hook;
248 void GrapplingHookFrame();
249 void RemoveGrapplingHook(entity pl);
250 void SetGrappleHookBindings();
251 // hook impulses
252 float GRAPHOOK_FIRE             = 20;
253 float GRAPHOOK_RELEASE          = 21;
254 // (note: you can change the hook impulse #'s to whatever you please)
255 .float hook_time;
256
257 // Laser target for laser-guided weapons
258 .entity lasertarget;
259 .float laser_on;
260
261 // minstagib vars
262 .float jump_interval;    // laser refire
263
264 //swamp
265 .float in_swamp;              // bool
266 .entity swampslug;            // Uses this to release from swamp ("untouch" fix)
267
268 // footstep interval
269 .float nextstep;
270
271 .float ready;
272 #define RESTART_COUNTDOWN 10
273 float restart_countdown;
274
275 .float winning;
276 .float deaths;
277 .float jointime;
278
279 .float spawnshieldtime;
280
281 .float lms_nextcheck;
282 .float lms_traveled_distance;
283
284 .entity flagcarried;
285
286 .entity lastrocket;
287
288 .float playerid;
289 float playerid_last;
290 .float noalign;         // if set to 1, the item or spawnpoint won't be dropped to the floor
291
292 .vector spawnorigin;
293
294 .vector death_origin;
295 .vector killer_origin;
296
297 .float isdecor;
298
299 float default_player_alpha;
300 float default_weapon_alpha;
301
302 .float has_zoomed;
303
304 .float() customizeentityforclient;
305 .float cvar_cl_handicap;
306 .float cvar_cl_zoomfactor;
307 .float cvar_cl_zoomspeed;
308 .float cvar_cl_playerdetailreduction;
309 .float cvar_cl_nogibs;
310 .float cvar_scr_centertime;
311 .float cvar_cl_shownames;
312 .float cvar_cl_hidewaypoints;
313 .string cvar_g_nexuizversion;
314
315 .float version_nagtime;
316
317 #ifdef ALLOW_VARIABLE_LOD
318 .float modelindex_lod0;
319 .float modelindex_lod1;
320 .float modelindex_lod2;
321 #endif
322
323 #define NUM_JUMPPADSUSED 3
324 .float jumppadcount;
325 .entity jumppadsused[NUM_JUMPPADSUSED];
326
327 string gamemode_name;
328 float teams_matter;
329
330 float startitem_failed;
331
332 void DropFlag(entity flag);
333 void DropAllRunes(entity pl);
334
335
336 typedef .float floatfield;
337 floatfield Item_CounterField(float it);
338 float Item_WeaponCode(float it);
339 void Item_SpawnByItemCode(float it);
340
341 float W_AmmoItemCode(float wpn);
342 float W_ItemCode(float wpn);
343 string W_Name(float weaponid);
344
345 void UpdateSelectedPlayer();
346 void ClearSelectedPlayer();
347 .entity selected_player;
348 .entity last_selected_player;
349 .float selected_player_time; // when this player has been selected
350 .float selected_player_count; // how long this player has been directly pointed to
351 .float selected_player_display_needs_update; // are regular updates necessary? (health)
352 .float selected_player_display_timeout; // when the selection will time out
353
354 void FixIntermissionClient(entity e);
355 void FixClientCvars(entity e);
356
357 float itemsInMap;
358
359 void centerprint_atprio(entity e, float prio, string s);
360 void centerprint_expire(entity e, float prio);
361 void centerprint(entity e, string s);
362
363 .float respawn_countdown; // next number to count
364
365 float bot_waypoints_for_items;
366
367 .float  attack_finished_for[WEP_LAST + 1];
368 .float attack_finished_single;
369 #define ATTACK_FINISHED(ent) ((ent).(attack_finished_for[(ent).weapon]))
370
371 // assault game mode: Which team is attacking in this round?
372 float assault_attacker_team;
373
374 // speedrun: when 1, player auto teleports back when capture timeout happens
375 .float speedrunning;
376
377 // Q3 support
378 .float notteam;
379 .float notsingle;
380 .float notfree;
381 .float notq3a;
382 float q3acompat_machineshotgunswap;
383
384 // database
385 float ServerProgsDB;
386
387 .float team_saved;