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