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