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