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