1#ifndef GAME_GENERATED_PROTOCOL7_H
2#define GAME_GENERATED_PROTOCOL7_H
3class CUnpacker;
4#include <engine/message.h>
5namespace protocol7 {
6
7
8enum
9{
10 INPUT_STATE_MASK=0x3f
11};
12
13enum
14{
15 TEAM_SPECTATORS=-1,
16 TEAM_RED,
17 TEAM_BLUE,
18 NUM_TEAMS,
19
20 FLAG_MISSING=-3,
21 FLAG_ATSTAND,
22 FLAG_TAKEN,
23
24 SPEC_FREEVIEW=0,
25 SPEC_PLAYER,
26 SPEC_FLAGRED,
27 SPEC_FLAGBLUE,
28 NUM_SPECMODES,
29
30 SKINPART_BODY = 0,
31 SKINPART_MARKING,
32 SKINPART_DECORATION,
33 SKINPART_HANDS,
34 SKINPART_FEET,
35 SKINPART_EYES,
36 NUM_SKINPARTS,
37};
38
39enum
40{
41 PICKUP_HEALTH=0,
42 PICKUP_ARMOR,
43 PICKUP_GRENADE,
44 PICKUP_SHOTGUN,
45 PICKUP_LASER,
46 PICKUP_NINJA,
47 PICKUP_GUN,
48 PICKUP_HAMMER,
49 NUM_PICKUPS
50};
51
52enum
53{
54 EMOTE_NORMAL=0,
55 EMOTE_PAIN,
56 EMOTE_HAPPY,
57 EMOTE_SURPRISE,
58 EMOTE_ANGRY,
59 EMOTE_BLINK,
60 NUM_EMOTES
61};
62
63enum
64{
65 EMOTICON_OOP=0,
66 EMOTICON_EXCLAMATION,
67 EMOTICON_HEARTS,
68 EMOTICON_DROP,
69 EMOTICON_DOTDOT,
70 EMOTICON_MUSIC,
71 EMOTICON_SORRY,
72 EMOTICON_GHOST,
73 EMOTICON_SUSHI,
74 EMOTICON_SPLATTEE,
75 EMOTICON_DEVILTEE,
76 EMOTICON_ZOMG,
77 EMOTICON_ZZZ,
78 EMOTICON_WTF,
79 EMOTICON_EYES,
80 EMOTICON_QUESTION,
81 NUM_EMOTICONS
82};
83
84enum
85{
86 VOTE_UNKNOWN=0,
87 VOTE_START_OP,
88 VOTE_START_KICK,
89 VOTE_START_SPEC,
90 VOTE_END_ABORT,
91 VOTE_END_PASS,
92 VOTE_END_FAIL,
93 NUM_VOTES
94};
95
96enum
97{
98 CHAT_NONE=0,
99 CHAT_ALL,
100 CHAT_TEAM,
101 CHAT_WHISPER,
102 NUM_CHATS
103};
104
105enum
106{
107 GAMEMSG_TEAM_SWAP=0,
108 GAMEMSG_SPEC_INVALIDID,
109 GAMEMSG_TEAM_SHUFFLE,
110 GAMEMSG_TEAM_BALANCE,
111 GAMEMSG_CTF_DROP,
112 GAMEMSG_CTF_RETURN,
113 GAMEMSG_TEAM_ALL,
114 GAMEMSG_TEAM_BALANCE_VICTIM,
115 GAMEMSG_CTF_GRAB,
116 GAMEMSG_CTF_CAPTURE,
117 GAMEMSG_GAME_PAUSED,
118 NUM_GAMEMSGS
119};
120
121enum
122{
123 PLAYERFLAG_ADMIN = 1<<0,
124 PLAYERFLAG_CHATTING = 1<<1,
125 PLAYERFLAG_SCOREBOARD = 1<<2,
126 PLAYERFLAG_READY = 1<<3,
127 PLAYERFLAG_DEAD = 1<<4,
128 PLAYERFLAG_WATCHING = 1<<5,
129 PLAYERFLAG_BOT = 1<<6,
130 PLAYERFLAG_AIM = 1<<7,
131};
132
133enum
134{
135 GAMEFLAG_TEAMS = 1<<0,
136 GAMEFLAG_FLAGS = 1<<1,
137 GAMEFLAG_SURVIVAL = 1<<2,
138 GAMEFLAG_RACE = 1<<3,
139};
140
141enum
142{
143 GAMESTATEFLAG_WARMUP = 1<<0,
144 GAMESTATEFLAG_SUDDENDEATH = 1<<1,
145 GAMESTATEFLAG_ROUNDOVER = 1<<2,
146 GAMESTATEFLAG_GAMEOVER = 1<<3,
147 GAMESTATEFLAG_PAUSED = 1<<4,
148 GAMESTATEFLAG_STARTCOUNTDOWN = 1<<5,
149};
150
151enum
152{
153 COREEVENTFLAG_GROUND_JUMP = 1<<0,
154 COREEVENTFLAG_AIR_JUMP = 1<<1,
155 COREEVENTFLAG_HOOK_ATTACH_PLAYER = 1<<2,
156 COREEVENTFLAG_HOOK_ATTACH_GROUND = 1<<3,
157 COREEVENTFLAG_HOOK_HIT_NOHOOK = 1<<4,
158};
159
160enum
161{
162 RACEFLAG_HIDE_KILLMSG = 1<<0,
163 RACEFLAG_FINISHMSG_AS_CHAT = 1<<1,
164 RACEFLAG_KEEP_WANTED_WEAPON = 1<<2,
165};
166
167enum
168{
169 NETOBJ_INVALID=0,
170 NETOBJTYPE_PLAYERINPUT,
171 NETOBJTYPE_PROJECTILE,
172 NETOBJTYPE_LASER,
173 NETOBJTYPE_PICKUP,
174 NETOBJTYPE_FLAG,
175 NETOBJTYPE_GAMEDATA,
176 NETOBJTYPE_GAMEDATATEAM,
177 NETOBJTYPE_GAMEDATAFLAG,
178 NETOBJTYPE_CHARACTERCORE,
179 NETOBJTYPE_CHARACTER,
180 NETOBJTYPE_PLAYERINFO,
181 NETOBJTYPE_SPECTATORINFO,
182 NETOBJTYPE_DE_CLIENTINFO,
183 NETOBJTYPE_DE_GAMEINFO,
184 NETOBJTYPE_DE_TUNEPARAMS,
185 NETEVENTTYPE_COMMON,
186 NETEVENTTYPE_EXPLOSION,
187 NETEVENTTYPE_SPAWN,
188 NETEVENTTYPE_HAMMERHIT,
189 NETEVENTTYPE_DEATH,
190 NETEVENTTYPE_SOUNDWORLD,
191 NETEVENTTYPE_DAMAGE,
192 NETOBJTYPE_PLAYERINFORACE,
193 NETOBJTYPE_GAMEDATARACE,
194 NUM_NETOBJTYPES
195};
196
197enum
198{
199 NETMSG_INVALID=0,
200 NETMSGTYPE_SV_MOTD,
201 NETMSGTYPE_SV_BROADCAST,
202 NETMSGTYPE_SV_CHAT,
203 NETMSGTYPE_SV_TEAM,
204 NETMSGTYPE_SV_KILLMSG,
205 NETMSGTYPE_SV_TUNEPARAMS,
206 NETMSGTYPE_UNUSED,
207 NETMSGTYPE_SV_READYTOENTER,
208 NETMSGTYPE_SV_WEAPONPICKUP,
209 NETMSGTYPE_SV_EMOTICON,
210 NETMSGTYPE_SV_VOTECLEAROPTIONS,
211 NETMSGTYPE_SV_VOTEOPTIONLISTADD,
212 NETMSGTYPE_SV_VOTEOPTIONADD,
213 NETMSGTYPE_SV_VOTEOPTIONREMOVE,
214 NETMSGTYPE_SV_VOTESET,
215 NETMSGTYPE_SV_VOTESTATUS,
216 NETMSGTYPE_SV_SERVERSETTINGS,
217 NETMSGTYPE_SV_CLIENTINFO,
218 NETMSGTYPE_SV_GAMEINFO,
219 NETMSGTYPE_SV_CLIENTDROP,
220 NETMSGTYPE_SV_GAMEMSG,
221 NETMSGTYPE_DE_CLIENTENTER,
222 NETMSGTYPE_DE_CLIENTLEAVE,
223 NETMSGTYPE_CL_SAY,
224 NETMSGTYPE_CL_SETTEAM,
225 NETMSGTYPE_CL_SETSPECTATORMODE,
226 NETMSGTYPE_CL_STARTINFO,
227 NETMSGTYPE_CL_KILL,
228 NETMSGTYPE_CL_READYCHANGE,
229 NETMSGTYPE_CL_EMOTICON,
230 NETMSGTYPE_CL_VOTE,
231 NETMSGTYPE_CL_CALLVOTE,
232 NETMSGTYPE_SV_SKINCHANGE,
233 NETMSGTYPE_CL_SKINCHANGE,
234 NETMSGTYPE_SV_RACEFINISH,
235 NETMSGTYPE_SV_CHECKPOINT,
236 NETMSGTYPE_SV_COMMANDINFO,
237 NETMSGTYPE_SV_COMMANDINFOREMOVE,
238 NETMSGTYPE_CL_COMMAND,
239 NUM_NETMSGTYPES
240};
241
242
243 template<typename... Ts> struct make_void { typedef void type;};
244 template<typename... Ts> using void_t = typename make_void<Ts...>::type;
245
246 template<typename T, typename = void>
247 struct is_sixup {
248 constexpr static bool value = false;
249 };
250
251 template<typename T>
252 struct is_sixup<T, void_t<typename T::is_sixup>> {
253 constexpr static bool value = true;
254 };
255
256struct CNetObj_PlayerInput
257{
258 using is_sixup = char;
259 static constexpr int ms_MsgId = NETOBJTYPE_PLAYERINPUT;
260 int m_Direction;
261 int m_TargetX;
262 int m_TargetY;
263 int m_Jump;
264 int m_Fire;
265 int m_Hook;
266 int m_PlayerFlags;
267 int m_WantedWeapon;
268 int m_NextWeapon;
269 int m_PrevWeapon;
270};
271
272struct CNetObj_Projectile
273{
274 using is_sixup = char;
275 static constexpr int ms_MsgId = NETOBJTYPE_PROJECTILE;
276 int m_X;
277 int m_Y;
278 int m_VelX;
279 int m_VelY;
280 int m_Type;
281 int m_StartTick;
282};
283
284struct CNetObj_Laser
285{
286 using is_sixup = char;
287 static constexpr int ms_MsgId = NETOBJTYPE_LASER;
288 int m_X;
289 int m_Y;
290 int m_FromX;
291 int m_FromY;
292 int m_StartTick;
293};
294
295struct CNetObj_Pickup
296{
297 using is_sixup = char;
298 static constexpr int ms_MsgId = NETOBJTYPE_PICKUP;
299 int m_X;
300 int m_Y;
301 int m_Type;
302};
303
304struct CNetObj_Flag
305{
306 using is_sixup = char;
307 static constexpr int ms_MsgId = NETOBJTYPE_FLAG;
308 int m_X;
309 int m_Y;
310 int m_Team;
311};
312
313struct CNetObj_GameData
314{
315 using is_sixup = char;
316 static constexpr int ms_MsgId = NETOBJTYPE_GAMEDATA;
317 int m_GameStartTick;
318 int m_GameStateFlags;
319 int m_GameStateEndTick;
320};
321
322struct CNetObj_GameDataTeam
323{
324 using is_sixup = char;
325 static constexpr int ms_MsgId = NETOBJTYPE_GAMEDATATEAM;
326 int m_TeamscoreRed;
327 int m_TeamscoreBlue;
328};
329
330struct CNetObj_GameDataFlag
331{
332 using is_sixup = char;
333 static constexpr int ms_MsgId = NETOBJTYPE_GAMEDATAFLAG;
334 int m_FlagCarrierRed;
335 int m_FlagCarrierBlue;
336 int m_FlagDropTickRed;
337 int m_FlagDropTickBlue;
338};
339
340struct CNetObj_CharacterCore
341{
342 using is_sixup = char;
343 static constexpr int ms_MsgId = NETOBJTYPE_CHARACTERCORE;
344 int m_Tick;
345 int m_X;
346 int m_Y;
347 int m_VelX;
348 int m_VelY;
349 int m_Angle;
350 int m_Direction;
351 int m_Jumped;
352 int m_HookedPlayer;
353 int m_HookState;
354 int m_HookTick;
355 int m_HookX;
356 int m_HookY;
357 int m_HookDx;
358 int m_HookDy;
359};
360
361struct CNetObj_Character : public CNetObj_CharacterCore
362{
363 using is_sixup = char;
364 static constexpr int ms_MsgId = NETOBJTYPE_CHARACTER;
365 int m_Health;
366 int m_Armor;
367 int m_AmmoCount;
368 int m_Weapon;
369 int m_Emote;
370 int m_AttackTick;
371 int m_TriggeredEvents;
372};
373
374struct CNetObj_PlayerInfo
375{
376 using is_sixup = char;
377 static constexpr int ms_MsgId = NETOBJTYPE_PLAYERINFO;
378 int m_PlayerFlags;
379 int m_Score;
380 int m_Latency;
381};
382
383struct CNetObj_SpectatorInfo
384{
385 using is_sixup = char;
386 static constexpr int ms_MsgId = NETOBJTYPE_SPECTATORINFO;
387 int m_SpecMode;
388 int m_SpectatorId;
389 int m_X;
390 int m_Y;
391};
392
393struct CNetObj_De_ClientInfo
394{
395 using is_sixup = char;
396 static constexpr int ms_MsgId = NETOBJTYPE_DE_CLIENTINFO;
397 int m_Local;
398 int m_Team;
399 int m_aName[4];
400 int m_aClan[3];
401 int m_Country;
402 int m_aaSkinPartNames[6][6];
403 int m_aUseCustomColors[6];
404 int m_aSkinPartColors[6];
405};
406
407struct CNetObj_De_GameInfo
408{
409 using is_sixup = char;
410 static constexpr int ms_MsgId = NETOBJTYPE_DE_GAMEINFO;
411 int m_GameFlags;
412 int m_ScoreLimit;
413 int m_TimeLimit;
414 int m_MatchNum;
415 int m_MatchCurrent;
416};
417
418struct CNetObj_De_TuneParams
419{
420 using is_sixup = char;
421 static constexpr int ms_MsgId = NETOBJTYPE_DE_TUNEPARAMS;
422 int m_aTuneParams[32];
423};
424
425struct CNetEvent_Common
426{
427 using is_sixup = char;
428 static constexpr int ms_MsgId = NETEVENTTYPE_COMMON;
429 int m_X;
430 int m_Y;
431};
432
433struct CNetEvent_Explosion : public CNetEvent_Common
434{
435 using is_sixup = char;
436 static constexpr int ms_MsgId = NETEVENTTYPE_EXPLOSION;
437};
438
439struct CNetEvent_Spawn : public CNetEvent_Common
440{
441 using is_sixup = char;
442 static constexpr int ms_MsgId = NETEVENTTYPE_SPAWN;
443};
444
445struct CNetEvent_HammerHit : public CNetEvent_Common
446{
447 using is_sixup = char;
448 static constexpr int ms_MsgId = NETEVENTTYPE_HAMMERHIT;
449};
450
451struct CNetEvent_Death : public CNetEvent_Common
452{
453 using is_sixup = char;
454 static constexpr int ms_MsgId = NETEVENTTYPE_DEATH;
455 int m_ClientId;
456};
457
458struct CNetEvent_SoundWorld : public CNetEvent_Common
459{
460 using is_sixup = char;
461 static constexpr int ms_MsgId = NETEVENTTYPE_SOUNDWORLD;
462 int m_SoundId;
463};
464
465struct CNetEvent_Damage : public CNetEvent_Common
466{
467 using is_sixup = char;
468 static constexpr int ms_MsgId = NETEVENTTYPE_DAMAGE;
469 int m_ClientId;
470 int m_Angle;
471 int m_HealthAmount;
472 int m_ArmorAmount;
473 int m_Self;
474};
475
476struct CNetObj_PlayerInfoRace
477{
478 using is_sixup = char;
479 static constexpr int ms_MsgId = NETOBJTYPE_PLAYERINFORACE;
480 int m_RaceStartTick;
481};
482
483struct CNetObj_GameDataRace
484{
485 using is_sixup = char;
486 static constexpr int ms_MsgId = NETOBJTYPE_GAMEDATARACE;
487 int m_BestTime;
488 int m_Precision;
489 int m_RaceFlags;
490};
491
492struct CNetMsg_Sv_Motd
493{
494 using is_sixup = char;
495 static constexpr int ms_MsgId = NETMSGTYPE_SV_MOTD;
496 const char *m_pMessage;
497
498 bool Pack(CMsgPacker *pPacker) const
499 {
500 pPacker->AddString(pStr: m_pMessage, Limit: -1);
501 return pPacker->Error() != 0;
502 }
503};
504
505struct CNetMsg_Sv_Broadcast
506{
507 using is_sixup = char;
508 static constexpr int ms_MsgId = NETMSGTYPE_SV_BROADCAST;
509 const char *m_pMessage;
510
511 bool Pack(CMsgPacker *pPacker) const
512 {
513 pPacker->AddString(pStr: m_pMessage, Limit: -1);
514 return pPacker->Error() != 0;
515 }
516};
517
518struct CNetMsg_Sv_Chat
519{
520 using is_sixup = char;
521 static constexpr int ms_MsgId = NETMSGTYPE_SV_CHAT;
522 int m_Mode;
523 int m_ClientId;
524 int m_TargetId;
525 const char *m_pMessage;
526
527 bool Pack(CMsgPacker *pPacker) const
528 {
529 pPacker->AddInt(i: m_Mode);
530 pPacker->AddInt(i: m_ClientId);
531 pPacker->AddInt(i: m_TargetId);
532 pPacker->AddString(pStr: m_pMessage, Limit: -1);
533 return pPacker->Error() != 0;
534 }
535};
536
537struct CNetMsg_Sv_Team
538{
539 using is_sixup = char;
540 static constexpr int ms_MsgId = NETMSGTYPE_SV_TEAM;
541 int m_ClientId;
542 int m_Team;
543 int m_Silent;
544 int m_CooldownTick;
545
546 bool Pack(CMsgPacker *pPacker) const
547 {
548 pPacker->AddInt(i: m_ClientId);
549 pPacker->AddInt(i: m_Team);
550 pPacker->AddInt(i: m_Silent);
551 pPacker->AddInt(i: m_CooldownTick);
552 return pPacker->Error() != 0;
553 }
554};
555
556struct CNetMsg_Sv_KillMsg
557{
558 using is_sixup = char;
559 static constexpr int ms_MsgId = NETMSGTYPE_SV_KILLMSG;
560 int m_Killer;
561 int m_Victim;
562 int m_Weapon;
563 int m_ModeSpecial;
564
565 bool Pack(CMsgPacker *pPacker) const
566 {
567 pPacker->AddInt(i: m_Killer);
568 pPacker->AddInt(i: m_Victim);
569 pPacker->AddInt(i: m_Weapon);
570 pPacker->AddInt(i: m_ModeSpecial);
571 return pPacker->Error() != 0;
572 }
573};
574
575struct CNetMsg_Sv_TuneParams
576{
577 using is_sixup = char;
578 static constexpr int ms_MsgId = NETMSGTYPE_SV_TUNEPARAMS;
579
580 bool Pack(CMsgPacker *pPacker) const
581 {
582 return pPacker->Error() != 0;
583 }
584};
585
586struct CNetMsg_Unused
587{
588 using is_sixup = char;
589 static constexpr int ms_MsgId = NETMSGTYPE_UNUSED;
590
591 bool Pack(CMsgPacker *pPacker) const
592 {
593 return pPacker->Error() != 0;
594 }
595};
596
597struct CNetMsg_Sv_ReadyToEnter
598{
599 using is_sixup = char;
600 static constexpr int ms_MsgId = NETMSGTYPE_SV_READYTOENTER;
601
602 bool Pack(CMsgPacker *pPacker) const
603 {
604 return pPacker->Error() != 0;
605 }
606};
607
608struct CNetMsg_Sv_WeaponPickup
609{
610 using is_sixup = char;
611 static constexpr int ms_MsgId = NETMSGTYPE_SV_WEAPONPICKUP;
612 int m_Weapon;
613
614 bool Pack(CMsgPacker *pPacker) const
615 {
616 pPacker->AddInt(i: m_Weapon);
617 return pPacker->Error() != 0;
618 }
619};
620
621struct CNetMsg_Sv_Emoticon
622{
623 using is_sixup = char;
624 static constexpr int ms_MsgId = NETMSGTYPE_SV_EMOTICON;
625 int m_ClientId;
626 int m_Emoticon;
627
628 bool Pack(CMsgPacker *pPacker) const
629 {
630 pPacker->AddInt(i: m_ClientId);
631 pPacker->AddInt(i: m_Emoticon);
632 return pPacker->Error() != 0;
633 }
634};
635
636struct CNetMsg_Sv_VoteClearOptions
637{
638 using is_sixup = char;
639 static constexpr int ms_MsgId = NETMSGTYPE_SV_VOTECLEAROPTIONS;
640
641 bool Pack(CMsgPacker *pPacker) const
642 {
643 return pPacker->Error() != 0;
644 }
645};
646
647struct CNetMsg_Sv_VoteOptionListAdd
648{
649 using is_sixup = char;
650 static constexpr int ms_MsgId = NETMSGTYPE_SV_VOTEOPTIONLISTADD;
651
652 bool Pack(CMsgPacker *pPacker) const
653 {
654 return pPacker->Error() != 0;
655 }
656};
657
658struct CNetMsg_Sv_VoteOptionAdd
659{
660 using is_sixup = char;
661 static constexpr int ms_MsgId = NETMSGTYPE_SV_VOTEOPTIONADD;
662 const char *m_pDescription;
663
664 bool Pack(CMsgPacker *pPacker) const
665 {
666 pPacker->AddString(pStr: m_pDescription, Limit: -1);
667 return pPacker->Error() != 0;
668 }
669};
670
671struct CNetMsg_Sv_VoteOptionRemove
672{
673 using is_sixup = char;
674 static constexpr int ms_MsgId = NETMSGTYPE_SV_VOTEOPTIONREMOVE;
675 const char *m_pDescription;
676
677 bool Pack(CMsgPacker *pPacker) const
678 {
679 pPacker->AddString(pStr: m_pDescription, Limit: -1);
680 return pPacker->Error() != 0;
681 }
682};
683
684struct CNetMsg_Sv_VoteSet
685{
686 using is_sixup = char;
687 static constexpr int ms_MsgId = NETMSGTYPE_SV_VOTESET;
688 int m_ClientId;
689 int m_Type;
690 int m_Timeout;
691 const char *m_pDescription;
692 const char *m_pReason;
693
694 bool Pack(CMsgPacker *pPacker) const
695 {
696 pPacker->AddInt(i: m_ClientId);
697 pPacker->AddInt(i: m_Type);
698 pPacker->AddInt(i: m_Timeout);
699 pPacker->AddString(pStr: m_pDescription, Limit: -1);
700 pPacker->AddString(pStr: m_pReason, Limit: -1);
701 return pPacker->Error() != 0;
702 }
703};
704
705struct CNetMsg_Sv_VoteStatus
706{
707 using is_sixup = char;
708 static constexpr int ms_MsgId = NETMSGTYPE_SV_VOTESTATUS;
709 int m_Yes;
710 int m_No;
711 int m_Pass;
712 int m_Total;
713
714 bool Pack(CMsgPacker *pPacker) const
715 {
716 pPacker->AddInt(i: m_Yes);
717 pPacker->AddInt(i: m_No);
718 pPacker->AddInt(i: m_Pass);
719 pPacker->AddInt(i: m_Total);
720 return pPacker->Error() != 0;
721 }
722};
723
724struct CNetMsg_Sv_ServerSettings
725{
726 using is_sixup = char;
727 static constexpr int ms_MsgId = NETMSGTYPE_SV_SERVERSETTINGS;
728 int m_KickVote;
729 int m_KickMin;
730 int m_SpecVote;
731 int m_TeamLock;
732 int m_TeamBalance;
733 int m_PlayerSlots;
734
735 bool Pack(CMsgPacker *pPacker) const
736 {
737 pPacker->AddInt(i: m_KickVote);
738 pPacker->AddInt(i: m_KickMin);
739 pPacker->AddInt(i: m_SpecVote);
740 pPacker->AddInt(i: m_TeamLock);
741 pPacker->AddInt(i: m_TeamBalance);
742 pPacker->AddInt(i: m_PlayerSlots);
743 return pPacker->Error() != 0;
744 }
745};
746
747struct CNetMsg_Sv_ClientInfo
748{
749 using is_sixup = char;
750 static constexpr int ms_MsgId = NETMSGTYPE_SV_CLIENTINFO;
751 int m_ClientId;
752 int m_Local;
753 int m_Team;
754 const char *m_pName;
755 const char *m_pClan;
756 int m_Country;
757 const char *m_apSkinPartNames[6];
758 int m_aUseCustomColors[6];
759 int m_aSkinPartColors[6];
760 int m_Silent;
761
762 bool Pack(CMsgPacker *pPacker) const
763 {
764 pPacker->AddInt(i: m_ClientId);
765 pPacker->AddInt(i: m_Local);
766 pPacker->AddInt(i: m_Team);
767 pPacker->AddString(pStr: m_pName, Limit: -1);
768 pPacker->AddString(pStr: m_pClan, Limit: -1);
769 pPacker->AddInt(i: m_Country);
770 pPacker->AddString(pStr: m_apSkinPartNames[0], Limit: -1);
771 pPacker->AddString(pStr: m_apSkinPartNames[1], Limit: -1);
772 pPacker->AddString(pStr: m_apSkinPartNames[2], Limit: -1);
773 pPacker->AddString(pStr: m_apSkinPartNames[3], Limit: -1);
774 pPacker->AddString(pStr: m_apSkinPartNames[4], Limit: -1);
775 pPacker->AddString(pStr: m_apSkinPartNames[5], Limit: -1);
776 pPacker->AddInt(i: m_aUseCustomColors[0]);
777 pPacker->AddInt(i: m_aUseCustomColors[1]);
778 pPacker->AddInt(i: m_aUseCustomColors[2]);
779 pPacker->AddInt(i: m_aUseCustomColors[3]);
780 pPacker->AddInt(i: m_aUseCustomColors[4]);
781 pPacker->AddInt(i: m_aUseCustomColors[5]);
782 pPacker->AddInt(i: m_aSkinPartColors[0]);
783 pPacker->AddInt(i: m_aSkinPartColors[1]);
784 pPacker->AddInt(i: m_aSkinPartColors[2]);
785 pPacker->AddInt(i: m_aSkinPartColors[3]);
786 pPacker->AddInt(i: m_aSkinPartColors[4]);
787 pPacker->AddInt(i: m_aSkinPartColors[5]);
788 pPacker->AddInt(i: m_Silent);
789 return pPacker->Error() != 0;
790 }
791};
792
793struct CNetMsg_Sv_GameInfo
794{
795 using is_sixup = char;
796 static constexpr int ms_MsgId = NETMSGTYPE_SV_GAMEINFO;
797 int m_GameFlags;
798 int m_ScoreLimit;
799 int m_TimeLimit;
800 int m_MatchNum;
801 int m_MatchCurrent;
802
803 bool Pack(CMsgPacker *pPacker) const
804 {
805 pPacker->AddInt(i: m_GameFlags);
806 pPacker->AddInt(i: m_ScoreLimit);
807 pPacker->AddInt(i: m_TimeLimit);
808 pPacker->AddInt(i: m_MatchNum);
809 pPacker->AddInt(i: m_MatchCurrent);
810 return pPacker->Error() != 0;
811 }
812};
813
814struct CNetMsg_Sv_ClientDrop
815{
816 using is_sixup = char;
817 static constexpr int ms_MsgId = NETMSGTYPE_SV_CLIENTDROP;
818 int m_ClientId;
819 const char *m_pReason;
820 int m_Silent;
821
822 bool Pack(CMsgPacker *pPacker) const
823 {
824 pPacker->AddInt(i: m_ClientId);
825 pPacker->AddString(pStr: m_pReason, Limit: -1);
826 pPacker->AddInt(i: m_Silent);
827 return pPacker->Error() != 0;
828 }
829};
830
831struct CNetMsg_Sv_GameMsg
832{
833 using is_sixup = char;
834 static constexpr int ms_MsgId = NETMSGTYPE_SV_GAMEMSG;
835
836 bool Pack(CMsgPacker *pPacker) const
837 {
838 return pPacker->Error() != 0;
839 }
840};
841
842struct CNetMsg_De_ClientEnter
843{
844 using is_sixup = char;
845 static constexpr int ms_MsgId = NETMSGTYPE_DE_CLIENTENTER;
846 const char *m_pName;
847 int m_ClientId;
848 int m_Team;
849
850 bool Pack(CMsgPacker *pPacker) const
851 {
852 pPacker->AddString(pStr: m_pName, Limit: -1);
853 pPacker->AddInt(i: m_ClientId);
854 pPacker->AddInt(i: m_Team);
855 return pPacker->Error() != 0;
856 }
857};
858
859struct CNetMsg_De_ClientLeave
860{
861 using is_sixup = char;
862 static constexpr int ms_MsgId = NETMSGTYPE_DE_CLIENTLEAVE;
863 const char *m_pName;
864 int m_ClientId;
865 const char *m_pReason;
866
867 bool Pack(CMsgPacker *pPacker) const
868 {
869 pPacker->AddString(pStr: m_pName, Limit: -1);
870 pPacker->AddInt(i: m_ClientId);
871 pPacker->AddString(pStr: m_pReason, Limit: -1);
872 return pPacker->Error() != 0;
873 }
874};
875
876struct CNetMsg_Cl_Say
877{
878 using is_sixup = char;
879 static constexpr int ms_MsgId = NETMSGTYPE_CL_SAY;
880 int m_Mode;
881 int m_Target;
882 const char *m_pMessage;
883
884 bool Pack(CMsgPacker *pPacker) const
885 {
886 pPacker->AddInt(i: m_Mode);
887 pPacker->AddInt(i: m_Target);
888 pPacker->AddString(pStr: m_pMessage, Limit: -1);
889 return pPacker->Error() != 0;
890 }
891};
892
893struct CNetMsg_Cl_SetTeam
894{
895 using is_sixup = char;
896 static constexpr int ms_MsgId = NETMSGTYPE_CL_SETTEAM;
897 int m_Team;
898
899 bool Pack(CMsgPacker *pPacker) const
900 {
901 pPacker->AddInt(i: m_Team);
902 return pPacker->Error() != 0;
903 }
904};
905
906struct CNetMsg_Cl_SetSpectatorMode
907{
908 using is_sixup = char;
909 static constexpr int ms_MsgId = NETMSGTYPE_CL_SETSPECTATORMODE;
910 int m_SpecMode;
911 int m_SpectatorId;
912
913 bool Pack(CMsgPacker *pPacker) const
914 {
915 pPacker->AddInt(i: m_SpecMode);
916 pPacker->AddInt(i: m_SpectatorId);
917 return pPacker->Error() != 0;
918 }
919};
920
921struct CNetMsg_Cl_StartInfo
922{
923 using is_sixup = char;
924 static constexpr int ms_MsgId = NETMSGTYPE_CL_STARTINFO;
925 const char *m_pName;
926 const char *m_pClan;
927 int m_Country;
928 const char *m_apSkinPartNames[6];
929 int m_aUseCustomColors[6];
930 int m_aSkinPartColors[6];
931
932 bool Pack(CMsgPacker *pPacker) const
933 {
934 pPacker->AddString(pStr: m_pName, Limit: -1);
935 pPacker->AddString(pStr: m_pClan, Limit: -1);
936 pPacker->AddInt(i: m_Country);
937 pPacker->AddString(pStr: m_apSkinPartNames[0], Limit: -1);
938 pPacker->AddString(pStr: m_apSkinPartNames[1], Limit: -1);
939 pPacker->AddString(pStr: m_apSkinPartNames[2], Limit: -1);
940 pPacker->AddString(pStr: m_apSkinPartNames[3], Limit: -1);
941 pPacker->AddString(pStr: m_apSkinPartNames[4], Limit: -1);
942 pPacker->AddString(pStr: m_apSkinPartNames[5], Limit: -1);
943 pPacker->AddInt(i: m_aUseCustomColors[0]);
944 pPacker->AddInt(i: m_aUseCustomColors[1]);
945 pPacker->AddInt(i: m_aUseCustomColors[2]);
946 pPacker->AddInt(i: m_aUseCustomColors[3]);
947 pPacker->AddInt(i: m_aUseCustomColors[4]);
948 pPacker->AddInt(i: m_aUseCustomColors[5]);
949 pPacker->AddInt(i: m_aSkinPartColors[0]);
950 pPacker->AddInt(i: m_aSkinPartColors[1]);
951 pPacker->AddInt(i: m_aSkinPartColors[2]);
952 pPacker->AddInt(i: m_aSkinPartColors[3]);
953 pPacker->AddInt(i: m_aSkinPartColors[4]);
954 pPacker->AddInt(i: m_aSkinPartColors[5]);
955 return pPacker->Error() != 0;
956 }
957};
958
959struct CNetMsg_Cl_Kill
960{
961 using is_sixup = char;
962 static constexpr int ms_MsgId = NETMSGTYPE_CL_KILL;
963
964 bool Pack(CMsgPacker *pPacker) const
965 {
966 return pPacker->Error() != 0;
967 }
968};
969
970struct CNetMsg_Cl_ReadyChange
971{
972 using is_sixup = char;
973 static constexpr int ms_MsgId = NETMSGTYPE_CL_READYCHANGE;
974
975 bool Pack(CMsgPacker *pPacker) const
976 {
977 return pPacker->Error() != 0;
978 }
979};
980
981struct CNetMsg_Cl_Emoticon
982{
983 using is_sixup = char;
984 static constexpr int ms_MsgId = NETMSGTYPE_CL_EMOTICON;
985 int m_Emoticon;
986
987 bool Pack(CMsgPacker *pPacker) const
988 {
989 pPacker->AddInt(i: m_Emoticon);
990 return pPacker->Error() != 0;
991 }
992};
993
994struct CNetMsg_Cl_Vote
995{
996 using is_sixup = char;
997 static constexpr int ms_MsgId = NETMSGTYPE_CL_VOTE;
998 int m_Vote;
999
1000 bool Pack(CMsgPacker *pPacker) const
1001 {
1002 pPacker->AddInt(i: m_Vote);
1003 return pPacker->Error() != 0;
1004 }
1005};
1006
1007struct CNetMsg_Cl_CallVote
1008{
1009 using is_sixup = char;
1010 static constexpr int ms_MsgId = NETMSGTYPE_CL_CALLVOTE;
1011 const char *m_pType;
1012 const char *m_pValue;
1013 const char *m_pReason;
1014 int m_Force;
1015
1016 bool Pack(CMsgPacker *pPacker) const
1017 {
1018 pPacker->AddString(pStr: m_pType, Limit: -1);
1019 pPacker->AddString(pStr: m_pValue, Limit: -1);
1020 pPacker->AddString(pStr: m_pReason, Limit: -1);
1021 pPacker->AddInt(i: m_Force);
1022 return pPacker->Error() != 0;
1023 }
1024};
1025
1026struct CNetMsg_Sv_SkinChange
1027{
1028 using is_sixup = char;
1029 static constexpr int ms_MsgId = NETMSGTYPE_SV_SKINCHANGE;
1030 int m_ClientId;
1031 const char *m_apSkinPartNames[6];
1032 int m_aUseCustomColors[6];
1033 int m_aSkinPartColors[6];
1034
1035 bool Pack(CMsgPacker *pPacker) const
1036 {
1037 pPacker->AddInt(i: m_ClientId);
1038 pPacker->AddString(pStr: m_apSkinPartNames[0], Limit: -1);
1039 pPacker->AddString(pStr: m_apSkinPartNames[1], Limit: -1);
1040 pPacker->AddString(pStr: m_apSkinPartNames[2], Limit: -1);
1041 pPacker->AddString(pStr: m_apSkinPartNames[3], Limit: -1);
1042 pPacker->AddString(pStr: m_apSkinPartNames[4], Limit: -1);
1043 pPacker->AddString(pStr: m_apSkinPartNames[5], Limit: -1);
1044 pPacker->AddInt(i: m_aUseCustomColors[0]);
1045 pPacker->AddInt(i: m_aUseCustomColors[1]);
1046 pPacker->AddInt(i: m_aUseCustomColors[2]);
1047 pPacker->AddInt(i: m_aUseCustomColors[3]);
1048 pPacker->AddInt(i: m_aUseCustomColors[4]);
1049 pPacker->AddInt(i: m_aUseCustomColors[5]);
1050 pPacker->AddInt(i: m_aSkinPartColors[0]);
1051 pPacker->AddInt(i: m_aSkinPartColors[1]);
1052 pPacker->AddInt(i: m_aSkinPartColors[2]);
1053 pPacker->AddInt(i: m_aSkinPartColors[3]);
1054 pPacker->AddInt(i: m_aSkinPartColors[4]);
1055 pPacker->AddInt(i: m_aSkinPartColors[5]);
1056 return pPacker->Error() != 0;
1057 }
1058};
1059
1060struct CNetMsg_Cl_SkinChange
1061{
1062 using is_sixup = char;
1063 static constexpr int ms_MsgId = NETMSGTYPE_CL_SKINCHANGE;
1064 const char *m_apSkinPartNames[6];
1065 int m_aUseCustomColors[6];
1066 int m_aSkinPartColors[6];
1067
1068 bool Pack(CMsgPacker *pPacker) const
1069 {
1070 pPacker->AddString(pStr: m_apSkinPartNames[0], Limit: -1);
1071 pPacker->AddString(pStr: m_apSkinPartNames[1], Limit: -1);
1072 pPacker->AddString(pStr: m_apSkinPartNames[2], Limit: -1);
1073 pPacker->AddString(pStr: m_apSkinPartNames[3], Limit: -1);
1074 pPacker->AddString(pStr: m_apSkinPartNames[4], Limit: -1);
1075 pPacker->AddString(pStr: m_apSkinPartNames[5], Limit: -1);
1076 pPacker->AddInt(i: m_aUseCustomColors[0]);
1077 pPacker->AddInt(i: m_aUseCustomColors[1]);
1078 pPacker->AddInt(i: m_aUseCustomColors[2]);
1079 pPacker->AddInt(i: m_aUseCustomColors[3]);
1080 pPacker->AddInt(i: m_aUseCustomColors[4]);
1081 pPacker->AddInt(i: m_aUseCustomColors[5]);
1082 pPacker->AddInt(i: m_aSkinPartColors[0]);
1083 pPacker->AddInt(i: m_aSkinPartColors[1]);
1084 pPacker->AddInt(i: m_aSkinPartColors[2]);
1085 pPacker->AddInt(i: m_aSkinPartColors[3]);
1086 pPacker->AddInt(i: m_aSkinPartColors[4]);
1087 pPacker->AddInt(i: m_aSkinPartColors[5]);
1088 return pPacker->Error() != 0;
1089 }
1090};
1091
1092struct CNetMsg_Sv_RaceFinish
1093{
1094 using is_sixup = char;
1095 static constexpr int ms_MsgId = NETMSGTYPE_SV_RACEFINISH;
1096 int m_ClientId;
1097 int m_Time;
1098 int m_Diff;
1099 int m_RecordPersonal;
1100 int m_RecordServer;
1101
1102 bool Pack(CMsgPacker *pPacker) const
1103 {
1104 pPacker->AddInt(i: m_ClientId);
1105 pPacker->AddInt(i: m_Time);
1106 pPacker->AddInt(i: m_Diff);
1107 pPacker->AddInt(i: m_RecordPersonal);
1108 pPacker->AddInt(i: m_RecordServer);
1109 return pPacker->Error() != 0;
1110 }
1111};
1112
1113struct CNetMsg_Sv_Checkpoint
1114{
1115 using is_sixup = char;
1116 static constexpr int ms_MsgId = NETMSGTYPE_SV_CHECKPOINT;
1117 int m_Diff;
1118
1119 bool Pack(CMsgPacker *pPacker) const
1120 {
1121 pPacker->AddInt(i: m_Diff);
1122 return pPacker->Error() != 0;
1123 }
1124};
1125
1126struct CNetMsg_Sv_CommandInfo
1127{
1128 using is_sixup = char;
1129 static constexpr int ms_MsgId = NETMSGTYPE_SV_COMMANDINFO;
1130 const char *m_pName;
1131 const char *m_pArgsFormat;
1132 const char *m_pHelpText;
1133
1134 bool Pack(CMsgPacker *pPacker) const
1135 {
1136 pPacker->AddString(pStr: m_pName, Limit: -1);
1137 pPacker->AddString(pStr: m_pArgsFormat, Limit: -1);
1138 pPacker->AddString(pStr: m_pHelpText, Limit: -1);
1139 return pPacker->Error() != 0;
1140 }
1141};
1142
1143struct CNetMsg_Sv_CommandInfoRemove
1144{
1145 using is_sixup = char;
1146 static constexpr int ms_MsgId = NETMSGTYPE_SV_COMMANDINFOREMOVE;
1147 const char *m_pName;
1148
1149 bool Pack(CMsgPacker *pPacker) const
1150 {
1151 pPacker->AddString(pStr: m_pName, Limit: -1);
1152 return pPacker->Error() != 0;
1153 }
1154};
1155
1156struct CNetMsg_Cl_Command
1157{
1158 using is_sixup = char;
1159 static constexpr int ms_MsgId = NETMSGTYPE_CL_COMMAND;
1160 const char *m_pName;
1161 const char *m_pArguments;
1162
1163 bool Pack(CMsgPacker *pPacker) const
1164 {
1165 pPacker->AddString(pStr: m_pName, Limit: -1);
1166 pPacker->AddString(pStr: m_pArguments, Limit: -1);
1167 return pPacker->Error() != 0;
1168 }
1169};
1170
1171enum
1172{
1173 SOUND_GUN_FIRE=0,
1174 SOUND_SHOTGUN_FIRE,
1175 SOUND_GRENADE_FIRE,
1176 SOUND_HAMMER_FIRE,
1177 SOUND_HAMMER_HIT,
1178 SOUND_NINJA_FIRE,
1179 SOUND_GRENADE_EXPLODE,
1180 SOUND_NINJA_HIT,
1181 SOUND_LASER_FIRE,
1182 SOUND_LASER_BOUNCE,
1183 SOUND_WEAPON_SWITCH,
1184 SOUND_PLAYER_PAIN_SHORT,
1185 SOUND_PLAYER_PAIN_LONG,
1186 SOUND_BODY_LAND,
1187 SOUND_PLAYER_AIRJUMP,
1188 SOUND_PLAYER_JUMP,
1189 SOUND_PLAYER_DIE,
1190 SOUND_PLAYER_SPAWN,
1191 SOUND_PLAYER_SKID,
1192 SOUND_TEE_CRY,
1193 SOUND_HOOK_LOOP,
1194 SOUND_HOOK_ATTACH_GROUND,
1195 SOUND_HOOK_ATTACH_PLAYER,
1196 SOUND_HOOK_NOATTACH,
1197 SOUND_PICKUP_HEALTH,
1198 SOUND_PICKUP_ARMOR,
1199 SOUND_PICKUP_GRENADE,
1200 SOUND_PICKUP_SHOTGUN,
1201 SOUND_PICKUP_NINJA,
1202 SOUND_WEAPON_SPAWN,
1203 SOUND_WEAPON_NOAMMO,
1204 SOUND_HIT,
1205 SOUND_CHAT_SERVER,
1206 SOUND_CHAT_CLIENT,
1207 SOUND_CHAT_HIGHLIGHT,
1208 SOUND_CTF_DROP,
1209 SOUND_CTF_RETURN,
1210 SOUND_CTF_GRAB_PL,
1211 SOUND_CTF_GRAB_EN,
1212 SOUND_CTF_CAPTURE,
1213 SOUND_MENU,
1214 NUM_SOUNDS
1215};
1216enum
1217{
1218 WEAPON_HAMMER=0,
1219 WEAPON_GUN,
1220 WEAPON_SHOTGUN,
1221 WEAPON_GRENADE,
1222 WEAPON_LASER,
1223 WEAPON_NINJA,
1224 NUM_WEAPONS
1225};
1226
1227
1228 class CNetObjHandler
1229 {
1230 const char *m_pMsgFailedOn;
1231 char m_aMsgData[1024];
1232 const char *m_pObjFailedOn;
1233 int m_NumObjFailures;
1234 bool CheckInt(const char *pErrorMsg, int Value, int Min, int Max);
1235 bool CheckFlag(const char *pErrorMsg, int Value, int Mask);
1236
1237 static const char *ms_apObjNames[];
1238 static int ms_aObjSizes[];
1239 static const char *ms_apMsgNames[];
1240
1241 public:
1242 CNetObjHandler();
1243
1244 int ValidateObj(int Type, const void *pData, int Size);
1245 const char *GetObjName(int Type) const;
1246 int GetObjSize(int Type) const;
1247 const char *FailedObjOn() const;
1248 int NumObjFailures() const;
1249
1250 const char *GetMsgName(int Type) const;
1251 void *SecureUnpackMsg(int Type, CUnpacker *pUnpacker);
1252 const char *FailedMsgOn() const;
1253 };
1254
1255
1256}
1257#endif // GAME_GENERATED_PROTOCOL7_H
1258