1 | #ifndef GAME_GENERATED_PROTOCOL_H |
2 | #define GAME_GENERATED_PROTOCOL_H |
3 | class CUnpacker; |
4 | #include <engine/message.h> |
5 | |
6 | #include <engine/shared/teehistorian_ex.h> |
7 | |
8 | enum |
9 | { |
10 | INPUT_STATE_MASK=0x3f |
11 | }; |
12 | |
13 | enum |
14 | { |
15 | TEAM_SPECTATORS=-1, |
16 | TEAM_RED, |
17 | TEAM_BLUE, |
18 | |
19 | FLAG_MISSING=-3, |
20 | FLAG_ATSTAND, |
21 | FLAG_TAKEN, |
22 | |
23 | SPEC_FREEVIEW=-1, |
24 | SPEC_FOLLOW=-2, |
25 | }; |
26 | |
27 | enum |
28 | { |
29 | GAMEINFO_CURVERSION=9, |
30 | }; |
31 | |
32 | enum |
33 | { |
34 | EMOTE_NORMAL, |
35 | EMOTE_PAIN, |
36 | EMOTE_HAPPY, |
37 | EMOTE_SURPRISE, |
38 | EMOTE_ANGRY, |
39 | EMOTE_BLINK, |
40 | NUM_EMOTES |
41 | }; |
42 | |
43 | enum |
44 | { |
45 | POWERUP_HEALTH, |
46 | POWERUP_ARMOR, |
47 | POWERUP_WEAPON, |
48 | POWERUP_NINJA, |
49 | POWERUP_ARMOR_SHOTGUN, |
50 | POWERUP_ARMOR_GRENADE, |
51 | POWERUP_ARMOR_NINJA, |
52 | POWERUP_ARMOR_LASER, |
53 | NUM_POWERUPS |
54 | }; |
55 | |
56 | enum |
57 | { |
58 | EMOTICON_OOP, |
59 | EMOTICON_EXCLAMATION, |
60 | EMOTICON_HEARTS, |
61 | EMOTICON_DROP, |
62 | EMOTICON_DOTDOT, |
63 | EMOTICON_MUSIC, |
64 | EMOTICON_SORRY, |
65 | EMOTICON_GHOST, |
66 | EMOTICON_SUSHI, |
67 | EMOTICON_SPLATTEE, |
68 | EMOTICON_DEVILTEE, |
69 | EMOTICON_ZOMG, |
70 | EMOTICON_ZZZ, |
71 | EMOTICON_WTF, |
72 | EMOTICON_EYES, |
73 | EMOTICON_QUESTION, |
74 | NUM_EMOTICONS |
75 | }; |
76 | |
77 | enum |
78 | { |
79 | AUTHED_NO, |
80 | AUTHED_HELPER, |
81 | AUTHED_MOD, |
82 | AUTHED_ADMIN, |
83 | NUM_AUTHEDS |
84 | }; |
85 | |
86 | enum |
87 | { |
88 | ENTITYCLASS_PROJECTILE, |
89 | ENTITYCLASS_DOOR, |
90 | ENTITYCLASS_DRAGGER_WEAK, |
91 | ENTITYCLASS_DRAGGER_NORMAL, |
92 | ENTITYCLASS_DRAGGER_STRONG, |
93 | ENTITYCLASS_GUN_NORMAL, |
94 | ENTITYCLASS_GUN_EXPLOSIVE, |
95 | ENTITYCLASS_GUN_FREEZE, |
96 | ENTITYCLASS_GUN_UNFREEZE, |
97 | ENTITYCLASS_LIGHT, |
98 | ENTITYCLASS_PICKUP, |
99 | NUM_ENTITYCLASSS |
100 | }; |
101 | |
102 | enum |
103 | { |
104 | LASERTYPE_RIFLE, |
105 | LASERTYPE_SHOTGUN, |
106 | LASERTYPE_DOOR, |
107 | LASERTYPE_FREEZE, |
108 | LASERTYPE_DRAGGER, |
109 | LASERTYPE_GUN, |
110 | LASERTYPE_PLASMA, |
111 | NUM_LASERTYPES |
112 | }; |
113 | |
114 | enum |
115 | { |
116 | LASERDRAGGERTYPE_WEAK, |
117 | LASERDRAGGERTYPE_WEAK_NW, |
118 | LASERDRAGGERTYPE_NORMAL, |
119 | LASERDRAGGERTYPE_NORMAL_NW, |
120 | LASERDRAGGERTYPE_STRONG, |
121 | LASERDRAGGERTYPE_STRONG_NW, |
122 | NUM_LASERDRAGGERTYPES |
123 | }; |
124 | |
125 | enum |
126 | { |
127 | LASERGUNTYPE_UNFREEZE, |
128 | LASERGUNTYPE_EXPLOSIVE, |
129 | LASERGUNTYPE_FREEZE, |
130 | LASERGUNTYPE_EXPFREEZE, |
131 | NUM_LASERGUNTYPES |
132 | }; |
133 | |
134 | enum |
135 | { |
136 | PLAYERFLAG_PLAYING = 1<<0, |
137 | = 1<<1, |
138 | PLAYERFLAG_CHATTING = 1<<2, |
139 | PLAYERFLAG_SCOREBOARD = 1<<3, |
140 | PLAYERFLAG_AIM = 1<<4, |
141 | }; |
142 | |
143 | enum |
144 | { |
145 | GAMEFLAG_TEAMS = 1<<0, |
146 | GAMEFLAG_FLAGS = 1<<1, |
147 | }; |
148 | |
149 | enum |
150 | { |
151 | GAMESTATEFLAG_GAMEOVER = 1<<0, |
152 | GAMESTATEFLAG_SUDDENDEATH = 1<<1, |
153 | GAMESTATEFLAG_PAUSED = 1<<2, |
154 | GAMESTATEFLAG_RACETIME = 1<<3, |
155 | }; |
156 | |
157 | enum |
158 | { |
159 | CHARACTERFLAG_SOLO = 1<<0, |
160 | CHARACTERFLAG_JETPACK = 1<<1, |
161 | CHARACTERFLAG_COLLISION_DISABLED = 1<<2, |
162 | CHARACTERFLAG_ENDLESS_HOOK = 1<<3, |
163 | CHARACTERFLAG_ENDLESS_JUMP = 1<<4, |
164 | CHARACTERFLAG_SUPER = 1<<5, |
165 | CHARACTERFLAG_HAMMER_HIT_DISABLED = 1<<6, |
166 | CHARACTERFLAG_SHOTGUN_HIT_DISABLED = 1<<7, |
167 | CHARACTERFLAG_GRENADE_HIT_DISABLED = 1<<8, |
168 | CHARACTERFLAG_LASER_HIT_DISABLED = 1<<9, |
169 | CHARACTERFLAG_HOOK_HIT_DISABLED = 1<<10, |
170 | CHARACTERFLAG_TELEGUN_GUN = 1<<11, |
171 | CHARACTERFLAG_TELEGUN_GRENADE = 1<<12, |
172 | CHARACTERFLAG_TELEGUN_LASER = 1<<13, |
173 | CHARACTERFLAG_WEAPON_HAMMER = 1<<14, |
174 | CHARACTERFLAG_WEAPON_GUN = 1<<15, |
175 | CHARACTERFLAG_WEAPON_SHOTGUN = 1<<16, |
176 | CHARACTERFLAG_WEAPON_GRENADE = 1<<17, |
177 | CHARACTERFLAG_WEAPON_LASER = 1<<18, |
178 | CHARACTERFLAG_WEAPON_NINJA = 1<<19, |
179 | CHARACTERFLAG_MOVEMENTS_DISABLED = 1<<20, |
180 | CHARACTERFLAG_IN_FREEZE = 1<<21, |
181 | CHARACTERFLAG_PRACTICE_MODE = 1<<22, |
182 | CHARACTERFLAG_LOCK_MODE = 1<<23, |
183 | }; |
184 | |
185 | enum |
186 | { |
187 | GAMEINFOFLAG_TIMESCORE = 1<<0, |
188 | GAMEINFOFLAG_GAMETYPE_RACE = 1<<1, |
189 | GAMEINFOFLAG_GAMETYPE_FASTCAP = 1<<2, |
190 | GAMEINFOFLAG_GAMETYPE_FNG = 1<<3, |
191 | GAMEINFOFLAG_GAMETYPE_DDRACE = 1<<4, |
192 | GAMEINFOFLAG_GAMETYPE_DDNET = 1<<5, |
193 | GAMEINFOFLAG_GAMETYPE_BLOCK_WORLDS = 1<<6, |
194 | GAMEINFOFLAG_GAMETYPE_VANILLA = 1<<7, |
195 | GAMEINFOFLAG_GAMETYPE_PLUS = 1<<8, |
196 | GAMEINFOFLAG_FLAG_STARTS_RACE = 1<<9, |
197 | GAMEINFOFLAG_RACE = 1<<10, |
198 | GAMEINFOFLAG_UNLIMITED_AMMO = 1<<11, |
199 | GAMEINFOFLAG_DDRACE_RECORD_MESSAGE = 1<<12, |
200 | GAMEINFOFLAG_RACE_RECORD_MESSAGE = 1<<13, |
201 | GAMEINFOFLAG_ALLOW_EYE_WHEEL = 1<<14, |
202 | GAMEINFOFLAG_ALLOW_HOOK_COLL = 1<<15, |
203 | GAMEINFOFLAG_ALLOW_ZOOM = 1<<16, |
204 | GAMEINFOFLAG_BUG_DDRACE_GHOST = 1<<17, |
205 | GAMEINFOFLAG_BUG_DDRACE_INPUT = 1<<18, |
206 | GAMEINFOFLAG_BUG_FNG_LASER_RANGE = 1<<19, |
207 | GAMEINFOFLAG_BUG_VANILLA_BOUNCE = 1<<20, |
208 | GAMEINFOFLAG_PREDICT_FNG = 1<<21, |
209 | GAMEINFOFLAG_PREDICT_DDRACE = 1<<22, |
210 | GAMEINFOFLAG_PREDICT_DDRACE_TILES = 1<<23, |
211 | GAMEINFOFLAG_PREDICT_VANILLA = 1<<24, |
212 | GAMEINFOFLAG_ENTITIES_DDNET = 1<<25, |
213 | GAMEINFOFLAG_ENTITIES_DDRACE = 1<<26, |
214 | GAMEINFOFLAG_ENTITIES_RACE = 1<<27, |
215 | GAMEINFOFLAG_ENTITIES_FNG = 1<<28, |
216 | GAMEINFOFLAG_ENTITIES_VANILLA = 1<<29, |
217 | GAMEINFOFLAG_DONT_MASK_ENTITIES = 1<<30, |
218 | GAMEINFOFLAG_ENTITIES_BW = 1<<31, |
219 | }; |
220 | |
221 | enum |
222 | { |
223 | GAMEINFOFLAG2_ALLOW_X_SKINS = 1<<0, |
224 | GAMEINFOFLAG2_GAMETYPE_CITY = 1<<1, |
225 | GAMEINFOFLAG2_GAMETYPE_FDDRACE = 1<<2, |
226 | GAMEINFOFLAG2_ENTITIES_FDDRACE = 1<<3, |
227 | GAMEINFOFLAG2_HUD_HEALTH_ARMOR = 1<<4, |
228 | GAMEINFOFLAG2_HUD_AMMO = 1<<5, |
229 | GAMEINFOFLAG2_HUD_DDRACE = 1<<6, |
230 | GAMEINFOFLAG2_NO_WEAK_HOOK = 1<<7, |
231 | GAMEINFOFLAG2_NO_SKIN_CHANGE_FOR_FROZEN = 1<<8, |
232 | }; |
233 | |
234 | enum |
235 | { |
236 | EXPLAYERFLAG_AFK = 1<<0, |
237 | EXPLAYERFLAG_PAUSED = 1<<1, |
238 | EXPLAYERFLAG_SPEC = 1<<2, |
239 | }; |
240 | |
241 | enum |
242 | { |
243 | LEGACYPROJECTILEFLAG_CLIENTID_BIT0 = 1<<0, |
244 | LEGACYPROJECTILEFLAG_CLIENTID_BIT1 = 1<<1, |
245 | LEGACYPROJECTILEFLAG_CLIENTID_BIT2 = 1<<2, |
246 | LEGACYPROJECTILEFLAG_CLIENTID_BIT3 = 1<<3, |
247 | LEGACYPROJECTILEFLAG_CLIENTID_BIT4 = 1<<4, |
248 | LEGACYPROJECTILEFLAG_CLIENTID_BIT5 = 1<<5, |
249 | LEGACYPROJECTILEFLAG_CLIENTID_BIT6 = 1<<6, |
250 | LEGACYPROJECTILEFLAG_CLIENTID_BIT7 = 1<<7, |
251 | LEGACYPROJECTILEFLAG_NO_OWNER = 1<<8, |
252 | LEGACYPROJECTILEFLAG_IS_DDNET = 1<<9, |
253 | LEGACYPROJECTILEFLAG_BOUNCE_HORIZONTAL = 1<<10, |
254 | LEGACYPROJECTILEFLAG_BOUNCE_VERTICAL = 1<<11, |
255 | LEGACYPROJECTILEFLAG_EXPLOSIVE = 1<<12, |
256 | LEGACYPROJECTILEFLAG_FREEZE = 1<<13, |
257 | }; |
258 | |
259 | enum |
260 | { |
261 | PROJECTILEFLAG_BOUNCE_HORIZONTAL = 1<<0, |
262 | PROJECTILEFLAG_BOUNCE_VERTICAL = 1<<1, |
263 | PROJECTILEFLAG_EXPLOSIVE = 1<<2, |
264 | PROJECTILEFLAG_FREEZE = 1<<3, |
265 | PROJECTILEFLAG_NORMALIZE_VEL = 1<<4, |
266 | }; |
267 | |
268 | enum |
269 | { |
270 | LASERFLAG_NO_PREDICT = 1<<0, |
271 | }; |
272 | |
273 | enum |
274 | { |
275 | NETOBJTYPE_EX, |
276 | NETOBJTYPE_PLAYERINPUT, |
277 | NETOBJTYPE_PROJECTILE, |
278 | NETOBJTYPE_LASER, |
279 | NETOBJTYPE_PICKUP, |
280 | NETOBJTYPE_FLAG, |
281 | NETOBJTYPE_GAMEINFO, |
282 | NETOBJTYPE_GAMEDATA, |
283 | NETOBJTYPE_CHARACTERCORE, |
284 | NETOBJTYPE_CHARACTER, |
285 | NETOBJTYPE_PLAYERINFO, |
286 | NETOBJTYPE_CLIENTINFO, |
287 | NETOBJTYPE_SPECTATORINFO, |
288 | NETEVENTTYPE_COMMON, |
289 | NETEVENTTYPE_EXPLOSION, |
290 | NETEVENTTYPE_SPAWN, |
291 | NETEVENTTYPE_HAMMERHIT, |
292 | NETEVENTTYPE_DEATH, |
293 | NETEVENTTYPE_SOUNDGLOBAL, |
294 | NETEVENTTYPE_SOUNDWORLD, |
295 | NETEVENTTYPE_DAMAGEIND, |
296 | NUM_NETOBJTYPES |
297 | }; |
298 | enum |
299 | { |
300 | __NETOBJTYPE_UUID_HELPER=OFFSET_GAME_UUID-1, |
301 | NETOBJTYPE_MYOWNOBJECT, |
302 | NETOBJTYPE_DDNETCHARACTER, |
303 | NETOBJTYPE_DDNETPLAYER, |
304 | NETOBJTYPE_GAMEINFOEX, |
305 | NETOBJTYPE_DDRACEPROJECTILE, |
306 | NETOBJTYPE_DDNETLASER, |
307 | NETOBJTYPE_DDNETPROJECTILE, |
308 | NETOBJTYPE_DDNETPICKUP, |
309 | NETOBJTYPE_MYOWNEVENT, |
310 | NETOBJTYPE_SPECCHAR, |
311 | NETOBJTYPE_SWITCHSTATE, |
312 | NETOBJTYPE_ENTITYEX, |
313 | OFFSET_NETMSGTYPE_UUID |
314 | }; |
315 | |
316 | enum |
317 | { |
318 | NETMSGTYPE_EX, |
319 | NETMSGTYPE_SV_MOTD, |
320 | NETMSGTYPE_SV_BROADCAST, |
321 | NETMSGTYPE_SV_CHAT, |
322 | NETMSGTYPE_SV_KILLMSG, |
323 | NETMSGTYPE_SV_SOUNDGLOBAL, |
324 | NETMSGTYPE_SV_TUNEPARAMS, |
325 | NETMSGTYPE_UNUSED, |
326 | NETMSGTYPE_SV_READYTOENTER, |
327 | NETMSGTYPE_SV_WEAPONPICKUP, |
328 | NETMSGTYPE_SV_EMOTICON, |
329 | NETMSGTYPE_SV_VOTECLEAROPTIONS, |
330 | NETMSGTYPE_SV_VOTEOPTIONLISTADD, |
331 | NETMSGTYPE_SV_VOTEOPTIONADD, |
332 | NETMSGTYPE_SV_VOTEOPTIONREMOVE, |
333 | NETMSGTYPE_SV_VOTESET, |
334 | NETMSGTYPE_SV_VOTESTATUS, |
335 | NETMSGTYPE_CL_SAY, |
336 | NETMSGTYPE_CL_SETTEAM, |
337 | NETMSGTYPE_CL_SETSPECTATORMODE, |
338 | NETMSGTYPE_CL_STARTINFO, |
339 | NETMSGTYPE_CL_CHANGEINFO, |
340 | NETMSGTYPE_CL_KILL, |
341 | NETMSGTYPE_CL_EMOTICON, |
342 | NETMSGTYPE_CL_VOTE, |
343 | NETMSGTYPE_CL_CALLVOTE, |
344 | NETMSGTYPE_CL_ISDDNETLEGACY, |
345 | NETMSGTYPE_SV_DDRACETIMELEGACY, |
346 | NETMSGTYPE_SV_RECORDLEGACY, |
347 | NETMSGTYPE_UNUSED2, |
348 | NETMSGTYPE_SV_TEAMSSTATELEGACY, |
349 | NETMSGTYPE_CL_SHOWOTHERSLEGACY, |
350 | NUM_NETMSGTYPES |
351 | }; |
352 | |
353 | enum |
354 | { |
355 | __NETMSGTYPE_UUID_HELPER=OFFSET_NETMSGTYPE_UUID-1, |
356 | NETMSGTYPE_SV_MYOWNMESSAGE, |
357 | NETMSGTYPE_CL_SHOWDISTANCE, |
358 | NETMSGTYPE_CL_SHOWOTHERS, |
359 | NETMSGTYPE_SV_TEAMSSTATE, |
360 | NETMSGTYPE_SV_DDRACETIME, |
361 | NETMSGTYPE_SV_RECORD, |
362 | NETMSGTYPE_SV_KILLMSGTEAM, |
363 | NETMSGTYPE_SV_YOURVOTE, |
364 | NETMSGTYPE_SV_RACEFINISH, |
365 | NETMSGTYPE_SV_COMMANDINFO, |
366 | NETMSGTYPE_SV_COMMANDINFOREMOVE, |
367 | NETMSGTYPE_SV_VOTEOPTIONGROUPSTART, |
368 | NETMSGTYPE_SV_VOTEOPTIONGROUPEND, |
369 | NETMSGTYPE_SV_COMMANDINFOGROUPSTART, |
370 | NETMSGTYPE_SV_COMMANDINFOGROUPEND, |
371 | NETMSGTYPE_SV_CHANGEINFOCOOLDOWN, |
372 | OFFSET_MAPITEMTYPE_UUID |
373 | }; |
374 | |
375 | struct CNetObj_PlayerInput |
376 | { |
377 | static constexpr int ms_MsgId = NETOBJTYPE_PLAYERINPUT; |
378 | int m_Direction; |
379 | int m_TargetX; |
380 | int m_TargetY; |
381 | int m_Jump; |
382 | int m_Fire; |
383 | int m_Hook; |
384 | int m_PlayerFlags; |
385 | int m_WantedWeapon; |
386 | int m_NextWeapon; |
387 | int m_PrevWeapon; |
388 | }; |
389 | |
390 | struct CNetObj_Projectile |
391 | { |
392 | static constexpr int ms_MsgId = NETOBJTYPE_PROJECTILE; |
393 | int m_X; |
394 | int m_Y; |
395 | int m_VelX; |
396 | int m_VelY; |
397 | int m_Type; |
398 | int m_StartTick; |
399 | }; |
400 | |
401 | struct CNetObj_Laser |
402 | { |
403 | static constexpr int ms_MsgId = NETOBJTYPE_LASER; |
404 | int m_X; |
405 | int m_Y; |
406 | int m_FromX; |
407 | int m_FromY; |
408 | int m_StartTick; |
409 | }; |
410 | |
411 | struct CNetObj_Pickup |
412 | { |
413 | static constexpr int ms_MsgId = NETOBJTYPE_PICKUP; |
414 | int m_X; |
415 | int m_Y; |
416 | int m_Type; |
417 | int m_Subtype; |
418 | }; |
419 | |
420 | struct CNetObj_Flag |
421 | { |
422 | static constexpr int ms_MsgId = NETOBJTYPE_FLAG; |
423 | int m_X; |
424 | int m_Y; |
425 | int m_Team; |
426 | }; |
427 | |
428 | struct CNetObj_GameInfo |
429 | { |
430 | static constexpr int ms_MsgId = NETOBJTYPE_GAMEINFO; |
431 | int m_GameFlags; |
432 | int m_GameStateFlags; |
433 | int m_RoundStartTick; |
434 | int m_WarmupTimer; |
435 | int m_ScoreLimit; |
436 | int m_TimeLimit; |
437 | int m_RoundNum; |
438 | int m_RoundCurrent; |
439 | }; |
440 | |
441 | struct CNetObj_GameData |
442 | { |
443 | static constexpr int ms_MsgId = NETOBJTYPE_GAMEDATA; |
444 | int m_TeamscoreRed; |
445 | int m_TeamscoreBlue; |
446 | int m_FlagCarrierRed; |
447 | int m_FlagCarrierBlue; |
448 | }; |
449 | |
450 | struct CNetObj_CharacterCore |
451 | { |
452 | static constexpr int ms_MsgId = NETOBJTYPE_CHARACTERCORE; |
453 | int m_Tick; |
454 | int m_X; |
455 | int m_Y; |
456 | int m_VelX; |
457 | int m_VelY; |
458 | int m_Angle; |
459 | int m_Direction; |
460 | int m_Jumped; |
461 | int m_HookedPlayer; |
462 | int m_HookState; |
463 | int m_HookTick; |
464 | int m_HookX; |
465 | int m_HookY; |
466 | int m_HookDx; |
467 | int m_HookDy; |
468 | }; |
469 | |
470 | struct CNetObj_Character : public CNetObj_CharacterCore |
471 | { |
472 | static constexpr int ms_MsgId = NETOBJTYPE_CHARACTER; |
473 | int m_PlayerFlags; |
474 | int m_Health; |
475 | int m_Armor; |
476 | int m_AmmoCount; |
477 | int m_Weapon; |
478 | int m_Emote; |
479 | int m_AttackTick; |
480 | }; |
481 | |
482 | struct CNetObj_PlayerInfo |
483 | { |
484 | static constexpr int ms_MsgId = NETOBJTYPE_PLAYERINFO; |
485 | int m_Local; |
486 | int m_ClientId; |
487 | int m_Team; |
488 | int m_Score; |
489 | int m_Latency; |
490 | }; |
491 | |
492 | struct CNetObj_ClientInfo |
493 | { |
494 | static constexpr int ms_MsgId = NETOBJTYPE_CLIENTINFO; |
495 | int m_Name0; |
496 | int m_Name1; |
497 | int m_Name2; |
498 | int m_Name3; |
499 | int m_Clan0; |
500 | int m_Clan1; |
501 | int m_Clan2; |
502 | int m_Country; |
503 | int m_Skin0; |
504 | int m_Skin1; |
505 | int m_Skin2; |
506 | int m_Skin3; |
507 | int m_Skin4; |
508 | int m_Skin5; |
509 | int m_UseCustomColor; |
510 | int m_ColorBody; |
511 | int m_ColorFeet; |
512 | }; |
513 | |
514 | struct CNetObj_SpectatorInfo |
515 | { |
516 | static constexpr int ms_MsgId = NETOBJTYPE_SPECTATORINFO; |
517 | int m_SpectatorId; |
518 | int m_X; |
519 | int m_Y; |
520 | }; |
521 | |
522 | struct CNetObj_MyOwnObject |
523 | { |
524 | static constexpr int ms_MsgId = NETOBJTYPE_MYOWNOBJECT; |
525 | int m_Test; |
526 | }; |
527 | |
528 | struct CNetObj_DDNetCharacter |
529 | { |
530 | static constexpr int ms_MsgId = NETOBJTYPE_DDNETCHARACTER; |
531 | int m_Flags; |
532 | int m_FreezeEnd; |
533 | int m_Jumps; |
534 | int m_TeleCheckpoint; |
535 | int m_StrongWeakId; |
536 | int m_JumpedTotal; |
537 | int m_NinjaActivationTick; |
538 | int m_FreezeStart; |
539 | int m_TargetX; |
540 | int m_TargetY; |
541 | }; |
542 | |
543 | struct CNetObj_DDNetPlayer |
544 | { |
545 | static constexpr int ms_MsgId = NETOBJTYPE_DDNETPLAYER; |
546 | int m_Flags; |
547 | int m_AuthLevel; |
548 | }; |
549 | |
550 | struct CNetObj_GameInfoEx |
551 | { |
552 | static constexpr int ms_MsgId = NETOBJTYPE_GAMEINFOEX; |
553 | int m_Flags; |
554 | int m_Version; |
555 | int m_Flags2; |
556 | }; |
557 | |
558 | struct CNetObj_DDRaceProjectile |
559 | { |
560 | static constexpr int ms_MsgId = NETOBJTYPE_DDRACEPROJECTILE; |
561 | int m_X; |
562 | int m_Y; |
563 | int m_Angle; |
564 | int m_Data; |
565 | int m_Type; |
566 | int m_StartTick; |
567 | }; |
568 | |
569 | struct CNetObj_DDNetLaser |
570 | { |
571 | static constexpr int ms_MsgId = NETOBJTYPE_DDNETLASER; |
572 | int m_ToX; |
573 | int m_ToY; |
574 | int m_FromX; |
575 | int m_FromY; |
576 | int m_StartTick; |
577 | int m_Owner; |
578 | int m_Type; |
579 | int m_SwitchNumber; |
580 | int m_Subtype; |
581 | int m_Flags; |
582 | }; |
583 | |
584 | struct CNetObj_DDNetProjectile |
585 | { |
586 | static constexpr int ms_MsgId = NETOBJTYPE_DDNETPROJECTILE; |
587 | int m_X; |
588 | int m_Y; |
589 | int m_VelX; |
590 | int m_VelY; |
591 | int m_Type; |
592 | int m_StartTick; |
593 | int m_Owner; |
594 | int m_SwitchNumber; |
595 | int m_TuneZone; |
596 | int m_Flags; |
597 | }; |
598 | |
599 | struct CNetObj_DDNetPickup |
600 | { |
601 | static constexpr int ms_MsgId = NETOBJTYPE_DDNETPICKUP; |
602 | int m_X; |
603 | int m_Y; |
604 | int m_Type; |
605 | int m_Subtype; |
606 | int m_SwitchNumber; |
607 | }; |
608 | |
609 | struct CNetEvent_Common |
610 | { |
611 | static constexpr int ms_MsgId = NETEVENTTYPE_COMMON; |
612 | int m_X; |
613 | int m_Y; |
614 | }; |
615 | |
616 | struct CNetEvent_Explosion : public CNetEvent_Common |
617 | { |
618 | static constexpr int ms_MsgId = NETEVENTTYPE_EXPLOSION; |
619 | }; |
620 | |
621 | struct CNetEvent_Spawn : public CNetEvent_Common |
622 | { |
623 | static constexpr int ms_MsgId = NETEVENTTYPE_SPAWN; |
624 | }; |
625 | |
626 | struct CNetEvent_HammerHit : public CNetEvent_Common |
627 | { |
628 | static constexpr int ms_MsgId = NETEVENTTYPE_HAMMERHIT; |
629 | }; |
630 | |
631 | struct CNetEvent_Death : public CNetEvent_Common |
632 | { |
633 | static constexpr int ms_MsgId = NETEVENTTYPE_DEATH; |
634 | int m_ClientId; |
635 | }; |
636 | |
637 | struct CNetEvent_SoundGlobal : public CNetEvent_Common |
638 | { |
639 | static constexpr int ms_MsgId = NETEVENTTYPE_SOUNDGLOBAL; |
640 | int m_SoundId; |
641 | }; |
642 | |
643 | struct CNetEvent_SoundWorld : public CNetEvent_Common |
644 | { |
645 | static constexpr int ms_MsgId = NETEVENTTYPE_SOUNDWORLD; |
646 | int m_SoundId; |
647 | }; |
648 | |
649 | struct CNetEvent_DamageInd : public CNetEvent_Common |
650 | { |
651 | static constexpr int ms_MsgId = NETEVENTTYPE_DAMAGEIND; |
652 | int m_Angle; |
653 | }; |
654 | |
655 | struct CNetObj_MyOwnEvent |
656 | { |
657 | static constexpr int ms_MsgId = NETOBJTYPE_MYOWNEVENT; |
658 | int m_Test; |
659 | }; |
660 | |
661 | struct CNetObj_SpecChar |
662 | { |
663 | static constexpr int ms_MsgId = NETOBJTYPE_SPECCHAR; |
664 | int m_X; |
665 | int m_Y; |
666 | }; |
667 | |
668 | struct CNetObj_SwitchState |
669 | { |
670 | static constexpr int ms_MsgId = NETOBJTYPE_SWITCHSTATE; |
671 | int m_HighestSwitchNumber; |
672 | int m_aStatus[8]; |
673 | int m_aSwitchNumbers[4]; |
674 | int m_aEndTicks[4]; |
675 | }; |
676 | |
677 | struct CNetObj_EntityEx |
678 | { |
679 | static constexpr int ms_MsgId = NETOBJTYPE_ENTITYEX; |
680 | int m_SwitchNumber; |
681 | int m_Layer; |
682 | int m_EntityClass; |
683 | }; |
684 | |
685 | struct CNetMsg_Sv_Motd |
686 | { |
687 | static constexpr int ms_MsgId = NETMSGTYPE_SV_MOTD; |
688 | const char *m_pMessage; |
689 | |
690 | bool Pack(CMsgPacker *pPacker) const |
691 | { |
692 | pPacker->AddString(pStr: m_pMessage, Limit: -1); |
693 | return pPacker->Error() != 0; |
694 | } |
695 | }; |
696 | |
697 | struct CNetMsg_Sv_Broadcast |
698 | { |
699 | static constexpr int ms_MsgId = NETMSGTYPE_SV_BROADCAST; |
700 | const char *m_pMessage; |
701 | |
702 | bool Pack(CMsgPacker *pPacker) const |
703 | { |
704 | pPacker->AddString(pStr: m_pMessage, Limit: -1); |
705 | return pPacker->Error() != 0; |
706 | } |
707 | }; |
708 | |
709 | struct CNetMsg_Sv_Chat |
710 | { |
711 | static constexpr int ms_MsgId = NETMSGTYPE_SV_CHAT; |
712 | int m_Team; |
713 | int m_ClientId; |
714 | const char *m_pMessage; |
715 | |
716 | bool Pack(CMsgPacker *pPacker) const |
717 | { |
718 | pPacker->AddInt(i: m_Team); |
719 | pPacker->AddInt(i: m_ClientId); |
720 | pPacker->AddString(pStr: m_pMessage, Limit: -1); |
721 | return pPacker->Error() != 0; |
722 | } |
723 | }; |
724 | |
725 | struct CNetMsg_Sv_KillMsg |
726 | { |
727 | static constexpr int ms_MsgId = NETMSGTYPE_SV_KILLMSG; |
728 | int m_Killer; |
729 | int m_Victim; |
730 | int m_Weapon; |
731 | int m_ModeSpecial; |
732 | |
733 | bool Pack(CMsgPacker *pPacker) const |
734 | { |
735 | pPacker->AddInt(i: m_Killer); |
736 | pPacker->AddInt(i: m_Victim); |
737 | pPacker->AddInt(i: m_Weapon); |
738 | pPacker->AddInt(i: m_ModeSpecial); |
739 | return pPacker->Error() != 0; |
740 | } |
741 | }; |
742 | |
743 | struct CNetMsg_Sv_SoundGlobal |
744 | { |
745 | static constexpr int ms_MsgId = NETMSGTYPE_SV_SOUNDGLOBAL; |
746 | int m_SoundId; |
747 | |
748 | bool Pack(CMsgPacker *pPacker) const |
749 | { |
750 | pPacker->AddInt(i: m_SoundId); |
751 | return pPacker->Error() != 0; |
752 | } |
753 | }; |
754 | |
755 | struct CNetMsg_Sv_TuneParams |
756 | { |
757 | static constexpr int ms_MsgId = NETMSGTYPE_SV_TUNEPARAMS; |
758 | |
759 | bool Pack(CMsgPacker *pPacker) const |
760 | { |
761 | return pPacker->Error() != 0; |
762 | } |
763 | }; |
764 | |
765 | struct CNetMsg_Unused |
766 | { |
767 | static constexpr int ms_MsgId = NETMSGTYPE_UNUSED; |
768 | |
769 | bool Pack(CMsgPacker *pPacker) const |
770 | { |
771 | return pPacker->Error() != 0; |
772 | } |
773 | }; |
774 | |
775 | struct CNetMsg_Sv_ReadyToEnter |
776 | { |
777 | static constexpr int ms_MsgId = NETMSGTYPE_SV_READYTOENTER; |
778 | |
779 | bool Pack(CMsgPacker *pPacker) const |
780 | { |
781 | return pPacker->Error() != 0; |
782 | } |
783 | }; |
784 | |
785 | struct CNetMsg_Sv_WeaponPickup |
786 | { |
787 | static constexpr int ms_MsgId = NETMSGTYPE_SV_WEAPONPICKUP; |
788 | int m_Weapon; |
789 | |
790 | bool Pack(CMsgPacker *pPacker) const |
791 | { |
792 | pPacker->AddInt(i: m_Weapon); |
793 | return pPacker->Error() != 0; |
794 | } |
795 | }; |
796 | |
797 | struct CNetMsg_Sv_Emoticon |
798 | { |
799 | static constexpr int ms_MsgId = NETMSGTYPE_SV_EMOTICON; |
800 | int m_ClientId; |
801 | int m_Emoticon; |
802 | |
803 | bool Pack(CMsgPacker *pPacker) const |
804 | { |
805 | pPacker->AddInt(i: m_ClientId); |
806 | pPacker->AddInt(i: m_Emoticon); |
807 | return pPacker->Error() != 0; |
808 | } |
809 | }; |
810 | |
811 | struct CNetMsg_Sv_VoteClearOptions |
812 | { |
813 | static constexpr int ms_MsgId = NETMSGTYPE_SV_VOTECLEAROPTIONS; |
814 | |
815 | bool Pack(CMsgPacker *pPacker) const |
816 | { |
817 | return pPacker->Error() != 0; |
818 | } |
819 | }; |
820 | |
821 | struct CNetMsg_Sv_VoteOptionListAdd |
822 | { |
823 | static constexpr int ms_MsgId = NETMSGTYPE_SV_VOTEOPTIONLISTADD; |
824 | int m_NumOptions; |
825 | const char *m_pDescription0; |
826 | const char *m_pDescription1; |
827 | const char *m_pDescription2; |
828 | const char *m_pDescription3; |
829 | const char *m_pDescription4; |
830 | const char *m_pDescription5; |
831 | const char *m_pDescription6; |
832 | const char *m_pDescription7; |
833 | const char *m_pDescription8; |
834 | const char *m_pDescription9; |
835 | const char *m_pDescription10; |
836 | const char *m_pDescription11; |
837 | const char *m_pDescription12; |
838 | const char *m_pDescription13; |
839 | const char *m_pDescription14; |
840 | |
841 | bool Pack(CMsgPacker *pPacker) const |
842 | { |
843 | pPacker->AddInt(i: m_NumOptions); |
844 | pPacker->AddString(pStr: m_pDescription0, Limit: -1); |
845 | pPacker->AddString(pStr: m_pDescription1, Limit: -1); |
846 | pPacker->AddString(pStr: m_pDescription2, Limit: -1); |
847 | pPacker->AddString(pStr: m_pDescription3, Limit: -1); |
848 | pPacker->AddString(pStr: m_pDescription4, Limit: -1); |
849 | pPacker->AddString(pStr: m_pDescription5, Limit: -1); |
850 | pPacker->AddString(pStr: m_pDescription6, Limit: -1); |
851 | pPacker->AddString(pStr: m_pDescription7, Limit: -1); |
852 | pPacker->AddString(pStr: m_pDescription8, Limit: -1); |
853 | pPacker->AddString(pStr: m_pDescription9, Limit: -1); |
854 | pPacker->AddString(pStr: m_pDescription10, Limit: -1); |
855 | pPacker->AddString(pStr: m_pDescription11, Limit: -1); |
856 | pPacker->AddString(pStr: m_pDescription12, Limit: -1); |
857 | pPacker->AddString(pStr: m_pDescription13, Limit: -1); |
858 | pPacker->AddString(pStr: m_pDescription14, Limit: -1); |
859 | return pPacker->Error() != 0; |
860 | } |
861 | }; |
862 | |
863 | struct CNetMsg_Sv_VoteOptionAdd |
864 | { |
865 | static constexpr int ms_MsgId = NETMSGTYPE_SV_VOTEOPTIONADD; |
866 | const char *m_pDescription; |
867 | |
868 | bool Pack(CMsgPacker *pPacker) const |
869 | { |
870 | pPacker->AddString(pStr: m_pDescription, Limit: -1); |
871 | return pPacker->Error() != 0; |
872 | } |
873 | }; |
874 | |
875 | struct CNetMsg_Sv_VoteOptionRemove |
876 | { |
877 | static constexpr int ms_MsgId = NETMSGTYPE_SV_VOTEOPTIONREMOVE; |
878 | const char *m_pDescription; |
879 | |
880 | bool Pack(CMsgPacker *pPacker) const |
881 | { |
882 | pPacker->AddString(pStr: m_pDescription, Limit: -1); |
883 | return pPacker->Error() != 0; |
884 | } |
885 | }; |
886 | |
887 | struct CNetMsg_Sv_VoteSet |
888 | { |
889 | static constexpr int ms_MsgId = NETMSGTYPE_SV_VOTESET; |
890 | int m_Timeout; |
891 | const char *m_pDescription; |
892 | const char *m_pReason; |
893 | |
894 | bool Pack(CMsgPacker *pPacker) const |
895 | { |
896 | pPacker->AddInt(i: m_Timeout); |
897 | pPacker->AddString(pStr: m_pDescription, Limit: -1); |
898 | pPacker->AddString(pStr: m_pReason, Limit: -1); |
899 | return pPacker->Error() != 0; |
900 | } |
901 | }; |
902 | |
903 | struct CNetMsg_Sv_VoteStatus |
904 | { |
905 | static constexpr int ms_MsgId = NETMSGTYPE_SV_VOTESTATUS; |
906 | int m_Yes; |
907 | int m_No; |
908 | int m_Pass; |
909 | int m_Total; |
910 | |
911 | bool Pack(CMsgPacker *pPacker) const |
912 | { |
913 | pPacker->AddInt(i: m_Yes); |
914 | pPacker->AddInt(i: m_No); |
915 | pPacker->AddInt(i: m_Pass); |
916 | pPacker->AddInt(i: m_Total); |
917 | return pPacker->Error() != 0; |
918 | } |
919 | }; |
920 | |
921 | struct CNetMsg_Cl_Say |
922 | { |
923 | static constexpr int ms_MsgId = NETMSGTYPE_CL_SAY; |
924 | int m_Team; |
925 | const char *m_pMessage; |
926 | |
927 | bool Pack(CMsgPacker *pPacker) const |
928 | { |
929 | pPacker->AddInt(i: m_Team); |
930 | pPacker->AddString(pStr: m_pMessage, Limit: -1); |
931 | return pPacker->Error() != 0; |
932 | } |
933 | }; |
934 | |
935 | struct CNetMsg_Cl_SetTeam |
936 | { |
937 | static constexpr int ms_MsgId = NETMSGTYPE_CL_SETTEAM; |
938 | int m_Team; |
939 | |
940 | bool Pack(CMsgPacker *pPacker) const |
941 | { |
942 | pPacker->AddInt(i: m_Team); |
943 | return pPacker->Error() != 0; |
944 | } |
945 | }; |
946 | |
947 | struct CNetMsg_Cl_SetSpectatorMode |
948 | { |
949 | static constexpr int ms_MsgId = NETMSGTYPE_CL_SETSPECTATORMODE; |
950 | int m_SpectatorId; |
951 | |
952 | bool Pack(CMsgPacker *pPacker) const |
953 | { |
954 | pPacker->AddInt(i: m_SpectatorId); |
955 | return pPacker->Error() != 0; |
956 | } |
957 | }; |
958 | |
959 | struct CNetMsg_Cl_StartInfo |
960 | { |
961 | static constexpr int ms_MsgId = NETMSGTYPE_CL_STARTINFO; |
962 | const char *m_pName; |
963 | const char *m_pClan; |
964 | int m_Country; |
965 | const char *m_pSkin; |
966 | int m_UseCustomColor; |
967 | int m_ColorBody; |
968 | int m_ColorFeet; |
969 | |
970 | bool Pack(CMsgPacker *pPacker) const |
971 | { |
972 | pPacker->AddString(pStr: m_pName, Limit: -1); |
973 | pPacker->AddString(pStr: m_pClan, Limit: -1); |
974 | pPacker->AddInt(i: m_Country); |
975 | pPacker->AddString(pStr: m_pSkin, Limit: -1); |
976 | pPacker->AddInt(i: m_UseCustomColor); |
977 | pPacker->AddInt(i: m_ColorBody); |
978 | pPacker->AddInt(i: m_ColorFeet); |
979 | return pPacker->Error() != 0; |
980 | } |
981 | }; |
982 | |
983 | struct CNetMsg_Cl_ChangeInfo |
984 | { |
985 | static constexpr int ms_MsgId = NETMSGTYPE_CL_CHANGEINFO; |
986 | const char *m_pName; |
987 | const char *m_pClan; |
988 | int m_Country; |
989 | const char *m_pSkin; |
990 | int m_UseCustomColor; |
991 | int m_ColorBody; |
992 | int m_ColorFeet; |
993 | |
994 | bool Pack(CMsgPacker *pPacker) const |
995 | { |
996 | pPacker->AddString(pStr: m_pName, Limit: -1); |
997 | pPacker->AddString(pStr: m_pClan, Limit: -1); |
998 | pPacker->AddInt(i: m_Country); |
999 | pPacker->AddString(pStr: m_pSkin, Limit: -1); |
1000 | pPacker->AddInt(i: m_UseCustomColor); |
1001 | pPacker->AddInt(i: m_ColorBody); |
1002 | pPacker->AddInt(i: m_ColorFeet); |
1003 | return pPacker->Error() != 0; |
1004 | } |
1005 | }; |
1006 | |
1007 | struct CNetMsg_Cl_Kill |
1008 | { |
1009 | static constexpr int ms_MsgId = NETMSGTYPE_CL_KILL; |
1010 | |
1011 | bool Pack(CMsgPacker *pPacker) const |
1012 | { |
1013 | return pPacker->Error() != 0; |
1014 | } |
1015 | }; |
1016 | |
1017 | struct CNetMsg_Cl_Emoticon |
1018 | { |
1019 | static constexpr int ms_MsgId = NETMSGTYPE_CL_EMOTICON; |
1020 | int m_Emoticon; |
1021 | |
1022 | bool Pack(CMsgPacker *pPacker) const |
1023 | { |
1024 | pPacker->AddInt(i: m_Emoticon); |
1025 | return pPacker->Error() != 0; |
1026 | } |
1027 | }; |
1028 | |
1029 | struct CNetMsg_Cl_Vote |
1030 | { |
1031 | static constexpr int ms_MsgId = NETMSGTYPE_CL_VOTE; |
1032 | int m_Vote; |
1033 | |
1034 | bool Pack(CMsgPacker *pPacker) const |
1035 | { |
1036 | pPacker->AddInt(i: m_Vote); |
1037 | return pPacker->Error() != 0; |
1038 | } |
1039 | }; |
1040 | |
1041 | struct CNetMsg_Cl_CallVote |
1042 | { |
1043 | static constexpr int ms_MsgId = NETMSGTYPE_CL_CALLVOTE; |
1044 | const char *m_pType; |
1045 | const char *m_pValue; |
1046 | const char *m_pReason; |
1047 | |
1048 | bool Pack(CMsgPacker *pPacker) const |
1049 | { |
1050 | pPacker->AddString(pStr: m_pType, Limit: -1); |
1051 | pPacker->AddString(pStr: m_pValue, Limit: -1); |
1052 | pPacker->AddString(pStr: m_pReason, Limit: -1); |
1053 | return pPacker->Error() != 0; |
1054 | } |
1055 | }; |
1056 | |
1057 | struct CNetMsg_Cl_IsDDNetLegacy |
1058 | { |
1059 | static constexpr int ms_MsgId = NETMSGTYPE_CL_ISDDNETLEGACY; |
1060 | |
1061 | bool Pack(CMsgPacker *pPacker) const |
1062 | { |
1063 | return pPacker->Error() != 0; |
1064 | } |
1065 | }; |
1066 | |
1067 | struct CNetMsg_Sv_DDRaceTimeLegacy |
1068 | { |
1069 | static constexpr int ms_MsgId = NETMSGTYPE_SV_DDRACETIMELEGACY; |
1070 | int m_Time; |
1071 | int m_Check; |
1072 | int m_Finish; |
1073 | |
1074 | bool Pack(CMsgPacker *pPacker) const |
1075 | { |
1076 | pPacker->AddInt(i: m_Time); |
1077 | pPacker->AddInt(i: m_Check); |
1078 | pPacker->AddInt(i: m_Finish); |
1079 | return pPacker->Error() != 0; |
1080 | } |
1081 | }; |
1082 | |
1083 | struct CNetMsg_Sv_RecordLegacy |
1084 | { |
1085 | static constexpr int ms_MsgId = NETMSGTYPE_SV_RECORDLEGACY; |
1086 | int m_ServerTimeBest; |
1087 | int m_PlayerTimeBest; |
1088 | |
1089 | bool Pack(CMsgPacker *pPacker) const |
1090 | { |
1091 | pPacker->AddInt(i: m_ServerTimeBest); |
1092 | pPacker->AddInt(i: m_PlayerTimeBest); |
1093 | return pPacker->Error() != 0; |
1094 | } |
1095 | }; |
1096 | |
1097 | struct CNetMsg_Unused2 |
1098 | { |
1099 | static constexpr int ms_MsgId = NETMSGTYPE_UNUSED2; |
1100 | |
1101 | bool Pack(CMsgPacker *pPacker) const |
1102 | { |
1103 | return pPacker->Error() != 0; |
1104 | } |
1105 | }; |
1106 | |
1107 | struct CNetMsg_Sv_TeamsStateLegacy |
1108 | { |
1109 | static constexpr int ms_MsgId = NETMSGTYPE_SV_TEAMSSTATELEGACY; |
1110 | |
1111 | bool Pack(CMsgPacker *pPacker) const |
1112 | { |
1113 | return pPacker->Error() != 0; |
1114 | } |
1115 | }; |
1116 | |
1117 | struct CNetMsg_Cl_ShowOthersLegacy |
1118 | { |
1119 | static constexpr int ms_MsgId = NETMSGTYPE_CL_SHOWOTHERSLEGACY; |
1120 | int m_Show; |
1121 | |
1122 | bool Pack(CMsgPacker *pPacker) const |
1123 | { |
1124 | pPacker->AddInt(i: m_Show); |
1125 | return pPacker->Error() != 0; |
1126 | } |
1127 | }; |
1128 | |
1129 | struct CNetMsg_Sv_MyOwnMessage |
1130 | { |
1131 | static constexpr int ms_MsgId = NETMSGTYPE_SV_MYOWNMESSAGE; |
1132 | int m_Test; |
1133 | |
1134 | bool Pack(CMsgPacker *pPacker) const |
1135 | { |
1136 | pPacker->AddInt(i: m_Test); |
1137 | return pPacker->Error() != 0; |
1138 | } |
1139 | }; |
1140 | |
1141 | struct CNetMsg_Cl_ShowDistance |
1142 | { |
1143 | static constexpr int ms_MsgId = NETMSGTYPE_CL_SHOWDISTANCE; |
1144 | int m_X; |
1145 | int m_Y; |
1146 | |
1147 | bool Pack(CMsgPacker *pPacker) const |
1148 | { |
1149 | pPacker->AddInt(i: m_X); |
1150 | pPacker->AddInt(i: m_Y); |
1151 | return pPacker->Error() != 0; |
1152 | } |
1153 | }; |
1154 | |
1155 | struct CNetMsg_Cl_ShowOthers |
1156 | { |
1157 | static constexpr int ms_MsgId = NETMSGTYPE_CL_SHOWOTHERS; |
1158 | int m_Show; |
1159 | |
1160 | bool Pack(CMsgPacker *pPacker) const |
1161 | { |
1162 | pPacker->AddInt(i: m_Show); |
1163 | return pPacker->Error() != 0; |
1164 | } |
1165 | }; |
1166 | |
1167 | struct CNetMsg_Sv_TeamsState |
1168 | { |
1169 | static constexpr int ms_MsgId = NETMSGTYPE_SV_TEAMSSTATE; |
1170 | |
1171 | bool Pack(CMsgPacker *pPacker) const |
1172 | { |
1173 | return pPacker->Error() != 0; |
1174 | } |
1175 | }; |
1176 | |
1177 | struct CNetMsg_Sv_DDRaceTime |
1178 | { |
1179 | static constexpr int ms_MsgId = NETMSGTYPE_SV_DDRACETIME; |
1180 | int m_Time; |
1181 | int m_Check; |
1182 | int m_Finish; |
1183 | |
1184 | bool Pack(CMsgPacker *pPacker) const |
1185 | { |
1186 | pPacker->AddInt(i: m_Time); |
1187 | pPacker->AddInt(i: m_Check); |
1188 | pPacker->AddInt(i: m_Finish); |
1189 | return pPacker->Error() != 0; |
1190 | } |
1191 | }; |
1192 | |
1193 | struct CNetMsg_Sv_Record |
1194 | { |
1195 | static constexpr int ms_MsgId = NETMSGTYPE_SV_RECORD; |
1196 | int m_ServerTimeBest; |
1197 | int m_PlayerTimeBest; |
1198 | |
1199 | bool Pack(CMsgPacker *pPacker) const |
1200 | { |
1201 | pPacker->AddInt(i: m_ServerTimeBest); |
1202 | pPacker->AddInt(i: m_PlayerTimeBest); |
1203 | return pPacker->Error() != 0; |
1204 | } |
1205 | }; |
1206 | |
1207 | struct CNetMsg_Sv_KillMsgTeam |
1208 | { |
1209 | static constexpr int ms_MsgId = NETMSGTYPE_SV_KILLMSGTEAM; |
1210 | int m_Team; |
1211 | int m_First; |
1212 | |
1213 | bool Pack(CMsgPacker *pPacker) const |
1214 | { |
1215 | pPacker->AddInt(i: m_Team); |
1216 | pPacker->AddInt(i: m_First); |
1217 | return pPacker->Error() != 0; |
1218 | } |
1219 | }; |
1220 | |
1221 | struct CNetMsg_Sv_YourVote |
1222 | { |
1223 | static constexpr int ms_MsgId = NETMSGTYPE_SV_YOURVOTE; |
1224 | int m_Voted; |
1225 | |
1226 | bool Pack(CMsgPacker *pPacker) const |
1227 | { |
1228 | pPacker->AddInt(i: m_Voted); |
1229 | return pPacker->Error() != 0; |
1230 | } |
1231 | }; |
1232 | |
1233 | struct CNetMsg_Sv_RaceFinish |
1234 | { |
1235 | static constexpr int ms_MsgId = NETMSGTYPE_SV_RACEFINISH; |
1236 | int m_ClientId; |
1237 | int m_Time; |
1238 | int m_Diff; |
1239 | int m_RecordPersonal; |
1240 | int m_RecordServer; |
1241 | |
1242 | bool Pack(CMsgPacker *pPacker) const |
1243 | { |
1244 | pPacker->AddInt(i: m_ClientId); |
1245 | pPacker->AddInt(i: m_Time); |
1246 | pPacker->AddInt(i: m_Diff); |
1247 | pPacker->AddInt(i: m_RecordPersonal); |
1248 | pPacker->AddInt(i: m_RecordServer); |
1249 | return pPacker->Error() != 0; |
1250 | } |
1251 | }; |
1252 | |
1253 | struct CNetMsg_Sv_CommandInfo |
1254 | { |
1255 | static constexpr int ms_MsgId = NETMSGTYPE_SV_COMMANDINFO; |
1256 | const char *m_pName; |
1257 | const char *m_pArgsFormat; |
1258 | const char *m_pHelpText; |
1259 | |
1260 | bool Pack(CMsgPacker *pPacker) const |
1261 | { |
1262 | pPacker->AddString(pStr: m_pName, Limit: -1); |
1263 | pPacker->AddString(pStr: m_pArgsFormat, Limit: -1); |
1264 | pPacker->AddString(pStr: m_pHelpText, Limit: -1); |
1265 | return pPacker->Error() != 0; |
1266 | } |
1267 | }; |
1268 | |
1269 | struct CNetMsg_Sv_CommandInfoRemove |
1270 | { |
1271 | static constexpr int ms_MsgId = NETMSGTYPE_SV_COMMANDINFOREMOVE; |
1272 | const char *m_pName; |
1273 | |
1274 | bool Pack(CMsgPacker *pPacker) const |
1275 | { |
1276 | pPacker->AddString(pStr: m_pName, Limit: -1); |
1277 | return pPacker->Error() != 0; |
1278 | } |
1279 | }; |
1280 | |
1281 | struct CNetMsg_Sv_VoteOptionGroupStart |
1282 | { |
1283 | static constexpr int ms_MsgId = NETMSGTYPE_SV_VOTEOPTIONGROUPSTART; |
1284 | |
1285 | bool Pack(CMsgPacker *pPacker) const |
1286 | { |
1287 | return pPacker->Error() != 0; |
1288 | } |
1289 | }; |
1290 | |
1291 | struct CNetMsg_Sv_VoteOptionGroupEnd |
1292 | { |
1293 | static constexpr int ms_MsgId = NETMSGTYPE_SV_VOTEOPTIONGROUPEND; |
1294 | |
1295 | bool Pack(CMsgPacker *pPacker) const |
1296 | { |
1297 | return pPacker->Error() != 0; |
1298 | } |
1299 | }; |
1300 | |
1301 | struct CNetMsg_Sv_CommandInfoGroupStart |
1302 | { |
1303 | static constexpr int ms_MsgId = NETMSGTYPE_SV_COMMANDINFOGROUPSTART; |
1304 | |
1305 | bool Pack(CMsgPacker *pPacker) const |
1306 | { |
1307 | return pPacker->Error() != 0; |
1308 | } |
1309 | }; |
1310 | |
1311 | struct CNetMsg_Sv_CommandInfoGroupEnd |
1312 | { |
1313 | static constexpr int ms_MsgId = NETMSGTYPE_SV_COMMANDINFOGROUPEND; |
1314 | |
1315 | bool Pack(CMsgPacker *pPacker) const |
1316 | { |
1317 | return pPacker->Error() != 0; |
1318 | } |
1319 | }; |
1320 | |
1321 | struct CNetMsg_Sv_ChangeInfoCooldown |
1322 | { |
1323 | static constexpr int ms_MsgId = NETMSGTYPE_SV_CHANGEINFOCOOLDOWN; |
1324 | int m_WaitUntil; |
1325 | |
1326 | bool Pack(CMsgPacker *pPacker) const |
1327 | { |
1328 | pPacker->AddInt(i: m_WaitUntil); |
1329 | return pPacker->Error() != 0; |
1330 | } |
1331 | }; |
1332 | |
1333 | enum |
1334 | { |
1335 | SOUND_GUN_FIRE=0, |
1336 | SOUND_SHOTGUN_FIRE, |
1337 | SOUND_GRENADE_FIRE, |
1338 | SOUND_HAMMER_FIRE, |
1339 | SOUND_HAMMER_HIT, |
1340 | SOUND_NINJA_FIRE, |
1341 | SOUND_GRENADE_EXPLODE, |
1342 | SOUND_NINJA_HIT, |
1343 | SOUND_LASER_FIRE, |
1344 | SOUND_LASER_BOUNCE, |
1345 | SOUND_WEAPON_SWITCH, |
1346 | SOUND_PLAYER_PAIN_SHORT, |
1347 | SOUND_PLAYER_PAIN_LONG, |
1348 | SOUND_BODY_LAND, |
1349 | SOUND_PLAYER_AIRJUMP, |
1350 | SOUND_PLAYER_JUMP, |
1351 | SOUND_PLAYER_DIE, |
1352 | SOUND_PLAYER_SPAWN, |
1353 | SOUND_PLAYER_SKID, |
1354 | SOUND_TEE_CRY, |
1355 | SOUND_HOOK_LOOP, |
1356 | SOUND_HOOK_ATTACH_GROUND, |
1357 | SOUND_HOOK_ATTACH_PLAYER, |
1358 | SOUND_HOOK_NOATTACH, |
1359 | SOUND_PICKUP_HEALTH, |
1360 | SOUND_PICKUP_ARMOR, |
1361 | SOUND_PICKUP_GRENADE, |
1362 | SOUND_PICKUP_SHOTGUN, |
1363 | SOUND_PICKUP_NINJA, |
1364 | SOUND_WEAPON_SPAWN, |
1365 | SOUND_WEAPON_NOAMMO, |
1366 | SOUND_HIT, |
1367 | SOUND_CHAT_SERVER, |
1368 | SOUND_CHAT_CLIENT, |
1369 | SOUND_CHAT_HIGHLIGHT, |
1370 | SOUND_CTF_DROP, |
1371 | SOUND_CTF_RETURN, |
1372 | SOUND_CTF_GRAB_PL, |
1373 | SOUND_CTF_GRAB_EN, |
1374 | SOUND_CTF_CAPTURE, |
1375 | , |
1376 | NUM_SOUNDS |
1377 | }; |
1378 | enum |
1379 | { |
1380 | WEAPON_HAMMER=0, |
1381 | WEAPON_GUN, |
1382 | WEAPON_SHOTGUN, |
1383 | WEAPON_GRENADE, |
1384 | WEAPON_LASER, |
1385 | WEAPON_NINJA, |
1386 | NUM_WEAPONS |
1387 | }; |
1388 | |
1389 | class CNetObjHandler |
1390 | { |
1391 | const char *m_pMsgFailedOn; |
1392 | const char *m_pObjFailedOn; |
1393 | const char *m_pObjCorrectedOn; |
1394 | char m_aUnpackedData[1024 * 2]; |
1395 | int m_NumObjCorrections; |
1396 | int ClampInt(const char *pErrorMsg, int Value, int Min, int Max); |
1397 | |
1398 | static const char *ms_apObjNames[]; |
1399 | static const char *ms_apExObjNames[]; |
1400 | static int ms_aObjSizes[]; |
1401 | static int ms_aUnpackedObjSizes[]; |
1402 | static int ms_aUnpackedExObjSizes[]; |
1403 | static const char *ms_apMsgNames[]; |
1404 | static const char *ms_apExMsgNames[]; |
1405 | |
1406 | public: |
1407 | CNetObjHandler(); |
1408 | |
1409 | void *SecureUnpackObj(int Type, CUnpacker *pUnpacker); |
1410 | const char *GetObjName(int Type) const; |
1411 | int GetObjSize(int Type) const; |
1412 | int GetUnpackedObjSize(int Type) const; |
1413 | int NumObjCorrections() const; |
1414 | const char *CorrectedObjOn() const; |
1415 | const char *FailedObjOn() const; |
1416 | |
1417 | const char *GetMsgName(int Type) const; |
1418 | void *SecureUnpackMsg(int Type, CUnpacker *pUnpacker); |
1419 | bool TeeHistorianRecordMsg(int Type); |
1420 | const char *FailedMsgOn() const; |
1421 | }; |
1422 | |
1423 | #endif // GAME_GENERATED_PROTOCOL_H |
1424 | |