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