4 REGISTER_NET_TEMP(TE_CSQC_PICTURE)
5 REGISTER_NET_TEMP(TE_CSQC_RACE)
6 REGISTER_NET_TEMP(TE_CSQC_TEAMNAGGER)
7 REGISTER_NET_TEMP(TE_CSQC_PINGPLREPORT)
8 REGISTER_NET_TEMP(TE_CSQC_WEAPONCOMPLAIN)
9 REGISTER_NET_TEMP(TE_CSQC_VEHICLESETUP)
11 const int RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
12 const int RACE_NET_CHECKPOINT_CLEAR = 1;
13 const int RACE_NET_CHECKPOINT_NEXT_QUALIFYING = 2; // byte nextcheckpoint, short recordtime, string recordholder
14 const int RACE_NET_CHECKPOINT_HIT_RACE = 3; // byte checkpoint, short delta, byte lapsdelta, string opponent
15 const int RACE_NET_CHECKPOINT_HIT_RACE_BY_OPPONENT = 4; // byte checkpoint, short delta, byte lapsdelta, string opponent
16 const int RACE_NET_CHECKPOINT_NEXT_SPEC_QUALIFYING = 5; // byte nextcheckpoint, float laptime, short recordtime, string recordholder
17 const int RACE_NET_PENALTY_RACE = 6; // byte penaltytime, string reason
18 const int RACE_NET_PENALTY_QUALIFYING = 7; // byte penaltytime, string reason
19 const int RACE_NET_SERVER_RECORD = 8; // server record, sent to client
20 const int RACE_NET_SPEED_AWARD = 9; // speed award, sent to client
21 const int RACE_NET_SPEED_AWARD_BEST = 10; // all time best speed award, sent to client
22 const int RACE_NET_SERVER_RANKINGS = 11;
23 const int RACE_NET_SERVER_STATUS = 12;
24 const int RANKINGS_CNT = 15;
26 REGISTER_NET_LINKED(_ENT_CLIENT_INIT)
28 NET_HANDLE(_ENT_CLIENT_INIT, bool isnew) { make_pure(this); return true; }
30 /** Sent as a temp entity from a persistent linked entity */
31 REGISTER_NET_TEMP(ENT_CLIENT_INIT)
33 REGISTER_NET_LINKED(ENT_CLIENT_SCORES_INFO)
34 REGISTER_NET_LINKED(ENT_CLIENT_SCORES)
35 REGISTER_NET_LINKED(ENT_CLIENT_TEAMSCORES)
36 REGISTER_NET_LINKED(ENT_CLIENT_NAGGER) // flags [votecalledvote]
37 REGISTER_NET_LINKED(ENT_CLIENT_RADARLINK) // flags [startorigin] [endorigin] [startcolor+16*endcolor]
38 REGISTER_NET_LINKED(ENT_CLIENT_PROJECTILE)
39 REGISTER_NET_LINKED(ENT_CLIENT_MAPVOTE)
40 REGISTER_NET_LINKED(ENT_CLIENT_CLIENTDATA)
41 REGISTER_NET_LINKED(ENT_CLIENT_RANDOMSEED)
42 REGISTER_NET_LINKED(ENT_CLIENT_ACCURACY)
43 REGISTER_NET_LINKED(ENT_CLIENT_ELIMINATEDPLAYERS)
45 REGISTER_NET_LINKED(ENT_CLIENT_MODEL)
47 REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE)
48 REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE_CAMERA)
49 REGISTER_NET_LINKED(ENT_CLIENT_WARPZONE_TELEPORTED)
51 REGISTER_NET_LINKED(ENT_CLIENT_ARC_BEAM)
52 REGISTER_NET_LINKED(ENT_CLIENT_HOOK)
53 REGISTER_NET_LINKED(ENT_CLIENT_TUBANOTE)
55 REGISTER_NET_LINKED(ENT_CLIENT_SPAWNPOINT)
56 REGISTER_NET_LINKED(ENT_CLIENT_SPAWNEVENT)
57 REGISTER_NET_LINKED(ENT_CLIENT_WALL)
59 const int SPRITERULE_DEFAULT = 0;
60 const int SPRITERULE_TEAMPLAY = 1;
61 const int SPRITERULE_SPECTATOR = 2;
63 ///////////////////////////
65 const int KEY_FORWARD = BIT(0);
66 const int KEY_BACKWARD = BIT(1);
67 const int KEY_LEFT = BIT(2);
68 const int KEY_RIGHT = BIT(3);
69 const int KEY_JUMP = BIT(4);
70 const int KEY_CROUCH = BIT(5);
71 const int KEY_ATCK = BIT(6);
72 const int KEY_ATCK2 = BIT(7);
74 ///////////////////////////
77 const int CVAR_SAVE = 1;
78 const int CVAR_NOTIFY = 2;
79 const int CVAR_READONLY = 4;
81 ///////////////////////////
82 // csqc communication stuff
84 const int HUD_NORMAL = 0;
85 const int HUD_BUMBLEBEE_GUN = 25;
87 // moved that here so the client knows the max.
88 // # of maps, I'll use arrays for them :P
89 const int MAPVOTE_COUNT = 30;
92 * Lower scores are better (e.g. suicides)
94 const int SFL_LOWER_IS_BETTER = BIT(0);
97 * Don't show zero values as scores
99 const int SFL_HIDE_ZERO = BIT(1);
102 * Allow a column to be hidden (do not automatically add it even if it is a sorting key)
104 const int SFL_ALLOW_HIDE = BIT(4);
107 * Display as a rank (with st, nd, rd, th suffix)
109 const int SFL_RANK = BIT(5);
112 * Display as mm:ss.s, value is stored as 10ths of a second (AND 0 is the worst possible value!)
114 const int SFL_TIME = BIT(6);
116 // not an extra constant yet
117 #define SFL_ZERO_IS_WORST SFL_TIME
120 * Scoring priority (NOTE: PRIMARY is used for fraglimit)
122 const int SFL_SORT_PRIO_SECONDARY = 4;
123 const int SFL_SORT_PRIO_PRIMARY = 8;
124 const int SFL_SORT_PRIO_MASK = 12;
130 #define MAX_TEAMSCORE 2
132 const int ST_SCORE = 0;
133 const int SP_KILLS = 0;
134 const int SP_DEATHS = 1;
135 const int SP_SUICIDES = 2;
136 const int SP_SCORE = 3;
137 const int SP_DMG = 10;
138 const int SP_DMGTAKEN = 11;
139 // game mode specific indices are not in common/, but in server/scores_rules.qc!
141 // WEAPONTODO: move this into separate/new projectile handling code // this sets sounds and other properties of the projectiles in csqc
142 const int PROJECTILE_ELECTRO = 1;
143 const int PROJECTILE_ROCKET = 2;
144 const int PROJECTILE_TAG = 3;
145 const int PROJECTILE_CRYLINK = 5;
146 const int PROJECTILE_ELECTRO_BEAM = 6;
147 const int PROJECTILE_GRENADE = 7;
148 const int PROJECTILE_GRENADE_BOUNCING = 8;
149 const int PROJECTILE_MINE = 9;
150 const int PROJECTILE_BLASTER = 10;
151 const int PROJECTILE_HLAC = 11;
152 const int PROJECTILE_SEEKER = 12;
153 const int PROJECTILE_FLAC = 13;
154 const int PROJECTILE_PORTO_RED = 14;
155 const int PROJECTILE_PORTO_BLUE = 15;
156 const int PROJECTILE_HOOKBOMB = 16;
157 const int PROJECTILE_HAGAR = 17;
158 const int PROJECTILE_HAGAR_BOUNCING = 18;
159 const int PROJECTILE_CRYLINK_BOUNCING = 20;
160 const int PROJECTILE_FIREBALL = 21;
161 const int PROJECTILE_FIREMINE = 22;
163 const int PROJECTILE_RAPTORCANNON = 24;
164 const int PROJECTILE_RAPTORBOMB = 25;
165 const int PROJECTILE_RAPTORBOMBLET = 26;
166 const int PROJECTILE_SPIDERROCKET = 27;
167 const int PROJECTILE_WAKIROCKET = 28;
168 const int PROJECTILE_WAKICANNON = 29;
170 const int PROJECTILE_BUMBLE_GUN = 30;
171 const int PROJECTILE_BUMBLE_BEAM = 31;
173 const int PROJECTILE_MAGE_SPIKE = 32;
174 const int PROJECTILE_SHAMBLER_LIGHTNING = 33;
176 const int PROJECTILE_ROCKETMINSTA_LASER = 34;
178 const int PROJECTILE_ARC_BOLT = 35;
180 // projectile IDs 40-50 reserved
182 const int PROJECTILE_RPC = 60;
184 const int SPECIES_HUMAN = 0;
185 const int SPECIES_ROBOT_SOLID = 1;
186 const int SPECIES_ALIEN = 2;
187 const int SPECIES_ANIMAL = 3;
188 const int SPECIES_ROBOT_RUSTY = 4;
189 const int SPECIES_ROBOT_SHINY = 5;
190 const int SPECIES_RESERVED = 15;
192 const int FRAGS_PLAYER = 0;
193 const int FRAGS_SPECTATOR = -666;
194 const int FRAGS_LMS_LOSER = -616;
195 const int FRAGS_PLAYER_NONSOLID = -616;
196 // we can use this frags value for both
199 const int WATERLEVEL_NONE = 0;
200 const int WATERLEVEL_WETFEET = 1;
201 const int WATERLEVEL_SWIMMING = 2;
202 const int WATERLEVEL_SUBMERGED = 3;
205 const int SERVERFLAG_ALLOW_FULLBRIGHT = 1;
206 const int SERVERFLAG_TEAMPLAY = 2;
207 const int SERVERFLAG_PLAYERSTATS = 4;
209 // FIXME/EXPLAINME: why? Mario: because
210 vector autocvar_sv_player_maxs = '16 16 45';
211 vector autocvar_sv_player_mins = '-16 -16 -24';
212 vector autocvar_sv_player_viewoffset = '0 0 20';
213 vector autocvar_sv_player_crouch_maxs = '16 16 25';
214 vector autocvar_sv_player_crouch_mins = '-16 -16 -24';
215 vector autocvar_sv_player_crouch_viewoffset = '0 0 20';
216 vector autocvar_sv_player_headsize = '24 24 12';
219 // a bit more constant
220 const vector PL_MAX_CONST = '16 16 45';
221 const vector PL_MIN_CONST = '-16 -16 -24';
224 const int SPAWN_PRIO_NEAR_TEAMMATE_FOUND = 200;
225 const int SPAWN_PRIO_NEAR_TEAMMATE_SAMETEAM = 100;
226 const int SPAWN_PRIO_RACE_PREVIOUS_SPAWN = 50;
227 const int SPAWN_PRIO_GOOD_DISTANCE = 10;
229 // gametype vote flags
230 const int GTV_FORBIDDEN = 0; // Cannot be voted
231 const int GTV_AVAILABLE = 1; // Can be voted
232 const int GTV_CUSTOM = 2; // Custom entry