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