├── .gitignore ├── LICENSE ├── README.md ├── protobufs ├── base_gcmessages_csgo.proto ├── c_peer2peer_netmessages.proto ├── clientmessages.proto ├── connectionless_netmessages.proto ├── cs_gameevents.proto ├── cs_usercmd.proto ├── cstrike15_gcmessages.proto ├── cstrike15_usermessages.proto ├── demo.proto ├── econ_gcmessages.proto ├── engine_gcmessages.proto ├── fatdemo.proto ├── gameevents.proto ├── gcsdk_gcmessages.proto ├── gcsystemmsgs.proto ├── generated │ ├── base_gcmessages_csgo.pb.cc │ ├── base_gcmessages_csgo.pb.h │ ├── c_peer2peer_netmessages.pb.cc │ ├── c_peer2peer_netmessages.pb.h │ ├── clientmessages.pb.cc │ ├── clientmessages.pb.h │ ├── connectionless_netmessages.pb.cc │ ├── connectionless_netmessages.pb.h │ ├── cs_gameevents.pb.cc │ ├── cs_gameevents.pb.h │ ├── cs_usercmd.pb.cc │ ├── cs_usercmd.pb.h │ ├── cstrike15_gcmessages.pb.cc │ ├── cstrike15_gcmessages.pb.h │ ├── cstrike15_usermessages.pb.cc │ ├── cstrike15_usermessages.pb.h │ ├── demo.pb.cc │ ├── demo.pb.h │ ├── econ_gcmessages.pb.cc │ ├── econ_gcmessages.pb.h │ ├── engine_gcmessages.pb.cc │ ├── engine_gcmessages.pb.h │ ├── fatdemo.pb.cc │ ├── fatdemo.pb.h │ ├── gameevents.pb.cc │ ├── gameevents.pb.h │ ├── gcsdk_gcmessages.pb.cc │ ├── gcsdk_gcmessages.pb.h │ ├── gcsystemmsgs.pb.cc │ ├── gcsystemmsgs.pb.h │ ├── netmessages.pb.cc │ ├── netmessages.pb.h │ ├── network_connection.pb.cc │ ├── network_connection.pb.h │ ├── networkbasetypes.pb.cc │ ├── networkbasetypes.pb.h │ ├── networksystem_protomessages.pb.cc │ ├── networksystem_protomessages.pb.h │ ├── steamdatagram_messages_auth.pb.cc │ ├── steamdatagram_messages_auth.pb.h │ ├── steamdatagram_messages_sdr.pb.cc │ ├── steamdatagram_messages_sdr.pb.h │ ├── steammessages.pb.cc │ ├── steammessages.pb.h │ ├── steammessages_cloud.steamworkssdk.pb.cc │ ├── steammessages_cloud.steamworkssdk.pb.h │ ├── steammessages_gamenetworkingui.pb.cc │ ├── steammessages_gamenetworkingui.pb.h │ ├── steammessages_helprequest.steamworkssdk.pb.cc │ ├── steammessages_helprequest.steamworkssdk.pb.h │ ├── steammessages_oauth.steamworkssdk.pb.cc │ ├── steammessages_oauth.steamworkssdk.pb.h │ ├── steammessages_player.steamworkssdk.pb.cc │ ├── steammessages_player.steamworkssdk.pb.h │ ├── steammessages_publishedfile.steamworkssdk.pb.cc │ ├── steammessages_publishedfile.steamworkssdk.pb.h │ ├── steammessages_unified_base.steamworkssdk.pb.cc │ ├── steammessages_unified_base.steamworkssdk.pb.h │ ├── steamnetworkingsockets_messages.pb.cc │ ├── steamnetworkingsockets_messages.pb.h │ ├── steamnetworkingsockets_messages_certs.pb.cc │ ├── steamnetworkingsockets_messages_certs.pb.h │ ├── steamnetworkingsockets_messages_udp.pb.cc │ ├── steamnetworkingsockets_messages_udp.pb.h │ ├── te.pb.cc │ ├── te.pb.h │ ├── uifontfile_format.pb.cc │ ├── uifontfile_format.pb.h │ ├── usercmd.pb.cc │ ├── usercmd.pb.h │ ├── usermessages.pb.cc │ ├── usermessages.pb.h │ ├── valveextensions.pb.cc │ └── valveextensions.pb.h ├── netmessages.proto ├── network_connection.proto ├── networkbasetypes.proto ├── networksystem_protomessages.proto ├── protoc │ ├── google │ │ └── protobuf │ │ │ └── descriptor.proto │ ├── protoc │ └── protoc_old ├── protocompile.sh ├── steamdatagram_messages_auth.proto ├── steamdatagram_messages_sdr.proto ├── steammessages.proto ├── steammessages_cloud.steamworkssdk.proto ├── steammessages_gamenetworkingui.proto ├── steammessages_helprequest.steamworkssdk.proto ├── steammessages_oauth.steamworkssdk.proto ├── steammessages_player.steamworkssdk.proto ├── steammessages_publishedfile.steamworkssdk.proto ├── steammessages_unified_base.steamworkssdk.proto ├── steamnetworkingsockets_messages.proto ├── steamnetworkingsockets_messages_certs.proto ├── steamnetworkingsockets_messages_udp.proto ├── te.proto ├── uifontfile_format.proto ├── usercmd.proto ├── usermessages.proto └── valveextensions.proto ├── src ├── cs2_sdk │ ├── entity │ │ ├── cbaseentity.h │ │ ├── cbaseplayercontroller.h │ │ └── cbaseplayerpawn.h │ ├── schema.cpp │ ├── schema.h │ └── serversideclient.h ├── extension.cpp ├── extension.h ├── interfaces.h ├── network_connection.pb.h └── utils │ ├── module.h │ ├── plat.h │ ├── plat_unix.cpp │ └── plat_win.cpp ├── vendor └── funchook │ ├── LICENSE │ ├── README.md │ ├── include │ └── funchook.h │ └── lib │ ├── Debug │ ├── distorm.lib │ ├── distorm.pdb │ ├── funchook.lib │ ├── funchook.pdb │ ├── libdistorm.a │ └── libfunchook.a │ └── Release │ ├── distorm.lib │ ├── funchook.lib │ ├── libdistorm.a │ └── libfunchook.a └── xmake.lua /.gitignore: -------------------------------------------------------------------------------- 1 | # Xmake cache 2 | .xmake/ 3 | build/ 4 | 5 | # MacOS Cache 6 | .DS_Store 7 | 8 | /.vs/ 9 | /vsxmake2022/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CS2VoiceFix 2 | 3 | Experimental plugin that attempts to fix voice chat breaking after addon unloads. -------------------------------------------------------------------------------- /protobufs/c_peer2peer_netmessages.proto: -------------------------------------------------------------------------------- 1 | import "netmessages.proto"; 2 | import "networkbasetypes.proto"; 3 | 4 | enum P2P_Messages { 5 | p2p_TextMessage = 256; 6 | p2p_Voice = 257; 7 | p2p_Ping = 258; 8 | p2p_VRAvatarPosition = 259; 9 | p2p_WatchSynchronization = 260; 10 | } 11 | 12 | message CP2P_TextMessage { 13 | optional bytes text = 1; 14 | } 15 | 16 | message CSteam_Voice_Encoding { 17 | optional bytes voice_data = 1; 18 | } 19 | 20 | message CP2P_Voice { 21 | enum Handler_Flags { 22 | Played_Audio = 1; 23 | } 24 | 25 | optional .CMsgVoiceAudio audio = 1; 26 | optional uint32 broadcast_group = 2; 27 | } 28 | 29 | message CP2P_Ping { 30 | required uint64 send_time = 1; 31 | required bool is_reply = 2; 32 | } 33 | 34 | message CP2P_VRAvatarPosition { 35 | message COrientation { 36 | optional .CMsgVector pos = 1; 37 | optional .CMsgQAngle ang = 2; 38 | } 39 | 40 | repeated .CP2P_VRAvatarPosition.COrientation body_parts = 1; 41 | optional int32 hat_id = 2; 42 | optional int32 scene_id = 3; 43 | optional int32 world_scale = 4; 44 | } 45 | 46 | message CP2P_WatchSynchronization { 47 | optional int32 demo_tick = 1; 48 | optional bool paused = 2; 49 | optional uint64 tv_listen_voice_indices = 3; 50 | optional int32 dota_spectator_mode = 4; 51 | optional bool dota_spectator_watching_broadcaster = 5; 52 | optional int32 dota_spectator_hero_index = 6; 53 | optional int32 dota_spectator_autospeed = 7; 54 | optional int32 dota_replay_speed = 8; 55 | } 56 | -------------------------------------------------------------------------------- /protobufs/clientmessages.proto: -------------------------------------------------------------------------------- 1 | enum EBaseClientMessages { 2 | CM_CustomGameEvent = 280; 3 | CM_CustomGameEventBounce = 281; 4 | CM_ClientUIEvent = 282; 5 | CM_DevPaletteVisibilityChanged = 283; 6 | CM_WorldUIControllerHasPanelChanged = 284; 7 | CM_RotateAnchor = 285; 8 | CM_ListenForResponseFound = 286; 9 | CM_MAX_BASE = 300; 10 | } 11 | 12 | enum EClientUIEvent { 13 | EClientUIEvent_Invalid = 0; 14 | EClientUIEvent_DialogFinished = 1; 15 | EClientUIEvent_FireOutput = 2; 16 | } 17 | 18 | message CClientMsg_CustomGameEvent { 19 | optional string event_name = 1; 20 | optional bytes data = 2; 21 | } 22 | 23 | message CClientMsg_CustomGameEventBounce { 24 | optional string event_name = 1; 25 | optional bytes data = 2; 26 | optional int32 player_slot = 3 [default = -1]; 27 | } 28 | 29 | message CClientMsg_ClientUIEvent { 30 | optional .EClientUIEvent event = 1 [default = EClientUIEvent_Invalid]; 31 | optional uint32 ent_ehandle = 2; 32 | optional uint32 client_ehandle = 3; 33 | optional string data1 = 4; 34 | optional string data2 = 5; 35 | } 36 | 37 | message CClientMsg_DevPaletteVisibilityChangedEvent { 38 | optional bool visible = 1; 39 | } 40 | 41 | message CClientMsg_WorldUIControllerHasPanelChangedEvent { 42 | optional bool has_panel = 1; 43 | optional uint32 client_ehandle = 2; 44 | optional uint32 literal_hand_type = 3; 45 | } 46 | 47 | message CClientMsg_RotateAnchor { 48 | optional float angle = 1; 49 | } 50 | 51 | message CClientMsg_ListenForResponseFound { 52 | optional int32 player_slot = 1 [default = -1]; 53 | } 54 | -------------------------------------------------------------------------------- /protobufs/connectionless_netmessages.proto: -------------------------------------------------------------------------------- 1 | import "netmessages.proto"; 2 | 3 | message C2S_CONNECT_Message { 4 | optional uint32 host_version = 1; 5 | optional uint32 auth_protocol = 2; 6 | optional uint32 challenge_number = 3; 7 | optional fixed64 reservation_cookie = 4; 8 | optional bool low_violence = 5; 9 | optional bytes encrypted_password = 6; 10 | repeated .CCLCMsg_SplitPlayerConnect splitplayers = 7; 11 | optional bytes auth_steam = 8; 12 | optional string challenge_context = 9; 13 | } 14 | 15 | message C2S_CONNECTION_Message { 16 | optional string addon_name = 1; 17 | } 18 | -------------------------------------------------------------------------------- /protobufs/cs_gameevents.proto: -------------------------------------------------------------------------------- 1 | import "networkbasetypes.proto"; 2 | 3 | enum ECsgoGameEvents { 4 | GE_PlayerAnimEventId = 450; 5 | GE_RadioIconEventId = 451; 6 | GE_FireBulletsId = 452; 7 | } 8 | 9 | message CMsgTEPlayerAnimEvent { 10 | optional fixed32 player = 1 [default = 16777215]; 11 | optional uint32 event = 2; 12 | optional int32 data = 3; 13 | } 14 | 15 | message CMsgTERadioIcon { 16 | optional fixed32 player = 1 [default = 16777215]; 17 | } 18 | 19 | message CMsgTEFireBullets { 20 | optional .CMsgVector origin = 1; 21 | optional .CMsgQAngle angles = 2; 22 | optional uint32 weapon_id = 3 [default = 16777215]; 23 | optional uint32 mode = 4; 24 | optional uint32 seed = 5; 25 | optional fixed32 player = 6 [default = 16777215]; 26 | optional float inaccuracy = 7; 27 | optional float recoil_index = 8; 28 | optional float spread = 9; 29 | optional int32 sound_type = 10; 30 | optional uint32 item_def_index = 11; 31 | optional fixed32 sound_dsp_effect = 12; 32 | optional .CMsgVector ent_origin = 13; 33 | optional uint32 num_bullets_remaining = 14; 34 | optional uint32 attack_type = 15; 35 | } 36 | -------------------------------------------------------------------------------- /protobufs/cs_usercmd.proto: -------------------------------------------------------------------------------- 1 | import "networkbasetypes.proto"; 2 | import "usercmd.proto"; 3 | 4 | message CSGOInterpolationInfoPB { 5 | optional int32 src_tick = 1 [default = -1]; 6 | optional int32 dst_tick = 2 [default = -1]; 7 | optional float frac = 3 [default = 0]; 8 | } 9 | 10 | message CSGOInputHistoryEntryPB { 11 | optional .CMsgQAngle view_angles = 2; 12 | optional int32 render_tick_count = 4; 13 | optional float render_tick_fraction = 5; 14 | optional int32 player_tick_count = 6; 15 | optional float player_tick_fraction = 7; 16 | optional .CSGOInterpolationInfoPB cl_interp = 12; 17 | optional .CSGOInterpolationInfoPB sv_interp0 = 13; 18 | optional .CSGOInterpolationInfoPB sv_interp1 = 14; 19 | optional .CSGOInterpolationInfoPB player_interp = 15; 20 | optional int32 frame_number = 20; 21 | optional int32 target_ent_index = 8 [default = -1]; 22 | optional .CMsgVector shoot_position = 3; 23 | optional .CMsgVector target_head_pos_check = 9; 24 | optional .CMsgVector target_abs_pos_check = 10; 25 | optional .CMsgQAngle target_abs_ang_check = 11; 26 | } 27 | 28 | message CSGOUserCmdPB { 29 | optional .CBaseUserCmdPB base = 1; 30 | repeated .CSGOInputHistoryEntryPB input_history = 2; 31 | optional int32 attack1_start_history_index = 6 [default = -1]; 32 | optional int32 attack2_start_history_index = 7 [default = -1]; 33 | optional int32 attack3_start_history_index = 8 [default = -1]; 34 | optional bool left_hand_desired = 9 [default = false]; 35 | } 36 | -------------------------------------------------------------------------------- /protobufs/demo.proto: -------------------------------------------------------------------------------- 1 | enum EDemoCommands { 2 | DEM_Error = -1; 3 | DEM_Stop = 0; 4 | DEM_FileHeader = 1; 5 | DEM_FileInfo = 2; 6 | DEM_SyncTick = 3; 7 | DEM_SendTables = 4; 8 | DEM_ClassInfo = 5; 9 | DEM_StringTables = 6; 10 | DEM_Packet = 7; 11 | DEM_SignonPacket = 8; 12 | DEM_ConsoleCmd = 9; 13 | DEM_CustomData = 10; 14 | DEM_CustomDataCallbacks = 11; 15 | DEM_UserCmd = 12; 16 | DEM_FullPacket = 13; 17 | DEM_SaveGame = 14; 18 | DEM_SpawnGroups = 15; 19 | DEM_AnimationData = 16; 20 | DEM_AnimationHeader = 17; 21 | DEM_Max = 18; 22 | DEM_IsCompressed = 64; 23 | } 24 | 25 | message CDemoFileHeader { 26 | required string demo_file_stamp = 1; 27 | optional int32 network_protocol = 2; 28 | optional string server_name = 3; 29 | optional string client_name = 4; 30 | optional string map_name = 5; 31 | optional string game_directory = 6; 32 | optional int32 fullpackets_version = 7; 33 | optional bool allow_clientside_entities = 8; 34 | optional bool allow_clientside_particles = 9; 35 | optional string addons = 10; 36 | optional string demo_version_name = 11; 37 | optional string demo_version_guid = 12; 38 | optional int32 build_num = 13; 39 | optional string game = 14; 40 | optional int32 server_start_tick = 15; 41 | } 42 | 43 | message CGameInfo { 44 | message CDotaGameInfo { 45 | message CPlayerInfo { 46 | optional string hero_name = 1; 47 | optional string player_name = 2; 48 | optional bool is_fake_client = 3; 49 | optional uint64 steamid = 4; 50 | optional int32 game_team = 5; 51 | } 52 | 53 | message CHeroSelectEvent { 54 | optional bool is_pick = 1; 55 | optional uint32 team = 2; 56 | optional uint32 hero_id = 3; 57 | } 58 | 59 | optional uint64 match_id = 1; 60 | optional int32 game_mode = 2; 61 | optional int32 game_winner = 3; 62 | repeated .CGameInfo.CDotaGameInfo.CPlayerInfo player_info = 4; 63 | optional uint32 leagueid = 5; 64 | repeated .CGameInfo.CDotaGameInfo.CHeroSelectEvent picks_bans = 6; 65 | optional uint32 radiant_team_id = 7; 66 | optional uint32 dire_team_id = 8; 67 | optional string radiant_team_tag = 9; 68 | optional string dire_team_tag = 10; 69 | optional uint32 end_time = 11; 70 | } 71 | 72 | message CCSGameInfo { 73 | repeated int32 round_start_ticks = 1; 74 | } 75 | 76 | optional .CGameInfo.CDotaGameInfo dota = 4; 77 | optional .CGameInfo.CCSGameInfo cs = 5; 78 | } 79 | 80 | message CDemoFileInfo { 81 | optional float playback_time = 1; 82 | optional int32 playback_ticks = 2; 83 | optional int32 playback_frames = 3; 84 | optional .CGameInfo game_info = 4; 85 | } 86 | 87 | message CDemoPacket { 88 | optional bytes data = 3; 89 | } 90 | 91 | message CDemoFullPacket { 92 | optional .CDemoStringTables string_table = 1; 93 | optional .CDemoPacket packet = 2; 94 | } 95 | 96 | message CDemoSaveGame { 97 | optional bytes data = 1; 98 | optional fixed64 steam_id = 2; 99 | optional fixed64 signature = 3; 100 | optional int32 version = 4; 101 | } 102 | 103 | message CDemoSyncTick { 104 | } 105 | 106 | message CDemoConsoleCmd { 107 | optional string cmdstring = 1; 108 | } 109 | 110 | message CDemoSendTables { 111 | optional bytes data = 1; 112 | } 113 | 114 | message CDemoClassInfo { 115 | message class_t { 116 | optional int32 class_id = 1; 117 | optional string network_name = 2; 118 | optional string table_name = 3; 119 | } 120 | 121 | repeated .CDemoClassInfo.class_t classes = 1; 122 | } 123 | 124 | message CDemoCustomData { 125 | optional int32 callback_index = 1; 126 | optional bytes data = 2; 127 | } 128 | 129 | message CDemoCustomDataCallbacks { 130 | repeated string save_id = 1; 131 | } 132 | 133 | message CDemoAnimationHeader { 134 | optional sint32 entity_id = 1; 135 | optional int32 tick = 2; 136 | optional bytes data = 3; 137 | } 138 | 139 | message CDemoAnimationData { 140 | optional sint32 entity_id = 1; 141 | optional int32 start_tick = 2; 142 | optional int32 end_tick = 3; 143 | optional bytes data = 4; 144 | optional int64 data_checksum = 5; 145 | } 146 | 147 | message CDemoStringTables { 148 | message items_t { 149 | optional string str = 1; 150 | optional bytes data = 2; 151 | } 152 | 153 | message table_t { 154 | optional string table_name = 1; 155 | repeated .CDemoStringTables.items_t items = 2; 156 | repeated .CDemoStringTables.items_t items_clientside = 3; 157 | optional int32 table_flags = 4; 158 | } 159 | 160 | repeated .CDemoStringTables.table_t tables = 1; 161 | } 162 | 163 | message CDemoStop { 164 | } 165 | 166 | message CDemoUserCmd { 167 | optional int32 cmd_number = 1; 168 | optional bytes data = 2; 169 | } 170 | 171 | message CDemoSpawnGroups { 172 | repeated bytes msgs = 3; 173 | } 174 | -------------------------------------------------------------------------------- /protobufs/econ_gcmessages.proto: -------------------------------------------------------------------------------- 1 | import "steammessages.proto"; 2 | 3 | enum EGCItemMsg { 4 | k_EMsgGCBase = 1000; 5 | k_EMsgGCSetItemPosition = 1001; 6 | k_EMsgGCCraft = 1002; 7 | k_EMsgGCCraftResponse = 1003; 8 | k_EMsgGCDelete = 1004; 9 | k_EMsgGCVerifyCacheSubscription = 1005; 10 | k_EMsgGCNameItem = 1006; 11 | k_EMsgGCUnlockCrate = 1007; 12 | k_EMsgGCUnlockCrateResponse = 1008; 13 | k_EMsgGCPaintItem = 1009; 14 | k_EMsgGCPaintItemResponse = 1010; 15 | k_EMsgGCGoldenWrenchBroadcast = 1011; 16 | k_EMsgGCMOTDRequest = 1012; 17 | k_EMsgGCMOTDRequestResponse = 1013; 18 | k_EMsgGCAddItemToSocket_DEPRECATED = 1014; 19 | k_EMsgGCAddItemToSocketResponse_DEPRECATED = 1015; 20 | k_EMsgGCAddSocketToBaseItem_DEPRECATED = 1016; 21 | k_EMsgGCAddSocketToItem_DEPRECATED = 1017; 22 | k_EMsgGCAddSocketToItemResponse_DEPRECATED = 1018; 23 | k_EMsgGCNameBaseItem = 1019; 24 | k_EMsgGCNameBaseItemResponse = 1020; 25 | k_EMsgGCRemoveSocketItem_DEPRECATED = 1021; 26 | k_EMsgGCRemoveSocketItemResponse_DEPRECATED = 1022; 27 | k_EMsgGCCustomizeItemTexture = 1023; 28 | k_EMsgGCCustomizeItemTextureResponse = 1024; 29 | k_EMsgGCUseItemRequest = 1025; 30 | k_EMsgGCUseItemResponse = 1026; 31 | k_EMsgGCGiftedItems_DEPRECATED = 1027; 32 | k_EMsgGCRemoveItemName = 1030; 33 | k_EMsgGCRemoveItemPaint = 1031; 34 | k_EMsgGCGiftWrapItem = 1032; 35 | k_EMsgGCGiftWrapItemResponse = 1033; 36 | k_EMsgGCDeliverGift = 1034; 37 | k_EMsgGCDeliverGiftResponseGiver = 1035; 38 | k_EMsgGCDeliverGiftResponseReceiver = 1036; 39 | k_EMsgGCUnwrapGiftRequest = 1037; 40 | k_EMsgGCUnwrapGiftResponse = 1038; 41 | k_EMsgGCSetItemStyle = 1039; 42 | k_EMsgGCUsedClaimCodeItem = 1040; 43 | k_EMsgGCSortItems = 1041; 44 | k_EMsgGC_RevolvingLootList_DEPRECATED = 1042; 45 | k_EMsgGCLookupAccount = 1043; 46 | k_EMsgGCLookupAccountResponse = 1044; 47 | k_EMsgGCLookupAccountName = 1045; 48 | k_EMsgGCLookupAccountNameResponse = 1046; 49 | k_EMsgGCUpdateItemSchema = 1049; 50 | k_EMsgGCRemoveCustomTexture = 1051; 51 | k_EMsgGCRemoveCustomTextureResponse = 1052; 52 | k_EMsgGCRemoveMakersMark = 1053; 53 | k_EMsgGCRemoveMakersMarkResponse = 1054; 54 | k_EMsgGCRemoveUniqueCraftIndex = 1055; 55 | k_EMsgGCRemoveUniqueCraftIndexResponse = 1056; 56 | k_EMsgGCSaxxyBroadcast = 1057; 57 | k_EMsgGCBackpackSortFinished = 1058; 58 | k_EMsgGCAdjustItemEquippedState = 1059; 59 | k_EMsgGCCollectItem = 1061; 60 | k_EMsgGCItemAcknowledged__DEPRECATED = 1062; 61 | k_EMsgGC_ReportAbuse = 1065; 62 | k_EMsgGC_ReportAbuseResponse = 1066; 63 | k_EMsgGCNameItemNotification = 1068; 64 | k_EMsgGCApplyConsumableEffects = 1069; 65 | k_EMsgGCConsumableExhausted = 1070; 66 | k_EMsgGCShowItemsPickedUp = 1071; 67 | k_EMsgGCClientDisplayNotification = 1072; 68 | k_EMsgGCApplyStrangePart = 1073; 69 | k_EMsgGC_IncrementKillCountAttribute = 1074; 70 | k_EMsgGC_IncrementKillCountResponse = 1075; 71 | k_EMsgGCApplyPennantUpgrade = 1076; 72 | k_EMsgGCSetItemPositions = 1077; 73 | k_EMsgGCApplyEggEssence = 1078; 74 | k_EMsgGCNameEggEssenceResponse = 1079; 75 | k_EMsgGCPaintKitItem = 1080; 76 | k_EMsgGCPaintKitBaseItem = 1081; 77 | k_EMsgGCPaintKitItemResponse = 1082; 78 | k_EMsgGCGiftedItems = 1083; 79 | k_EMsgGCUnlockItemStyle = 1084; 80 | k_EMsgGCUnlockItemStyleResponse = 1085; 81 | k_EMsgGCApplySticker = 1086; 82 | k_EMsgGCItemAcknowledged = 1087; 83 | k_EMsgGCStatTrakSwap = 1088; 84 | k_EMsgGCUserTrackTimePlayedConsecutively = 1089; 85 | k_EMsgGCItemCustomizationNotification = 1090; 86 | k_EMsgGCModifyItemAttribute = 1091; 87 | k_EMsgGCCasketItemAdd = 1092; 88 | k_EMsgGCCasketItemExtract = 1093; 89 | k_EMsgGCCasketItemLoadContents = 1094; 90 | k_EMsgGCTradingBase = 1500; 91 | k_EMsgGCTrading_InitiateTradeRequest = 1501; 92 | k_EMsgGCTrading_InitiateTradeResponse = 1502; 93 | k_EMsgGCTrading_StartSession = 1503; 94 | k_EMsgGCTrading_SetItem = 1504; 95 | k_EMsgGCTrading_RemoveItem = 1505; 96 | k_EMsgGCTrading_UpdateTradeInfo = 1506; 97 | k_EMsgGCTrading_SetReadiness = 1507; 98 | k_EMsgGCTrading_ReadinessResponse = 1508; 99 | k_EMsgGCTrading_SessionClosed = 1509; 100 | k_EMsgGCTrading_CancelSession = 1510; 101 | k_EMsgGCTrading_TradeChatMsg = 1511; 102 | k_EMsgGCTrading_ConfirmOffer = 1512; 103 | k_EMsgGCTrading_TradeTypingChatMsg = 1513; 104 | k_EMsgGCServerBrowser_FavoriteServer = 1601; 105 | k_EMsgGCServerBrowser_BlacklistServer = 1602; 106 | k_EMsgGCServerRentalsBase = 1700; 107 | k_EMsgGCItemPreviewCheckStatus = 1701; 108 | k_EMsgGCItemPreviewStatusResponse = 1702; 109 | k_EMsgGCItemPreviewRequest = 1703; 110 | k_EMsgGCItemPreviewRequestResponse = 1704; 111 | k_EMsgGCItemPreviewExpire = 1705; 112 | k_EMsgGCItemPreviewExpireNotification = 1706; 113 | k_EMsgGCItemPreviewItemBoughtNotification = 1707; 114 | k_EMsgGCDev_NewItemRequest = 2001; 115 | k_EMsgGCDev_NewItemRequestResponse = 2002; 116 | k_EMsgGCDev_PaintKitDropItem = 2003; 117 | k_EMsgGCDev_SchemaReservationRequest = 2004; 118 | k_EMsgGCStoreGetUserData = 2500; 119 | k_EMsgGCStoreGetUserDataResponse = 2501; 120 | k_EMsgGCStorePurchaseInit_DEPRECATED = 2502; 121 | k_EMsgGCStorePurchaseInitResponse_DEPRECATED = 2503; 122 | k_EMsgGCStorePurchaseFinalize = 2504; 123 | k_EMsgGCStorePurchaseFinalizeResponse = 2505; 124 | k_EMsgGCStorePurchaseCancel = 2506; 125 | k_EMsgGCStorePurchaseCancelResponse = 2507; 126 | k_EMsgGCStorePurchaseQueryTxn = 2508; 127 | k_EMsgGCStorePurchaseQueryTxnResponse = 2509; 128 | k_EMsgGCStorePurchaseInit = 2510; 129 | k_EMsgGCStorePurchaseInitResponse = 2511; 130 | k_EMsgGCBannedWordListRequest = 2512; 131 | k_EMsgGCBannedWordListResponse = 2513; 132 | k_EMsgGCToGCBannedWordListBroadcast = 2514; 133 | k_EMsgGCToGCBannedWordListUpdated = 2515; 134 | k_EMsgGCToGCDirtySDOCache = 2516; 135 | k_EMsgGCToGCDirtyMultipleSDOCache = 2517; 136 | k_EMsgGCToGCUpdateSQLKeyValue = 2518; 137 | k_EMsgGCToGCIsTrustedServer = 2519; 138 | k_EMsgGCToGCIsTrustedServerResponse = 2520; 139 | k_EMsgGCToGCBroadcastConsoleCommand = 2521; 140 | k_EMsgGCServerVersionUpdated = 2522; 141 | k_EMsgGCToGCWebAPIAccountChanged = 2524; 142 | k_EMsgGCRequestAnnouncements = 2525; 143 | k_EMsgGCRequestAnnouncementsResponse = 2526; 144 | k_EMsgGCRequestPassportItemGrant = 2527; 145 | k_EMsgGCClientVersionUpdated = 2528; 146 | k_EMsgGCAdjustItemEquippedStateMulti = 2529; 147 | k_EMsgGCRecurringSubscriptionStatus = 2530; 148 | k_EMsgGCAdjustEquipSlotsManual = 2531; 149 | k_EMsgGCAdjustEquipSlotsShuffle = 2532; 150 | k_EMsgGCNameItemAndEquip = 2533; 151 | k_EMsgGCOpenCrate = 2534; 152 | k_EMsgGCAcknowledgeRentalExpiration = 2535; 153 | } 154 | 155 | enum EGCMsgResponse { 156 | k_EGCMsgResponseOK = 0; 157 | k_EGCMsgResponseDenied = 1; 158 | k_EGCMsgResponseServerError = 2; 159 | k_EGCMsgResponseTimeout = 3; 160 | k_EGCMsgResponseInvalid = 4; 161 | k_EGCMsgResponseNoMatch = 5; 162 | k_EGCMsgResponseUnknownError = 6; 163 | k_EGCMsgResponseNotLoggedOn = 7; 164 | k_EGCMsgFailedToCreate = 8; 165 | k_EGCMsgLimitExceeded = 9; 166 | k_EGCMsgCommitUnfinalized = 10; 167 | } 168 | 169 | enum EUnlockStyle { 170 | k_UnlockStyle_Succeeded = 0; 171 | k_UnlockStyle_Failed_PreReq = 1; 172 | k_UnlockStyle_Failed_CantAfford = 2; 173 | k_UnlockStyle_Failed_CantCommit = 3; 174 | k_UnlockStyle_Failed_CantLockCache = 4; 175 | k_UnlockStyle_Failed_CantAffordAttrib = 5; 176 | } 177 | 178 | enum EGCItemCustomizationNotification { 179 | k_EGCItemCustomizationNotification_NameItem = 1006; 180 | k_EGCItemCustomizationNotification_UnlockCrate = 1007; 181 | k_EGCItemCustomizationNotification_XRayItemReveal = 1008; 182 | k_EGCItemCustomizationNotification_XRayItemClaim = 1009; 183 | k_EGCItemCustomizationNotification_CasketTooFull = 1011; 184 | k_EGCItemCustomizationNotification_CasketContents = 1012; 185 | k_EGCItemCustomizationNotification_CasketAdded = 1013; 186 | k_EGCItemCustomizationNotification_CasketRemoved = 1014; 187 | k_EGCItemCustomizationNotification_CasketInvFull = 1015; 188 | k_EGCItemCustomizationNotification_NameBaseItem = 1019; 189 | k_EGCItemCustomizationNotification_RemoveItemName = 1030; 190 | k_EGCItemCustomizationNotification_RemoveSticker = 1053; 191 | k_EGCItemCustomizationNotification_ApplySticker = 1086; 192 | k_EGCItemCustomizationNotification_StatTrakSwap = 1088; 193 | k_EGCItemCustomizationNotification_RemovePatch = 1089; 194 | k_EGCItemCustomizationNotification_ApplyPatch = 1090; 195 | k_EGCItemCustomizationNotification_ActivateFanToken = 9178; 196 | k_EGCItemCustomizationNotification_ActivateOperationCoin = 9179; 197 | k_EGCItemCustomizationNotification_GraffitiUnseal = 9185; 198 | k_EGCItemCustomizationNotification_GenerateSouvenir = 9204; 199 | k_EGCItemCustomizationNotification_ClientRedeemMissionReward = 9209; 200 | k_EGCItemCustomizationNotification_ClientRedeemFreeReward = 9219; 201 | } 202 | 203 | message CMsgGCGiftedItems { 204 | optional uint32 accountid = 1; 205 | optional uint32 giftdefindex = 2; 206 | optional uint32 max_gifts_possible = 3; 207 | optional uint32 num_eligible_recipients = 4; 208 | repeated uint32 recipients_accountids = 5; 209 | } 210 | 211 | message CMsgGCDev_SchemaReservationRequest { 212 | optional string schema_typename = 1; 213 | optional string instance_name = 2; 214 | optional uint64 id = 3; 215 | } 216 | 217 | message CMsgCasketItem { 218 | optional uint64 casket_item_id = 1; 219 | optional uint64 item_item_id = 2; 220 | } 221 | 222 | message CMsgGCUserTrackTimePlayedConsecutively { 223 | optional uint32 state = 1; 224 | } 225 | 226 | message CMsgGCItemCustomizationNotification { 227 | repeated uint64 item_id = 1; 228 | optional uint32 request = 2; 229 | } 230 | -------------------------------------------------------------------------------- /protobufs/engine_gcmessages.proto: -------------------------------------------------------------------------------- 1 | import "google/protobuf/descriptor.proto"; 2 | 3 | message CEngineGotvSyncPacket { 4 | optional uint64 match_id = 1; 5 | optional uint32 instance_id = 2; 6 | optional uint32 signupfragment = 3; 7 | optional uint32 currentfragment = 4; 8 | optional float tickrate = 5; 9 | optional uint32 tick = 6; 10 | optional float rtdelay = 8; 11 | optional float rcvage = 9; 12 | optional float keyframe_interval = 10; 13 | optional uint32 cdndelay = 11; 14 | } 15 | -------------------------------------------------------------------------------- /protobufs/fatdemo.proto: -------------------------------------------------------------------------------- 1 | import "networkbasetypes.proto"; 2 | 3 | enum EHitGroup { 4 | EHG_Generic = 0; 5 | EHG_Head = 1; 6 | EHG_Chest = 2; 7 | EHG_Stomach = 3; 8 | EHG_LeftArm = 4; 9 | EHG_RightArm = 5; 10 | EHG_LeftLeg = 6; 11 | EHG_RightLeg = 7; 12 | EHG_Gear = 8; 13 | EHG_Miss = 9; 14 | } 15 | 16 | enum ETeam { 17 | ET_Unknown = 0; 18 | ET_Spectator = 1; 19 | ET_Terrorist = 2; 20 | ET_CT = 3; 21 | } 22 | 23 | enum EWeaponType { 24 | EWT_Knife = 0; 25 | EWT_Pistol = 1; 26 | EWT_SubMachineGun = 2; 27 | EWT_Rifle = 3; 28 | EWT_Shotgun = 4; 29 | EWT_SniperRifle = 5; 30 | EWT_MachineGun = 6; 31 | EWT_C4 = 7; 32 | EWT_Grenade = 8; 33 | EWT_Equipment = 9; 34 | EWT_StackableItem = 10; 35 | EWT_Unknown = 11; 36 | } 37 | 38 | message MLDict { 39 | optional string key = 1; 40 | optional string val_string = 2; 41 | optional int32 val_int = 3; 42 | optional float val_float = 4; 43 | } 44 | 45 | message MLEvent { 46 | optional string event_name = 1; 47 | repeated .MLDict data = 2; 48 | } 49 | 50 | message MLMatchState { 51 | optional string game_mode = 1; 52 | optional string phase = 2; 53 | optional int32 round = 3; 54 | optional int32 score_ct = 4; 55 | optional int32 score_t = 5; 56 | } 57 | 58 | message MLRoundState { 59 | optional string phase = 1; 60 | optional .ETeam win_team = 2 [default = ET_Unknown]; 61 | optional string bomb_state = 3; 62 | } 63 | 64 | message MLWeaponState { 65 | optional int32 index = 1; 66 | optional string name = 2; 67 | optional .EWeaponType type = 3 [default = EWT_Knife]; 68 | optional int32 ammo_clip = 4; 69 | optional int32 ammo_clip_max = 5; 70 | optional int32 ammo_reserve = 6; 71 | optional string state = 7; 72 | optional float recoil_index = 8; 73 | } 74 | 75 | message MLPlayerState { 76 | optional int32 account_id = 1; 77 | optional int32 player_slot = 2 [default = -1]; 78 | optional int32 entindex = 3; 79 | optional string name = 4; 80 | optional string clan = 5; 81 | optional .ETeam team = 6 [default = ET_Unknown]; 82 | optional .CMsgVector abspos = 7; 83 | optional .CMsgQAngle eyeangle = 8; 84 | optional .CMsgVector eyeangle_fwd = 9; 85 | optional int32 health = 10; 86 | optional int32 armor = 11; 87 | optional float flashed = 12; 88 | optional float smoked = 13; 89 | optional int32 money = 14; 90 | optional int32 round_kills = 15; 91 | optional int32 round_killhs = 16; 92 | optional float burning = 17; 93 | optional bool helmet = 18; 94 | optional bool defuse_kit = 19; 95 | repeated .MLWeaponState weapons = 20; 96 | } 97 | 98 | message MLGameState { 99 | optional .MLMatchState match = 1; 100 | optional .MLRoundState round = 2; 101 | repeated .MLPlayerState players = 3; 102 | } 103 | 104 | message MLDemoHeader { 105 | optional string map_name = 1; 106 | optional int32 tick_rate = 2; 107 | optional uint32 version = 3; 108 | optional uint32 steam_universe = 4; 109 | } 110 | 111 | message MLTick { 112 | optional int32 tick_count = 1; 113 | optional .MLGameState state = 2; 114 | repeated .MLEvent events = 3; 115 | } 116 | 117 | message VacNetShot { 118 | optional fixed64 steamid_player = 1; 119 | optional int32 round_number = 2; 120 | optional int32 hit_type = 3; 121 | optional int32 weapon_type = 4; 122 | optional float distance_to_hurt_target = 5; 123 | repeated float delta_yaw_window = 6; 124 | repeated float delta_pitch_window = 7; 125 | } 126 | -------------------------------------------------------------------------------- /protobufs/gameevents.proto: -------------------------------------------------------------------------------- 1 | import "networkbasetypes.proto"; 2 | 3 | enum EBaseGameEvents { 4 | GE_VDebugGameSessionIDEvent = 200; 5 | GE_PlaceDecalEvent = 201; 6 | GE_ClearWorldDecalsEvent = 202; 7 | GE_ClearEntityDecalsEvent = 203; 8 | GE_ClearDecalsForSkeletonInstanceEvent = 204; 9 | GE_Source1LegacyGameEventList = 205; 10 | GE_Source1LegacyListenEvents = 206; 11 | GE_Source1LegacyGameEvent = 207; 12 | GE_SosStartSoundEvent = 208; 13 | GE_SosStopSoundEvent = 209; 14 | GE_SosSetSoundEventParams = 210; 15 | GE_SosSetLibraryStackFields = 211; 16 | GE_SosStopSoundEventHash = 212; 17 | } 18 | 19 | message CMsgVDebugGameSessionIDEvent { 20 | optional int32 clientid = 1; 21 | optional string gamesessionid = 2; 22 | } 23 | 24 | message CMsgPlaceDecalEvent { 25 | optional .CMsgVector position = 1; 26 | optional .CMsgVector normal = 2; 27 | optional .CMsgVector saxis = 3; 28 | optional uint32 decalmaterialindex = 4; 29 | optional uint32 flags = 5; 30 | optional fixed32 color = 6; 31 | optional float width = 7; 32 | optional float height = 8; 33 | optional float depth = 9; 34 | optional uint32 entityhandleindex = 10; 35 | optional fixed32 skeletoninstancehash = 11; 36 | optional int32 boneindex = 12; 37 | optional bool translucenthit = 13; 38 | optional bool is_adjacent = 14; 39 | } 40 | 41 | message CMsgClearWorldDecalsEvent { 42 | optional uint32 flagstoclear = 1; 43 | } 44 | 45 | message CMsgClearEntityDecalsEvent { 46 | optional uint32 flagstoclear = 1; 47 | } 48 | 49 | message CMsgClearDecalsForSkeletonInstanceEvent { 50 | optional uint32 flagstoclear = 1; 51 | optional uint32 entityhandleindex = 2; 52 | optional uint32 skeletoninstancehash = 3; 53 | } 54 | 55 | message CMsgSource1LegacyGameEventList { 56 | message key_t { 57 | optional int32 type = 1; 58 | optional string name = 2; 59 | } 60 | 61 | message descriptor_t { 62 | optional int32 eventid = 1; 63 | optional string name = 2; 64 | repeated .CMsgSource1LegacyGameEventList.key_t keys = 3; 65 | } 66 | 67 | repeated .CMsgSource1LegacyGameEventList.descriptor_t descriptors = 1; 68 | } 69 | 70 | message CMsgSource1LegacyListenEvents { 71 | optional int32 playerslot = 1; 72 | repeated uint32 eventarraybits = 2; 73 | } 74 | 75 | message CMsgSource1LegacyGameEvent { 76 | message key_t { 77 | optional int32 type = 1; 78 | optional string val_string = 2; 79 | optional float val_float = 3; 80 | optional int32 val_long = 4; 81 | optional int32 val_short = 5; 82 | optional int32 val_byte = 6; 83 | optional bool val_bool = 7; 84 | optional uint64 val_uint64 = 8; 85 | } 86 | 87 | optional string event_name = 1; 88 | optional int32 eventid = 2; 89 | repeated .CMsgSource1LegacyGameEvent.key_t keys = 3; 90 | optional int32 server_tick = 4; 91 | optional int32 passthrough = 5; 92 | } 93 | 94 | message CMsgSosStartSoundEvent { 95 | optional int32 soundevent_guid = 1; 96 | optional fixed32 soundevent_hash = 2; 97 | optional int32 source_entity_index = 3 [default = -1]; 98 | optional int32 seed = 4; 99 | optional bytes packed_params = 5; 100 | optional float start_time = 6; 101 | } 102 | 103 | message CMsgSosStopSoundEvent { 104 | optional int32 soundevent_guid = 1; 105 | } 106 | 107 | message CMsgSosStopSoundEventHash { 108 | optional fixed32 soundevent_hash = 1; 109 | optional int32 source_entity_index = 2 [default = -1]; 110 | } 111 | 112 | message CMsgSosSetSoundEventParams { 113 | optional int32 soundevent_guid = 1; 114 | optional bytes packed_params = 5; 115 | } 116 | 117 | message CMsgSosSetLibraryStackFields { 118 | optional fixed32 stack_hash = 1; 119 | optional bytes packed_fields = 5; 120 | } 121 | -------------------------------------------------------------------------------- /protobufs/gcsdk_gcmessages.proto: -------------------------------------------------------------------------------- 1 | import "steammessages.proto"; 2 | 3 | enum GCClientLauncherType { 4 | GCClientLauncherType_DEFAULT = 0; 5 | GCClientLauncherType_PERFECTWORLD = 1; 6 | GCClientLauncherType_STEAMCHINA = 2; 7 | GCClientLauncherType_SOURCE2 = 3; 8 | } 9 | 10 | enum GCConnectionStatus { 11 | GCConnectionStatus_HAVE_SESSION = 0; 12 | GCConnectionStatus_GC_GOING_DOWN = 1; 13 | GCConnectionStatus_NO_SESSION = 2; 14 | GCConnectionStatus_NO_SESSION_IN_LOGON_QUEUE = 3; 15 | GCConnectionStatus_NO_STEAM = 4; 16 | } 17 | 18 | message CMsgSOIDOwner { 19 | optional uint32 type = 1; 20 | optional uint64 id = 2; 21 | } 22 | 23 | message CMsgSOSingleObject { 24 | optional int32 type_id = 2; 25 | optional bytes object_data = 3; 26 | optional fixed64 version = 4; 27 | optional .CMsgSOIDOwner owner_soid = 5; 28 | } 29 | 30 | message CMsgSOMultipleObjects { 31 | message SingleObject { 32 | option (msgpool_soft_limit) = 256; 33 | option (msgpool_hard_limit) = 1024; 34 | 35 | optional int32 type_id = 1; 36 | optional bytes object_data = 2; 37 | } 38 | 39 | repeated .CMsgSOMultipleObjects.SingleObject objects_modified = 2; 40 | optional fixed64 version = 3; 41 | optional .CMsgSOIDOwner owner_soid = 6; 42 | } 43 | 44 | message CMsgSOCacheSubscribed { 45 | message SubscribedType { 46 | optional int32 type_id = 1; 47 | repeated bytes object_data = 2; 48 | } 49 | 50 | repeated .CMsgSOCacheSubscribed.SubscribedType objects = 2; 51 | optional fixed64 version = 3; 52 | optional .CMsgSOIDOwner owner_soid = 4; 53 | } 54 | 55 | message CMsgSOCacheUnsubscribed { 56 | optional .CMsgSOIDOwner owner_soid = 2; 57 | } 58 | 59 | message CMsgSOCacheSubscriptionCheck { 60 | optional fixed64 version = 2; 61 | optional .CMsgSOIDOwner owner_soid = 3; 62 | } 63 | 64 | message CMsgSOCacheSubscriptionRefresh { 65 | optional .CMsgSOIDOwner owner_soid = 2; 66 | } 67 | 68 | message CMsgSOCacheVersion { 69 | optional fixed64 version = 1; 70 | } 71 | 72 | message CMsgAccountDetails { 73 | optional bool valid = 1; 74 | optional string account_name = 2; 75 | optional bool public_profile = 4; 76 | optional bool public_inventory = 5; 77 | optional bool vac_banned = 6; 78 | optional bool cyber_cafe = 7; 79 | optional bool school_account = 8; 80 | optional bool free_trial_account = 9; 81 | optional bool subscribed = 10; 82 | optional bool low_violence = 11; 83 | optional bool limited = 12; 84 | optional bool trusted = 13; 85 | optional uint32 package = 14; 86 | optional fixed32 time_cached = 15; 87 | optional bool account_locked = 16; 88 | optional bool community_banned = 17; 89 | optional bool trade_banned = 18; 90 | optional bool eligible_for_community_market = 19; 91 | } 92 | 93 | message CMsgGCMultiplexMessage { 94 | optional uint32 msgtype = 1; 95 | optional bytes payload = 2; 96 | repeated fixed64 steamids = 3; 97 | optional bool replytogc = 4; 98 | } 99 | 100 | message CMsgGCMultiplexMessage_Response { 101 | optional uint32 msgtype = 1; 102 | } 103 | 104 | message CGCToGCMsgMasterAck { 105 | optional uint32 dir_index = 1; 106 | optional uint32 gc_type = 2; 107 | } 108 | 109 | message CGCToGCMsgMasterAck_Response { 110 | optional int32 eresult = 1 [default = 2]; 111 | } 112 | 113 | message CGCToGCMsgMasterStartupComplete { 114 | } 115 | 116 | message CGCToGCMsgRouted { 117 | optional uint32 msg_type = 1; 118 | optional fixed64 sender_id = 2; 119 | optional bytes net_message = 3; 120 | optional uint32 ip = 4; 121 | } 122 | 123 | message CGCToGCMsgRoutedReply { 124 | optional uint32 msg_type = 1; 125 | optional bytes net_message = 2; 126 | } 127 | 128 | message CMsgGCUpdateSessionIP { 129 | optional fixed64 steamid = 1; 130 | optional fixed32 ip = 2; 131 | } 132 | 133 | message CMsgGCRequestSessionIP { 134 | optional fixed64 steamid = 1; 135 | } 136 | 137 | message CMsgGCRequestSessionIPResponse { 138 | optional fixed32 ip = 1; 139 | } 140 | 141 | message CMsgSOCacheHaveVersion { 142 | optional .CMsgSOIDOwner soid = 1; 143 | optional fixed64 version = 2; 144 | } 145 | 146 | message CMsgClientHello { 147 | optional uint32 version = 1; 148 | repeated .CMsgSOCacheHaveVersion socache_have_versions = 2; 149 | optional uint32 client_session_need = 3; 150 | optional uint32 client_launcher = 4; 151 | optional uint32 partner_srcid = 5; 152 | optional uint32 partner_accountid = 6; 153 | optional uint32 partner_accountflags = 7; 154 | optional uint32 partner_accountbalance = 8; 155 | optional uint32 steam_launcher = 9; 156 | } 157 | 158 | message CMsgServerHello { 159 | optional uint32 version = 1; 160 | repeated .CMsgSOCacheHaveVersion socache_have_versions = 2; 161 | optional uint32 legacy_client_session_need = 3; 162 | optional uint32 client_launcher = 4; 163 | optional bytes legacy_steamdatagram_routing = 6; 164 | optional uint32 required_internal_addr = 7; 165 | optional bytes steamdatagram_login = 8; 166 | optional uint32 socache_control = 9; 167 | } 168 | 169 | message CMsgClientWelcome { 170 | message Location { 171 | optional float latitude = 1; 172 | optional float longitude = 2; 173 | optional string country = 3; 174 | } 175 | 176 | optional uint32 version = 1; 177 | optional bytes game_data = 2; 178 | repeated .CMsgSOCacheSubscribed outofdate_subscribed_caches = 3; 179 | repeated .CMsgSOCacheSubscriptionCheck uptodate_subscribed_caches = 4; 180 | optional .CMsgClientWelcome.Location location = 5; 181 | optional bytes game_data2 = 6; 182 | optional uint32 rtime32_gc_welcome_timestamp = 7; 183 | optional uint32 currency = 8; 184 | optional uint32 balance = 9; 185 | optional string balance_url = 10; 186 | optional string txn_country_code = 11; 187 | } 188 | 189 | message CMsgConnectionStatus { 190 | optional .GCConnectionStatus status = 1 [default = GCConnectionStatus_HAVE_SESSION]; 191 | optional uint32 client_session_need = 2; 192 | optional int32 queue_position = 3; 193 | optional int32 queue_size = 4; 194 | optional int32 wait_seconds = 5; 195 | optional int32 estimated_wait_seconds_remaining = 6; 196 | } 197 | 198 | message CWorkshop_PopulateItemDescriptions_Request { 199 | message SingleItemDescription { 200 | optional uint32 gameitemid = 1; 201 | optional string item_description = 2; 202 | optional bool one_per_account = 3; 203 | } 204 | 205 | message ItemDescriptionsLanguageBlock { 206 | optional string language = 1; 207 | repeated .CWorkshop_PopulateItemDescriptions_Request.SingleItemDescription descriptions = 2; 208 | } 209 | 210 | optional uint32 appid = 1; 211 | repeated .CWorkshop_PopulateItemDescriptions_Request.ItemDescriptionsLanguageBlock languages = 2; 212 | } 213 | 214 | message CWorkshop_GetContributors_Request { 215 | optional uint32 appid = 1; 216 | optional uint32 gameitemid = 2; 217 | } 218 | 219 | message CWorkshop_GetContributors_Response { 220 | repeated fixed64 contributors = 1; 221 | } 222 | 223 | message CWorkshop_SetItemPaymentRules_Request { 224 | message WorkshopItemPaymentRule { 225 | optional uint64 workshop_file_id = 1; 226 | optional float revenue_percentage = 2; 227 | optional string rule_description = 3; 228 | optional uint32 rule_type = 4 [default = 1]; 229 | } 230 | 231 | message WorkshopDirectPaymentRule { 232 | optional uint64 workshop_file_id = 1; 233 | optional string rule_description = 2; 234 | } 235 | 236 | message PartnerItemPaymentRule { 237 | optional uint32 account_id = 1; 238 | optional float revenue_percentage = 2; 239 | optional string rule_description = 3; 240 | } 241 | 242 | optional uint32 appid = 1; 243 | optional uint32 gameitemid = 2; 244 | repeated .CWorkshop_SetItemPaymentRules_Request.WorkshopItemPaymentRule associated_workshop_files = 3; 245 | repeated .CWorkshop_SetItemPaymentRules_Request.PartnerItemPaymentRule partner_accounts = 4; 246 | optional bool validate_only = 5; 247 | optional bool make_workshop_files_subscribable = 6; 248 | optional .CWorkshop_SetItemPaymentRules_Request.WorkshopDirectPaymentRule associated_workshop_file_for_direct_payments = 7; 249 | } 250 | 251 | message CWorkshop_SetItemPaymentRules_Response { 252 | } 253 | 254 | message CGameServers_AggregationQuery_Request { 255 | optional string filter = 1; 256 | repeated string group_fields = 3; 257 | } 258 | 259 | message CGameServers_AggregationQuery_Response { 260 | message Group { 261 | repeated string group_values = 1; 262 | optional uint32 servers_empty = 2; 263 | optional uint32 servers_full = 3; 264 | optional uint32 servers_total = 4; 265 | optional uint32 players_humans = 5; 266 | optional uint32 players_bots = 6; 267 | optional uint32 player_capacity = 7; 268 | } 269 | 270 | repeated .CGameServers_AggregationQuery_Response.Group groups = 1; 271 | } 272 | 273 | message CWorkshop_AddSpecialPayment_Request { 274 | optional uint32 appid = 1; 275 | optional uint32 gameitemid = 2; 276 | optional string date = 3; 277 | optional uint64 payment_us_usd = 4; 278 | optional uint64 payment_row_usd = 5; 279 | } 280 | 281 | message CWorkshop_AddSpecialPayment_Response { 282 | } 283 | 284 | message CProductInfo_SetRichPresenceLocalization_Request { 285 | message Token { 286 | optional string token = 1; 287 | optional string value = 2; 288 | } 289 | 290 | message LanguageSection { 291 | optional string language = 1; 292 | repeated .CProductInfo_SetRichPresenceLocalization_Request.Token tokens = 2; 293 | } 294 | 295 | optional uint32 appid = 1; 296 | repeated .CProductInfo_SetRichPresenceLocalization_Request.LanguageSection languages = 2; 297 | optional uint64 steamid = 3; 298 | } 299 | 300 | message CProductInfo_SetRichPresenceLocalization_Response { 301 | } 302 | 303 | message CMsgSerializedSOCache { 304 | message TypeCache { 305 | optional uint32 type = 1; 306 | repeated bytes objects = 2; 307 | optional uint32 service_id = 3; 308 | } 309 | 310 | message Cache { 311 | message Version { 312 | optional uint32 service = 1; 313 | optional uint64 version = 2; 314 | } 315 | 316 | optional uint32 type = 1; 317 | optional uint64 id = 2; 318 | repeated .CMsgSerializedSOCache.Cache.Version versions = 3; 319 | repeated .CMsgSerializedSOCache.TypeCache type_caches = 4; 320 | } 321 | 322 | optional uint32 file_version = 1; 323 | repeated .CMsgSerializedSOCache.Cache caches = 2; 324 | optional uint32 gc_socache_file_version = 3; 325 | } 326 | -------------------------------------------------------------------------------- /protobufs/gcsystemmsgs.proto: -------------------------------------------------------------------------------- 1 | enum EGCSystemMsg { 2 | k_EGCMsgInvalid = 0; 3 | k_EGCMsgMulti = 1; 4 | k_EGCMsgGenericReply = 10; 5 | k_EGCMsgSystemBase = 50; 6 | k_EGCMsgAchievementAwarded = 51; 7 | k_EGCMsgConCommand = 52; 8 | k_EGCMsgStartPlaying = 53; 9 | k_EGCMsgStopPlaying = 54; 10 | k_EGCMsgStartGameserver = 55; 11 | k_EGCMsgStopGameserver = 56; 12 | k_EGCMsgWGRequest = 57; 13 | k_EGCMsgWGResponse = 58; 14 | k_EGCMsgGetUserGameStatsSchema = 59; 15 | k_EGCMsgGetUserGameStatsSchemaResponse = 60; 16 | k_EGCMsgGetUserStatsDEPRECATED = 61; 17 | k_EGCMsgGetUserStatsResponse = 62; 18 | k_EGCMsgAppInfoUpdated = 63; 19 | k_EGCMsgValidateSession = 64; 20 | k_EGCMsgValidateSessionResponse = 65; 21 | k_EGCMsgLookupAccountFromInput = 66; 22 | k_EGCMsgSendHTTPRequest = 67; 23 | k_EGCMsgSendHTTPRequestResponse = 68; 24 | k_EGCMsgPreTestSetup = 69; 25 | k_EGCMsgRecordSupportAction = 70; 26 | k_EGCMsgGetAccountDetails_DEPRECATED = 71; 27 | k_EGCMsgReceiveInterAppMessage = 73; 28 | k_EGCMsgFindAccounts = 74; 29 | k_EGCMsgPostAlert = 75; 30 | k_EGCMsgGetLicenses = 76; 31 | k_EGCMsgGetUserStats = 77; 32 | k_EGCMsgGetCommands = 78; 33 | k_EGCMsgGetCommandsResponse = 79; 34 | k_EGCMsgAddFreeLicense = 80; 35 | k_EGCMsgAddFreeLicenseResponse = 81; 36 | k_EGCMsgGetIPLocation = 82; 37 | k_EGCMsgGetIPLocationResponse = 83; 38 | k_EGCMsgSystemStatsSchema = 84; 39 | k_EGCMsgGetSystemStats = 85; 40 | k_EGCMsgGetSystemStatsResponse = 86; 41 | k_EGCMsgSendEmail = 87; 42 | k_EGCMsgSendEmailResponse = 88; 43 | k_EGCMsgGetEmailTemplate = 89; 44 | k_EGCMsgGetEmailTemplateResponse = 90; 45 | k_EGCMsgGrantGuestPass = 91; 46 | k_EGCMsgGrantGuestPassResponse = 92; 47 | k_EGCMsgGetAccountDetails = 93; 48 | k_EGCMsgGetAccountDetailsResponse = 94; 49 | k_EGCMsgGetPersonaNames = 95; 50 | k_EGCMsgGetPersonaNamesResponse = 96; 51 | k_EGCMsgMultiplexMsg = 97; 52 | k_EGCMsgMultiplexMsgResponse = 98; 53 | k_EGCMsgWebAPIRegisterInterfaces = 101; 54 | k_EGCMsgWebAPIJobRequest = 102; 55 | k_EGCMsgWebAPIJobRequestHttpResponse = 104; 56 | k_EGCMsgWebAPIJobRequestForwardResponse = 105; 57 | k_EGCMsgMemCachedGet = 200; 58 | k_EGCMsgMemCachedGetResponse = 201; 59 | k_EGCMsgMemCachedSet = 202; 60 | k_EGCMsgMemCachedDelete = 203; 61 | k_EGCMsgMemCachedStats = 204; 62 | k_EGCMsgMemCachedStatsResponse = 205; 63 | k_EGCMsgMasterSetDirectory = 220; 64 | k_EGCMsgMasterSetDirectoryResponse = 221; 65 | k_EGCMsgMasterSetWebAPIRouting = 222; 66 | k_EGCMsgMasterSetWebAPIRoutingResponse = 223; 67 | k_EGCMsgMasterSetClientMsgRouting = 224; 68 | k_EGCMsgMasterSetClientMsgRoutingResponse = 225; 69 | k_EGCMsgSetOptions = 226; 70 | k_EGCMsgSetOptionsResponse = 227; 71 | k_EGCMsgSystemBase2 = 500; 72 | k_EGCMsgGetPurchaseTrustStatus = 501; 73 | k_EGCMsgGetPurchaseTrustStatusResponse = 502; 74 | k_EGCMsgUpdateSession = 503; 75 | k_EGCMsgGCAccountVacStatusChange = 504; 76 | k_EGCMsgCheckFriendship = 505; 77 | k_EGCMsgCheckFriendshipResponse = 506; 78 | k_EGCMsgGetPartnerAccountLink = 507; 79 | k_EGCMsgGetPartnerAccountLinkResponse = 508; 80 | k_EGCMsgDPPartnerMicroTxns = 512; 81 | k_EGCMsgDPPartnerMicroTxnsResponse = 513; 82 | k_EGCMsgVacVerificationChange = 518; 83 | k_EGCMsgAccountPhoneNumberChange = 519; 84 | k_EGCMsgInviteUserToLobby = 523; 85 | k_EGCMsgGetGamePersonalDataCategoriesRequest = 524; 86 | k_EGCMsgGetGamePersonalDataCategoriesResponse = 525; 87 | k_EGCMsgGetGamePersonalDataEntriesRequest = 526; 88 | k_EGCMsgGetGamePersonalDataEntriesResponse = 527; 89 | k_EGCMsgTerminateGamePersonalDataEntriesRequest = 528; 90 | k_EGCMsgTerminateGamePersonalDataEntriesResponse = 529; 91 | k_EGCMsgRecurringSubscriptionStatusChange = 530; 92 | k_EGCMsgDirectServiceMethod = 531; 93 | k_EGCMsgDirectServiceMethodResponse = 532; 94 | } 95 | 96 | enum ESOMsg { 97 | k_ESOMsg_Create = 21; 98 | k_ESOMsg_Update = 22; 99 | k_ESOMsg_Destroy = 23; 100 | k_ESOMsg_CacheSubscribed = 24; 101 | k_ESOMsg_CacheUnsubscribed = 25; 102 | k_ESOMsg_UpdateMultiple = 26; 103 | k_ESOMsg_CacheSubscriptionCheck = 27; 104 | k_ESOMsg_CacheSubscriptionRefresh = 28; 105 | } 106 | 107 | enum EGCBaseClientMsg { 108 | k_EMsgGCClientWelcome = 4004; 109 | k_EMsgGCServerWelcome = 4005; 110 | k_EMsgGCClientHello = 4006; 111 | k_EMsgGCServerHello = 4007; 112 | k_EMsgGCClientConnectionStatus = 4009; 113 | k_EMsgGCServerConnectionStatus = 4010; 114 | k_EMsgGCClientHelloPartner = 4011; 115 | k_EMsgGCClientHelloPW = 4012; 116 | k_EMsgGCClientHelloR2 = 4013; 117 | k_EMsgGCClientHelloR3 = 4014; 118 | k_EMsgGCClientHelloR4 = 4015; 119 | } 120 | 121 | enum EGCToGCMsg { 122 | k_EGCToGCMsgMasterAck = 150; 123 | k_EGCToGCMsgMasterAckResponse = 151; 124 | k_EGCToGCMsgRouted = 152; 125 | k_EGCToGCMsgRoutedReply = 153; 126 | k_EMsgUpdateSessionIP = 154; 127 | k_EMsgRequestSessionIP = 155; 128 | k_EMsgRequestSessionIPResponse = 156; 129 | k_EGCToGCMsgMasterStartupComplete = 157; 130 | } 131 | 132 | enum ECommunityItemClass { 133 | k_ECommunityItemClass_Invalid = 0; 134 | k_ECommunityItemClass_Badge = 1; 135 | k_ECommunityItemClass_GameCard = 2; 136 | k_ECommunityItemClass_ProfileBackground = 3; 137 | k_ECommunityItemClass_Emoticon = 4; 138 | k_ECommunityItemClass_BoosterPack = 5; 139 | k_ECommunityItemClass_Consumable = 6; 140 | k_ECommunityItemClass_GameGoo = 7; 141 | k_ECommunityItemClass_ProfileModifier = 8; 142 | k_ECommunityItemClass_Scene = 9; 143 | k_ECommunityItemClass_SalienItem = 10; 144 | } 145 | 146 | enum ECommunityItemAttribute { 147 | k_ECommunityItemAttribute_Invalid = 0; 148 | k_ECommunityItemAttribute_CardBorder = 1; 149 | k_ECommunityItemAttribute_Level = 2; 150 | k_ECommunityItemAttribute_IssueNumber = 3; 151 | k_ECommunityItemAttribute_TradableTime = 4; 152 | k_ECommunityItemAttribute_StorePackageID = 5; 153 | k_ECommunityItemAttribute_CommunityItemAppID = 6; 154 | k_ECommunityItemAttribute_CommunityItemType = 7; 155 | k_ECommunityItemAttribute_ProfileModiferEnabled = 8; 156 | k_ECommunityItemAttribute_ExpiryTime = 9; 157 | } 158 | 159 | message CMsgGCHVacVerificationChange { 160 | optional fixed64 steamid = 1; 161 | optional uint32 appid = 2; 162 | optional bool is_verified = 3; 163 | } 164 | 165 | message CMsgGCHAccountPhoneNumberChange { 166 | optional fixed64 steamid = 1; 167 | optional uint32 appid = 2; 168 | optional uint64 phone_id = 3; 169 | optional bool is_verified = 4; 170 | optional bool is_identifying = 5; 171 | } 172 | 173 | message CMsgGCHInviteUserToLobby { 174 | optional fixed64 steamid = 1; 175 | optional uint32 appid = 2; 176 | optional fixed64 steamid_invited = 3; 177 | optional fixed64 steamid_lobby = 4; 178 | } 179 | 180 | message CMsgGCHRecurringSubscriptionStatusChange { 181 | optional fixed64 steamid = 1; 182 | optional uint32 appid = 2; 183 | optional fixed64 agreementid = 3; 184 | optional bool active = 4; 185 | } 186 | 187 | message CQuest_PublisherAddCommunityItemsToPlayer_Request { 188 | message Attribute { 189 | optional uint32 attribute = 1; 190 | optional uint64 value = 2; 191 | } 192 | 193 | optional uint64 steamid = 1; 194 | optional uint32 appid = 2; 195 | optional uint32 match_item_type = 3; 196 | optional uint32 match_item_class = 4; 197 | optional string prefix_item_name = 5; 198 | repeated .CQuest_PublisherAddCommunityItemsToPlayer_Request.Attribute attributes = 6; 199 | optional string note = 7; 200 | } 201 | 202 | message CQuest_PublisherAddCommunityItemsToPlayer_Response { 203 | optional uint32 items_matched = 1; 204 | optional uint32 items_granted = 2; 205 | } 206 | 207 | message CCommunity_GamePersonalDataCategoryInfo { 208 | optional string type = 1; 209 | optional string localization_token = 2; 210 | optional string template_file = 3; 211 | } 212 | 213 | message CCommunity_GetGamePersonalDataCategories_Request { 214 | optional uint32 appid = 1; 215 | } 216 | 217 | message CCommunity_GetGamePersonalDataCategories_Response { 218 | repeated .CCommunity_GamePersonalDataCategoryInfo categories = 1; 219 | optional string app_assets_basename = 2; 220 | } 221 | 222 | message CCommunity_GetGamePersonalDataEntries_Request { 223 | optional uint32 appid = 1; 224 | optional uint64 steamid = 2; 225 | optional string type = 3; 226 | optional string continue_token = 4; 227 | } 228 | 229 | message CCommunity_GetGamePersonalDataEntries_Response { 230 | optional uint32 gceresult = 1; 231 | repeated string entries = 2; 232 | optional string continue_token = 3; 233 | optional string continue_text = 4; 234 | } 235 | 236 | message CCommunity_TerminateGamePersonalDataEntries_Request { 237 | optional uint32 appid = 1; 238 | optional uint64 steamid = 2; 239 | } 240 | 241 | message CCommunity_TerminateGamePersonalDataEntries_Response { 242 | optional uint32 gceresult = 1; 243 | } 244 | -------------------------------------------------------------------------------- /protobufs/generated/network_connection.pb.h: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: network_connection.proto 3 | 4 | #ifndef GOOGLE_PROTOBUF_INCLUDED_network_5fconnection_2eproto 5 | #define GOOGLE_PROTOBUF_INCLUDED_network_5fconnection_2eproto 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | #if PROTOBUF_VERSION < 3021000 12 | #error This file was generated by a newer version of protoc which is 13 | #error incompatible with your Protocol Buffer headers. Please update 14 | #error your headers. 15 | #endif 16 | #if 3021008 < PROTOBUF_MIN_PROTOC_VERSION 17 | #error This file was generated by an older version of protoc which is 18 | #error incompatible with your Protocol Buffer headers. Please 19 | #error regenerate this file with a newer version of protoc. 20 | #endif 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include // IWYU pragma: export 30 | #include // IWYU pragma: export 31 | #include 32 | #include 33 | // @@protoc_insertion_point(includes) 34 | #include 35 | #define PROTOBUF_INTERNAL_EXPORT_network_5fconnection_2eproto 36 | PROTOBUF_NAMESPACE_OPEN 37 | namespace internal { 38 | class AnyMetadata; 39 | } // namespace internal 40 | PROTOBUF_NAMESPACE_CLOSE 41 | 42 | // Internal implementation detail -- do not use these members. 43 | struct TableStruct_network_5fconnection_2eproto { 44 | static const uint32_t offsets[]; 45 | }; 46 | extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_network_5fconnection_2eproto; 47 | PROTOBUF_NAMESPACE_OPEN 48 | PROTOBUF_NAMESPACE_CLOSE 49 | 50 | enum ENetworkDisconnectionReason : int { 51 | NETWORK_DISCONNECT_INVALID = 0, 52 | NETWORK_DISCONNECT_SHUTDOWN = 1, 53 | NETWORK_DISCONNECT_DISCONNECT_BY_USER = 2, 54 | NETWORK_DISCONNECT_DISCONNECT_BY_SERVER = 3, 55 | NETWORK_DISCONNECT_LOST = 4, 56 | NETWORK_DISCONNECT_OVERFLOW = 5, 57 | NETWORK_DISCONNECT_STEAM_BANNED = 6, 58 | NETWORK_DISCONNECT_STEAM_INUSE = 7, 59 | NETWORK_DISCONNECT_STEAM_TICKET = 8, 60 | NETWORK_DISCONNECT_STEAM_LOGON = 9, 61 | NETWORK_DISCONNECT_STEAM_AUTHCANCELLED = 10, 62 | NETWORK_DISCONNECT_STEAM_AUTHALREADYUSED = 11, 63 | NETWORK_DISCONNECT_STEAM_AUTHINVALID = 12, 64 | NETWORK_DISCONNECT_STEAM_VACBANSTATE = 13, 65 | NETWORK_DISCONNECT_STEAM_LOGGED_IN_ELSEWHERE = 14, 66 | NETWORK_DISCONNECT_STEAM_VAC_CHECK_TIMEDOUT = 15, 67 | NETWORK_DISCONNECT_STEAM_DROPPED = 16, 68 | NETWORK_DISCONNECT_STEAM_OWNERSHIP = 17, 69 | NETWORK_DISCONNECT_SERVERINFO_OVERFLOW = 18, 70 | NETWORK_DISCONNECT_TICKMSG_OVERFLOW = 19, 71 | NETWORK_DISCONNECT_STRINGTABLEMSG_OVERFLOW = 20, 72 | NETWORK_DISCONNECT_DELTAENTMSG_OVERFLOW = 21, 73 | NETWORK_DISCONNECT_TEMPENTMSG_OVERFLOW = 22, 74 | NETWORK_DISCONNECT_SOUNDSMSG_OVERFLOW = 23, 75 | NETWORK_DISCONNECT_SNAPSHOTOVERFLOW = 24, 76 | NETWORK_DISCONNECT_SNAPSHOTERROR = 25, 77 | NETWORK_DISCONNECT_RELIABLEOVERFLOW = 26, 78 | NETWORK_DISCONNECT_BADDELTATICK = 27, 79 | NETWORK_DISCONNECT_NOMORESPLITS = 28, 80 | NETWORK_DISCONNECT_TIMEDOUT = 29, 81 | NETWORK_DISCONNECT_DISCONNECTED = 30, 82 | NETWORK_DISCONNECT_LEAVINGSPLIT = 31, 83 | NETWORK_DISCONNECT_DIFFERENTCLASSTABLES = 32, 84 | NETWORK_DISCONNECT_BADRELAYPASSWORD = 33, 85 | NETWORK_DISCONNECT_BADSPECTATORPASSWORD = 34, 86 | NETWORK_DISCONNECT_HLTVRESTRICTED = 35, 87 | NETWORK_DISCONNECT_NOSPECTATORS = 36, 88 | NETWORK_DISCONNECT_HLTVUNAVAILABLE = 37, 89 | NETWORK_DISCONNECT_HLTVSTOP = 38, 90 | NETWORK_DISCONNECT_KICKED = 39, 91 | NETWORK_DISCONNECT_BANADDED = 40, 92 | NETWORK_DISCONNECT_KICKBANADDED = 41, 93 | NETWORK_DISCONNECT_HLTVDIRECT = 42, 94 | NETWORK_DISCONNECT_PURESERVER_CLIENTEXTRA = 43, 95 | NETWORK_DISCONNECT_PURESERVER_MISMATCH = 44, 96 | NETWORK_DISCONNECT_USERCMD = 45, 97 | NETWORK_DISCONNECT_REJECTED_BY_GAME = 46, 98 | NETWORK_DISCONNECT_MESSAGE_PARSE_ERROR = 47, 99 | NETWORK_DISCONNECT_INVALID_MESSAGE_ERROR = 48, 100 | NETWORK_DISCONNECT_BAD_SERVER_PASSWORD = 49, 101 | NETWORK_DISCONNECT_DIRECT_CONNECT_RESERVATION = 50, 102 | NETWORK_DISCONNECT_CONNECTION_FAILURE = 51, 103 | NETWORK_DISCONNECT_NO_PEER_GROUP_HANDLERS = 52, 104 | NETWORK_DISCONNECT_RECONNECTION = 53, 105 | NETWORK_DISCONNECT_LOOPSHUTDOWN = 54, 106 | NETWORK_DISCONNECT_LOOPDEACTIVATE = 55, 107 | NETWORK_DISCONNECT_HOST_ENDGAME = 56, 108 | NETWORK_DISCONNECT_LOOP_LEVELLOAD_ACTIVATE = 57, 109 | NETWORK_DISCONNECT_CREATE_SERVER_FAILED = 58, 110 | NETWORK_DISCONNECT_EXITING = 59, 111 | NETWORK_DISCONNECT_REQUEST_HOSTSTATE_IDLE = 60, 112 | NETWORK_DISCONNECT_REQUEST_HOSTSTATE_HLTVRELAY = 61, 113 | NETWORK_DISCONNECT_CLIENT_CONSISTENCY_FAIL = 62, 114 | NETWORK_DISCONNECT_CLIENT_UNABLE_TO_CRC_MAP = 63, 115 | NETWORK_DISCONNECT_CLIENT_NO_MAP = 64, 116 | NETWORK_DISCONNECT_CLIENT_DIFFERENT_MAP = 65, 117 | NETWORK_DISCONNECT_SERVER_REQUIRES_STEAM = 66, 118 | NETWORK_DISCONNECT_STEAM_DENY_MISC = 67, 119 | NETWORK_DISCONNECT_STEAM_DENY_BAD_ANTI_CHEAT = 68, 120 | NETWORK_DISCONNECT_SERVER_SHUTDOWN = 69, 121 | NETWORK_DISCONNECT_REPLAY_INCOMPATIBLE = 71, 122 | NETWORK_DISCONNECT_CONNECT_REQUEST_TIMEDOUT = 72, 123 | NETWORK_DISCONNECT_SERVER_INCOMPATIBLE = 73, 124 | NETWORK_DISCONNECT_LOCALPROBLEM_MANYRELAYS = 74, 125 | NETWORK_DISCONNECT_LOCALPROBLEM_HOSTEDSERVERPRIMARYRELAY = 75, 126 | NETWORK_DISCONNECT_LOCALPROBLEM_NETWORKCONFIG = 76, 127 | NETWORK_DISCONNECT_LOCALPROBLEM_OTHER = 77, 128 | NETWORK_DISCONNECT_REMOTE_TIMEOUT = 79, 129 | NETWORK_DISCONNECT_REMOTE_TIMEOUT_CONNECTING = 80, 130 | NETWORK_DISCONNECT_REMOTE_OTHER = 81, 131 | NETWORK_DISCONNECT_REMOTE_BADCRYPT = 82, 132 | NETWORK_DISCONNECT_REMOTE_CERTNOTTRUSTED = 83, 133 | NETWORK_DISCONNECT_UNUSUAL = 84, 134 | NETWORK_DISCONNECT_INTERNAL_ERROR = 85, 135 | NETWORK_DISCONNECT_REJECT_BADCHALLENGE = 128, 136 | NETWORK_DISCONNECT_REJECT_NOLOBBY = 129, 137 | NETWORK_DISCONNECT_REJECT_BACKGROUND_MAP = 130, 138 | NETWORK_DISCONNECT_REJECT_SINGLE_PLAYER = 131, 139 | NETWORK_DISCONNECT_REJECT_HIDDEN_GAME = 132, 140 | NETWORK_DISCONNECT_REJECT_LANRESTRICT = 133, 141 | NETWORK_DISCONNECT_REJECT_BADPASSWORD = 134, 142 | NETWORK_DISCONNECT_REJECT_SERVERFULL = 135, 143 | NETWORK_DISCONNECT_REJECT_INVALIDRESERVATION = 136, 144 | NETWORK_DISCONNECT_REJECT_FAILEDCHANNEL = 137, 145 | NETWORK_DISCONNECT_REJECT_CONNECT_FROM_LOBBY = 138, 146 | NETWORK_DISCONNECT_REJECT_RESERVED_FOR_LOBBY = 139, 147 | NETWORK_DISCONNECT_REJECT_INVALIDKEYLENGTH = 140, 148 | NETWORK_DISCONNECT_REJECT_OLDPROTOCOL = 141, 149 | NETWORK_DISCONNECT_REJECT_NEWPROTOCOL = 142, 150 | NETWORK_DISCONNECT_REJECT_INVALIDCONNECTION = 143, 151 | NETWORK_DISCONNECT_REJECT_INVALIDCERTLEN = 144, 152 | NETWORK_DISCONNECT_REJECT_INVALIDSTEAMCERTLEN = 145, 153 | NETWORK_DISCONNECT_REJECT_STEAM = 146, 154 | NETWORK_DISCONNECT_REJECT_SERVERAUTHDISABLED = 147, 155 | NETWORK_DISCONNECT_REJECT_SERVERCDKEYAUTHINVALID = 148, 156 | NETWORK_DISCONNECT_REJECT_BANNED = 149, 157 | NETWORK_DISCONNECT_KICKED_TEAMKILLING = 150, 158 | NETWORK_DISCONNECT_KICKED_TK_START = 151, 159 | NETWORK_DISCONNECT_KICKED_UNTRUSTEDACCOUNT = 152, 160 | NETWORK_DISCONNECT_KICKED_CONVICTEDACCOUNT = 153, 161 | NETWORK_DISCONNECT_KICKED_COMPETITIVECOOLDOWN = 154, 162 | NETWORK_DISCONNECT_KICKED_TEAMHURTING = 155, 163 | NETWORK_DISCONNECT_KICKED_HOSTAGEKILLING = 156, 164 | NETWORK_DISCONNECT_KICKED_VOTEDOFF = 157, 165 | NETWORK_DISCONNECT_KICKED_IDLE = 158, 166 | NETWORK_DISCONNECT_KICKED_SUICIDE = 159, 167 | NETWORK_DISCONNECT_KICKED_NOSTEAMLOGIN = 160, 168 | NETWORK_DISCONNECT_KICKED_NOSTEAMTICKET = 161 169 | }; 170 | bool ENetworkDisconnectionReason_IsValid(int value); 171 | constexpr ENetworkDisconnectionReason ENetworkDisconnectionReason_MIN = NETWORK_DISCONNECT_INVALID; 172 | constexpr ENetworkDisconnectionReason ENetworkDisconnectionReason_MAX = NETWORK_DISCONNECT_KICKED_NOSTEAMTICKET; 173 | constexpr int ENetworkDisconnectionReason_ARRAYSIZE = ENetworkDisconnectionReason_MAX + 1; 174 | 175 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ENetworkDisconnectionReason_descriptor(); 176 | template 177 | inline const std::string& ENetworkDisconnectionReason_Name(T enum_t_value) { 178 | static_assert(::std::is_same::value || 179 | ::std::is_integral::value, 180 | "Incorrect type passed to function ENetworkDisconnectionReason_Name."); 181 | return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( 182 | ENetworkDisconnectionReason_descriptor(), enum_t_value); 183 | } 184 | inline bool ENetworkDisconnectionReason_Parse( 185 | ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ENetworkDisconnectionReason* value) { 186 | return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( 187 | ENetworkDisconnectionReason_descriptor(), name, value); 188 | } 189 | // =================================================================== 190 | 191 | 192 | // =================================================================== 193 | 194 | static const int kNetworkConnectionTokenFieldNumber = 50500; 195 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::EnumValueOptions, 196 | ::PROTOBUF_NAMESPACE_ID::internal::StringTypeTraits, 9, false > 197 | network_connection_token; 198 | 199 | // =================================================================== 200 | 201 | #ifdef __GNUC__ 202 | #pragma GCC diagnostic push 203 | #pragma GCC diagnostic ignored "-Wstrict-aliasing" 204 | #endif // __GNUC__ 205 | #ifdef __GNUC__ 206 | #pragma GCC diagnostic pop 207 | #endif // __GNUC__ 208 | 209 | // @@protoc_insertion_point(namespace_scope) 210 | 211 | 212 | PROTOBUF_NAMESPACE_OPEN 213 | 214 | template <> struct is_proto_enum< ::ENetworkDisconnectionReason> : ::std::true_type {}; 215 | template <> 216 | inline const EnumDescriptor* GetEnumDescriptor< ::ENetworkDisconnectionReason>() { 217 | return ::ENetworkDisconnectionReason_descriptor(); 218 | } 219 | 220 | PROTOBUF_NAMESPACE_CLOSE 221 | 222 | // @@protoc_insertion_point(global_scope) 223 | 224 | #include 225 | #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_network_5fconnection_2eproto 226 | -------------------------------------------------------------------------------- /protobufs/generated/steammessages_unified_base.steamworkssdk.pb.cc: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: steammessages_unified_base.steamworkssdk.proto 3 | 4 | #include "steammessages_unified_base.steamworkssdk.pb.h" 5 | 6 | #include 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | // @@protoc_insertion_point(includes) 16 | #include 17 | 18 | PROTOBUF_PRAGMA_INIT_SEG 19 | 20 | namespace _pb = ::PROTOBUF_NAMESPACE_ID; 21 | namespace _pbi = _pb::internal; 22 | 23 | static const ::_pb::EnumDescriptor* file_level_enum_descriptors_steammessages_5funified_5fbase_2esteamworkssdk_2eproto[1]; 24 | static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_steammessages_5funified_5fbase_2esteamworkssdk_2eproto = nullptr; 25 | const uint32_t TableStruct_steammessages_5funified_5fbase_2esteamworkssdk_2eproto::offsets[1] = {}; 26 | static constexpr ::_pbi::MigrationSchema* schemas = nullptr; 27 | static constexpr ::_pb::Message* const* file_default_instances = nullptr; 28 | 29 | const char descriptor_table_protodef_steammessages_5funified_5fbase_2esteamworkssdk_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = 30 | "\n.steammessages_unified_base.steamworkss" 31 | "dk.proto\032 google/protobuf/descriptor.pro" 32 | "to*]\n\023EProtoExecutionSite\022 \n\034k_EProtoExe" 33 | "cutionSiteUnknown\020\000\022$\n k_EProtoExecution" 34 | "SiteSteamClient\020\003:4\n\013description\022\035.googl" 35 | "e.protobuf.FieldOptions\030\320\206\003 \001(\t:>\n\023servi" 36 | "ce_description\022\037.google.protobuf.Service" 37 | "Options\030\320\206\003 \001(\t:u\n\026service_execution_sit" 38 | "e\022\037.google.protobuf.ServiceOptions\030\330\206\003 \001" 39 | "(\0162\024.EProtoExecutionSite:\034k_EProtoExecut" 40 | "ionSiteUnknown:<\n\022method_description\022\036.g" 41 | "oogle.protobuf.MethodOptions\030\320\206\003 \001(\t:8\n\020" 42 | "enum_description\022\034.google.protobuf.EnumO" 43 | "ptions\030\320\206\003 \001(\t:C\n\026enum_value_description" 44 | "\022!.google.protobuf.EnumValueOptions\030\320\206\003 " 45 | "\001(\tB\005H\001\200\001\000" 46 | ; 47 | static const ::_pbi::DescriptorTable* const descriptor_table_steammessages_5funified_5fbase_2esteamworkssdk_2eproto_deps[1] = { 48 | &::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto, 49 | }; 50 | static ::_pbi::once_flag descriptor_table_steammessages_5funified_5fbase_2esteamworkssdk_2eproto_once; 51 | const ::_pbi::DescriptorTable descriptor_table_steammessages_5funified_5fbase_2esteamworkssdk_2eproto = { 52 | false, false, 610, descriptor_table_protodef_steammessages_5funified_5fbase_2esteamworkssdk_2eproto, 53 | "steammessages_unified_base.steamworkssdk.proto", 54 | &descriptor_table_steammessages_5funified_5fbase_2esteamworkssdk_2eproto_once, descriptor_table_steammessages_5funified_5fbase_2esteamworkssdk_2eproto_deps, 1, 0, 55 | schemas, file_default_instances, TableStruct_steammessages_5funified_5fbase_2esteamworkssdk_2eproto::offsets, 56 | nullptr, file_level_enum_descriptors_steammessages_5funified_5fbase_2esteamworkssdk_2eproto, 57 | file_level_service_descriptors_steammessages_5funified_5fbase_2esteamworkssdk_2eproto, 58 | }; 59 | PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_steammessages_5funified_5fbase_2esteamworkssdk_2eproto_getter() { 60 | return &descriptor_table_steammessages_5funified_5fbase_2esteamworkssdk_2eproto; 61 | } 62 | 63 | // Force running AddDescriptors() at dynamic initialization time. 64 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_steammessages_5funified_5fbase_2esteamworkssdk_2eproto(&descriptor_table_steammessages_5funified_5fbase_2esteamworkssdk_2eproto); 65 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EProtoExecutionSite_descriptor() { 66 | ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_steammessages_5funified_5fbase_2esteamworkssdk_2eproto); 67 | return file_level_enum_descriptors_steammessages_5funified_5fbase_2esteamworkssdk_2eproto[0]; 68 | } 69 | bool EProtoExecutionSite_IsValid(int value) { 70 | switch (value) { 71 | case 0: 72 | case 3: 73 | return true; 74 | default: 75 | return false; 76 | } 77 | } 78 | 79 | const std::string description_default(""); 80 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions, 81 | ::PROTOBUF_NAMESPACE_ID::internal::StringTypeTraits, 9, false> 82 | description(kDescriptionFieldNumber, description_default, nullptr); 83 | const std::string service_description_default(""); 84 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::ServiceOptions, 85 | ::PROTOBUF_NAMESPACE_ID::internal::StringTypeTraits, 9, false> 86 | service_description(kServiceDescriptionFieldNumber, service_description_default, nullptr); 87 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::ServiceOptions, 88 | ::PROTOBUF_NAMESPACE_ID::internal::EnumTypeTraits< ::EProtoExecutionSite, ::EProtoExecutionSite_IsValid>, 14, false> 89 | service_execution_site(kServiceExecutionSiteFieldNumber, static_cast< ::EProtoExecutionSite >(0), nullptr); 90 | const std::string method_description_default(""); 91 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::MethodOptions, 92 | ::PROTOBUF_NAMESPACE_ID::internal::StringTypeTraits, 9, false> 93 | method_description(kMethodDescriptionFieldNumber, method_description_default, nullptr); 94 | const std::string enum_description_default(""); 95 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::EnumOptions, 96 | ::PROTOBUF_NAMESPACE_ID::internal::StringTypeTraits, 9, false> 97 | enum_description(kEnumDescriptionFieldNumber, enum_description_default, nullptr); 98 | const std::string enum_value_description_default(""); 99 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::EnumValueOptions, 100 | ::PROTOBUF_NAMESPACE_ID::internal::StringTypeTraits, 9, false> 101 | enum_value_description(kEnumValueDescriptionFieldNumber, enum_value_description_default, nullptr); 102 | 103 | // @@protoc_insertion_point(namespace_scope) 104 | PROTOBUF_NAMESPACE_OPEN 105 | PROTOBUF_NAMESPACE_CLOSE 106 | 107 | // @@protoc_insertion_point(global_scope) 108 | #include 109 | -------------------------------------------------------------------------------- /protobufs/generated/steammessages_unified_base.steamworkssdk.pb.h: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: steammessages_unified_base.steamworkssdk.proto 3 | 4 | #ifndef GOOGLE_PROTOBUF_INCLUDED_steammessages_5funified_5fbase_2esteamworkssdk_2eproto 5 | #define GOOGLE_PROTOBUF_INCLUDED_steammessages_5funified_5fbase_2esteamworkssdk_2eproto 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | #if PROTOBUF_VERSION < 3021000 12 | #error This file was generated by a newer version of protoc which is 13 | #error incompatible with your Protocol Buffer headers. Please update 14 | #error your headers. 15 | #endif 16 | #if 3021008 < PROTOBUF_MIN_PROTOC_VERSION 17 | #error This file was generated by an older version of protoc which is 18 | #error incompatible with your Protocol Buffer headers. Please 19 | #error regenerate this file with a newer version of protoc. 20 | #endif 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include // IWYU pragma: export 30 | #include // IWYU pragma: export 31 | #include 32 | #include 33 | // @@protoc_insertion_point(includes) 34 | #include 35 | #define PROTOBUF_INTERNAL_EXPORT_steammessages_5funified_5fbase_2esteamworkssdk_2eproto 36 | PROTOBUF_NAMESPACE_OPEN 37 | namespace internal { 38 | class AnyMetadata; 39 | } // namespace internal 40 | PROTOBUF_NAMESPACE_CLOSE 41 | 42 | // Internal implementation detail -- do not use these members. 43 | struct TableStruct_steammessages_5funified_5fbase_2esteamworkssdk_2eproto { 44 | static const uint32_t offsets[]; 45 | }; 46 | extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_steammessages_5funified_5fbase_2esteamworkssdk_2eproto; 47 | PROTOBUF_NAMESPACE_OPEN 48 | PROTOBUF_NAMESPACE_CLOSE 49 | 50 | enum EProtoExecutionSite : int { 51 | k_EProtoExecutionSiteUnknown = 0, 52 | k_EProtoExecutionSiteSteamClient = 3 53 | }; 54 | bool EProtoExecutionSite_IsValid(int value); 55 | constexpr EProtoExecutionSite EProtoExecutionSite_MIN = k_EProtoExecutionSiteUnknown; 56 | constexpr EProtoExecutionSite EProtoExecutionSite_MAX = k_EProtoExecutionSiteSteamClient; 57 | constexpr int EProtoExecutionSite_ARRAYSIZE = EProtoExecutionSite_MAX + 1; 58 | 59 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EProtoExecutionSite_descriptor(); 60 | template 61 | inline const std::string& EProtoExecutionSite_Name(T enum_t_value) { 62 | static_assert(::std::is_same::value || 63 | ::std::is_integral::value, 64 | "Incorrect type passed to function EProtoExecutionSite_Name."); 65 | return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( 66 | EProtoExecutionSite_descriptor(), enum_t_value); 67 | } 68 | inline bool EProtoExecutionSite_Parse( 69 | ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EProtoExecutionSite* value) { 70 | return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( 71 | EProtoExecutionSite_descriptor(), name, value); 72 | } 73 | // =================================================================== 74 | 75 | 76 | // =================================================================== 77 | 78 | static const int kDescriptionFieldNumber = 50000; 79 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions, 80 | ::PROTOBUF_NAMESPACE_ID::internal::StringTypeTraits, 9, false > 81 | description; 82 | static const int kServiceDescriptionFieldNumber = 50000; 83 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::ServiceOptions, 84 | ::PROTOBUF_NAMESPACE_ID::internal::StringTypeTraits, 9, false > 85 | service_description; 86 | static const int kServiceExecutionSiteFieldNumber = 50008; 87 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::ServiceOptions, 88 | ::PROTOBUF_NAMESPACE_ID::internal::EnumTypeTraits< ::EProtoExecutionSite, ::EProtoExecutionSite_IsValid>, 14, false > 89 | service_execution_site; 90 | static const int kMethodDescriptionFieldNumber = 50000; 91 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::MethodOptions, 92 | ::PROTOBUF_NAMESPACE_ID::internal::StringTypeTraits, 9, false > 93 | method_description; 94 | static const int kEnumDescriptionFieldNumber = 50000; 95 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::EnumOptions, 96 | ::PROTOBUF_NAMESPACE_ID::internal::StringTypeTraits, 9, false > 97 | enum_description; 98 | static const int kEnumValueDescriptionFieldNumber = 50000; 99 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::EnumValueOptions, 100 | ::PROTOBUF_NAMESPACE_ID::internal::StringTypeTraits, 9, false > 101 | enum_value_description; 102 | 103 | // =================================================================== 104 | 105 | #ifdef __GNUC__ 106 | #pragma GCC diagnostic push 107 | #pragma GCC diagnostic ignored "-Wstrict-aliasing" 108 | #endif // __GNUC__ 109 | #ifdef __GNUC__ 110 | #pragma GCC diagnostic pop 111 | #endif // __GNUC__ 112 | 113 | // @@protoc_insertion_point(namespace_scope) 114 | 115 | 116 | PROTOBUF_NAMESPACE_OPEN 117 | 118 | template <> struct is_proto_enum< ::EProtoExecutionSite> : ::std::true_type {}; 119 | template <> 120 | inline const EnumDescriptor* GetEnumDescriptor< ::EProtoExecutionSite>() { 121 | return ::EProtoExecutionSite_descriptor(); 122 | } 123 | 124 | PROTOBUF_NAMESPACE_CLOSE 125 | 126 | // @@protoc_insertion_point(global_scope) 127 | 128 | #include 129 | #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_steammessages_5funified_5fbase_2esteamworkssdk_2eproto 130 | -------------------------------------------------------------------------------- /protobufs/generated/valveextensions.pb.cc: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: valveextensions.proto 3 | 4 | #include "valveextensions.pb.h" 5 | 6 | #include 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | // @@protoc_insertion_point(includes) 16 | #include 17 | 18 | PROTOBUF_PRAGMA_INIT_SEG 19 | 20 | namespace _pb = ::PROTOBUF_NAMESPACE_ID; 21 | namespace _pbi = _pb::internal; 22 | 23 | static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_valveextensions_2eproto = nullptr; 24 | static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_valveextensions_2eproto = nullptr; 25 | const uint32_t TableStruct_valveextensions_2eproto::offsets[1] = {}; 26 | static constexpr ::_pbi::MigrationSchema* schemas = nullptr; 27 | static constexpr ::_pb::Message* const* file_default_instances = nullptr; 28 | 29 | const char descriptor_table_protodef_valveextensions_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = 30 | "\n\025valveextensions.proto\032 google/protobuf" 31 | "/descriptor.proto:\?\n\017valve_map_field\022\035.g" 32 | "oogle.protobuf.FieldOptions\030\310\334\003 \001(\010:\005fal" 33 | "se:=\n\rvalve_map_key\022\035.google.protobuf.Fi" 34 | "eldOptions\030\311\334\003 \001(\010:\005false:=\n\021diff_encode" 35 | "_field\022\035.google.protobuf.FieldOptions\030\312\334" 36 | "\003 \001(\005:\0010:<\n\014delta_ignore\022\035.google.protob" 37 | "uf.FieldOptions\030\313\334\003 \001(\010:\005false:\?\n\023steamm" 38 | "l_max_entries\022\035.google.protobuf.FieldOpt" 39 | "ions\030\314\334\003 \001(\r:\0010:D\n\024steamml_is_timestamp\022" 40 | "\035.google.protobuf.FieldOptions\030\315\334\003 \001(\010:\005" 41 | "false:<\n\020steamlearn_count\022\035.google.proto" 42 | "buf.FieldOptions\030\316\334\003 \001(\r:\0010:@\n\024schema_fr" 43 | "iendly_name\022!.google.protobuf.EnumValueO" 44 | "ptions\030\350\007 \001(\t:>\n\022schema_description\022!.go" 45 | "ogle.protobuf.EnumValueOptions\030\351\007 \001(\t:F\n" 46 | "\032schema_suppress_enumerator\022!.google.pro" 47 | "tobuf.EnumValueOptions\030\352\007 \001(\010" 48 | ; 49 | static const ::_pbi::DescriptorTable* const descriptor_table_valveextensions_2eproto_deps[1] = { 50 | &::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto, 51 | }; 52 | static ::_pbi::once_flag descriptor_table_valveextensions_2eproto_once; 53 | const ::_pbi::DescriptorTable descriptor_table_valveextensions_2eproto = { 54 | false, false, 709, descriptor_table_protodef_valveextensions_2eproto, 55 | "valveextensions.proto", 56 | &descriptor_table_valveextensions_2eproto_once, descriptor_table_valveextensions_2eproto_deps, 1, 0, 57 | schemas, file_default_instances, TableStruct_valveextensions_2eproto::offsets, 58 | nullptr, file_level_enum_descriptors_valveextensions_2eproto, 59 | file_level_service_descriptors_valveextensions_2eproto, 60 | }; 61 | PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_valveextensions_2eproto_getter() { 62 | return &descriptor_table_valveextensions_2eproto; 63 | } 64 | 65 | // Force running AddDescriptors() at dynamic initialization time. 66 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_valveextensions_2eproto(&descriptor_table_valveextensions_2eproto); 67 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions, 68 | ::PROTOBUF_NAMESPACE_ID::internal::PrimitiveTypeTraits< bool >, 8, false> 69 | valve_map_field(kValveMapFieldFieldNumber, false, nullptr); 70 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions, 71 | ::PROTOBUF_NAMESPACE_ID::internal::PrimitiveTypeTraits< bool >, 8, false> 72 | valve_map_key(kValveMapKeyFieldNumber, false, nullptr); 73 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions, 74 | ::PROTOBUF_NAMESPACE_ID::internal::PrimitiveTypeTraits< int32_t >, 5, false> 75 | diff_encode_field(kDiffEncodeFieldFieldNumber, 0, nullptr); 76 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions, 77 | ::PROTOBUF_NAMESPACE_ID::internal::PrimitiveTypeTraits< bool >, 8, false> 78 | delta_ignore(kDeltaIgnoreFieldNumber, false, nullptr); 79 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions, 80 | ::PROTOBUF_NAMESPACE_ID::internal::PrimitiveTypeTraits< uint32_t >, 13, false> 81 | steamml_max_entries(kSteammlMaxEntriesFieldNumber, 0u, nullptr); 82 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions, 83 | ::PROTOBUF_NAMESPACE_ID::internal::PrimitiveTypeTraits< bool >, 8, false> 84 | steamml_is_timestamp(kSteammlIsTimestampFieldNumber, false, nullptr); 85 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions, 86 | ::PROTOBUF_NAMESPACE_ID::internal::PrimitiveTypeTraits< uint32_t >, 13, false> 87 | steamlearn_count(kSteamlearnCountFieldNumber, 0u, nullptr); 88 | const std::string schema_friendly_name_default(""); 89 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::EnumValueOptions, 90 | ::PROTOBUF_NAMESPACE_ID::internal::StringTypeTraits, 9, false> 91 | schema_friendly_name(kSchemaFriendlyNameFieldNumber, schema_friendly_name_default, nullptr); 92 | const std::string schema_description_default(""); 93 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::EnumValueOptions, 94 | ::PROTOBUF_NAMESPACE_ID::internal::StringTypeTraits, 9, false> 95 | schema_description(kSchemaDescriptionFieldNumber, schema_description_default, nullptr); 96 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::EnumValueOptions, 97 | ::PROTOBUF_NAMESPACE_ID::internal::PrimitiveTypeTraits< bool >, 8, false> 98 | schema_suppress_enumerator(kSchemaSuppressEnumeratorFieldNumber, false, nullptr); 99 | 100 | // @@protoc_insertion_point(namespace_scope) 101 | PROTOBUF_NAMESPACE_OPEN 102 | PROTOBUF_NAMESPACE_CLOSE 103 | 104 | // @@protoc_insertion_point(global_scope) 105 | #include 106 | -------------------------------------------------------------------------------- /protobufs/generated/valveextensions.pb.h: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: valveextensions.proto 3 | 4 | #ifndef GOOGLE_PROTOBUF_INCLUDED_valveextensions_2eproto 5 | #define GOOGLE_PROTOBUF_INCLUDED_valveextensions_2eproto 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | #if PROTOBUF_VERSION < 3021000 12 | #error This file was generated by a newer version of protoc which is 13 | #error incompatible with your Protocol Buffer headers. Please update 14 | #error your headers. 15 | #endif 16 | #if 3021008 < PROTOBUF_MIN_PROTOC_VERSION 17 | #error This file was generated by an older version of protoc which is 18 | #error incompatible with your Protocol Buffer headers. Please 19 | #error regenerate this file with a newer version of protoc. 20 | #endif 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include // IWYU pragma: export 30 | #include // IWYU pragma: export 31 | #include 32 | // @@protoc_insertion_point(includes) 33 | #include 34 | #define PROTOBUF_INTERNAL_EXPORT_valveextensions_2eproto 35 | PROTOBUF_NAMESPACE_OPEN 36 | namespace internal { 37 | class AnyMetadata; 38 | } // namespace internal 39 | PROTOBUF_NAMESPACE_CLOSE 40 | 41 | // Internal implementation detail -- do not use these members. 42 | struct TableStruct_valveextensions_2eproto { 43 | static const uint32_t offsets[]; 44 | }; 45 | extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_valveextensions_2eproto; 46 | PROTOBUF_NAMESPACE_OPEN 47 | PROTOBUF_NAMESPACE_CLOSE 48 | 49 | // =================================================================== 50 | 51 | 52 | // =================================================================== 53 | 54 | static const int kValveMapFieldFieldNumber = 61000; 55 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions, 56 | ::PROTOBUF_NAMESPACE_ID::internal::PrimitiveTypeTraits< bool >, 8, false > 57 | valve_map_field; 58 | static const int kValveMapKeyFieldNumber = 61001; 59 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions, 60 | ::PROTOBUF_NAMESPACE_ID::internal::PrimitiveTypeTraits< bool >, 8, false > 61 | valve_map_key; 62 | static const int kDiffEncodeFieldFieldNumber = 61002; 63 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions, 64 | ::PROTOBUF_NAMESPACE_ID::internal::PrimitiveTypeTraits< int32_t >, 5, false > 65 | diff_encode_field; 66 | static const int kDeltaIgnoreFieldNumber = 61003; 67 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions, 68 | ::PROTOBUF_NAMESPACE_ID::internal::PrimitiveTypeTraits< bool >, 8, false > 69 | delta_ignore; 70 | static const int kSteammlMaxEntriesFieldNumber = 61004; 71 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions, 72 | ::PROTOBUF_NAMESPACE_ID::internal::PrimitiveTypeTraits< uint32_t >, 13, false > 73 | steamml_max_entries; 74 | static const int kSteammlIsTimestampFieldNumber = 61005; 75 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions, 76 | ::PROTOBUF_NAMESPACE_ID::internal::PrimitiveTypeTraits< bool >, 8, false > 77 | steamml_is_timestamp; 78 | static const int kSteamlearnCountFieldNumber = 61006; 79 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::FieldOptions, 80 | ::PROTOBUF_NAMESPACE_ID::internal::PrimitiveTypeTraits< uint32_t >, 13, false > 81 | steamlearn_count; 82 | static const int kSchemaFriendlyNameFieldNumber = 1000; 83 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::EnumValueOptions, 84 | ::PROTOBUF_NAMESPACE_ID::internal::StringTypeTraits, 9, false > 85 | schema_friendly_name; 86 | static const int kSchemaDescriptionFieldNumber = 1001; 87 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::EnumValueOptions, 88 | ::PROTOBUF_NAMESPACE_ID::internal::StringTypeTraits, 9, false > 89 | schema_description; 90 | static const int kSchemaSuppressEnumeratorFieldNumber = 1002; 91 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::EnumValueOptions, 92 | ::PROTOBUF_NAMESPACE_ID::internal::PrimitiveTypeTraits< bool >, 8, false > 93 | schema_suppress_enumerator; 94 | 95 | // =================================================================== 96 | 97 | #ifdef __GNUC__ 98 | #pragma GCC diagnostic push 99 | #pragma GCC diagnostic ignored "-Wstrict-aliasing" 100 | #endif // __GNUC__ 101 | #ifdef __GNUC__ 102 | #pragma GCC diagnostic pop 103 | #endif // __GNUC__ 104 | 105 | // @@protoc_insertion_point(namespace_scope) 106 | 107 | 108 | // @@protoc_insertion_point(global_scope) 109 | 110 | #include 111 | #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_valveextensions_2eproto 112 | -------------------------------------------------------------------------------- /protobufs/networkbasetypes.proto: -------------------------------------------------------------------------------- 1 | import "network_connection.proto"; 2 | 3 | enum SignonState_t { 4 | SIGNONSTATE_NONE = 0; 5 | SIGNONSTATE_CHALLENGE = 1; 6 | SIGNONSTATE_CONNECTED = 2; 7 | SIGNONSTATE_NEW = 3; 8 | SIGNONSTATE_PRESPAWN = 4; 9 | SIGNONSTATE_SPAWN = 5; 10 | SIGNONSTATE_FULL = 6; 11 | SIGNONSTATE_CHANGELEVEL = 7; 12 | } 13 | 14 | enum NET_Messages { 15 | net_NOP = 0; 16 | net_Disconnect_Legacy = 1; 17 | net_SplitScreenUser = 3; 18 | net_Tick = 4; 19 | net_StringCmd = 5; 20 | net_SetConVar = 6; 21 | net_SignonState = 7; 22 | net_SpawnGroup_Load = 8; 23 | net_SpawnGroup_ManifestUpdate = 9; 24 | net_SpawnGroup_SetCreationTick = 11; 25 | net_SpawnGroup_Unload = 12; 26 | net_SpawnGroup_LoadCompleted = 13; 27 | net_DebugOverlay = 15; 28 | } 29 | 30 | enum SpawnGroupFlags_t { 31 | SPAWN_GROUP_LOAD_ENTITIES_FROM_SAVE = 1; 32 | SPAWN_GROUP_DONT_SPAWN_ENTITIES = 2; 33 | SPAWN_GROUP_SYNCHRONOUS_SPAWN = 4; 34 | SPAWN_GROUP_IS_INITIAL_SPAWN_GROUP = 8; 35 | SPAWN_GROUP_CREATE_CLIENT_ONLY_ENTITIES = 16; 36 | SPAWN_GROUP_BLOCK_UNTIL_LOADED = 64; 37 | SPAWN_GROUP_LOAD_STREAMING_DATA = 128; 38 | SPAWN_GROUP_CREATE_NEW_SCENE_WORLD = 256; 39 | } 40 | 41 | message CMsgVector { 42 | optional float x = 1; 43 | optional float y = 2; 44 | optional float z = 3; 45 | optional float w = 4; 46 | } 47 | 48 | message CMsgVector2D { 49 | optional float x = 1; 50 | optional float y = 2; 51 | } 52 | 53 | message CMsgQAngle { 54 | optional float x = 1; 55 | optional float y = 2; 56 | optional float z = 3; 57 | } 58 | 59 | message CMsgQuaternion { 60 | optional float x = 1; 61 | optional float y = 2; 62 | optional float z = 3; 63 | optional float w = 4; 64 | } 65 | 66 | message CMsgTransform { 67 | optional .CMsgVector position = 1; 68 | optional float scale = 2; 69 | optional .CMsgQuaternion orientation = 3; 70 | } 71 | 72 | message CMsgRGBA { 73 | optional int32 r = 1; 74 | optional int32 g = 2; 75 | optional int32 b = 3; 76 | optional int32 a = 4; 77 | } 78 | 79 | message CMsgPlayerInfo { 80 | optional string name = 1; 81 | optional fixed64 xuid = 2; 82 | optional int32 userid = 3; 83 | optional fixed64 steamid = 4; 84 | optional bool fakeplayer = 5; 85 | optional bool ishltv = 6; 86 | } 87 | 88 | message CEntityMsg { 89 | optional uint32 target_entity = 1 [default = 16777215]; 90 | } 91 | 92 | message CMsg_CVars { 93 | message CVar { 94 | optional string name = 1; 95 | optional string value = 2; 96 | } 97 | 98 | repeated .CMsg_CVars.CVar cvars = 1; 99 | } 100 | 101 | message CNETMsg_NOP { 102 | } 103 | 104 | message CNETMsg_SplitScreenUser { 105 | optional int32 slot = 1; 106 | } 107 | 108 | message CNETMsg_Disconnect_Legacy { 109 | optional .ENetworkDisconnectionReason reason = 2 [default = NETWORK_DISCONNECT_INVALID]; 110 | } 111 | 112 | message CNETMsg_Tick { 113 | optional uint32 tick = 1; 114 | optional uint32 host_frametime = 2; 115 | optional uint32 host_frametime_std_deviation = 3; 116 | optional uint32 host_computationtime = 4; 117 | optional uint32 host_computationtime_std_deviation = 5; 118 | optional uint32 host_framestarttime_std_deviation = 6; 119 | optional uint32 host_loss = 7; 120 | optional uint32 host_unfiltered_frametime = 8; 121 | optional uint32 hltv_replay_flags = 9; 122 | optional uint32 expected_long_tick = 10; 123 | optional string expected_long_tick_reason = 11; 124 | } 125 | 126 | message CNETMsg_StringCmd { 127 | optional string command = 1; 128 | optional uint32 prediction_sync = 2; 129 | } 130 | 131 | message CNETMsg_SetConVar { 132 | optional .CMsg_CVars convars = 1; 133 | } 134 | 135 | message CNETMsg_SignonState { 136 | optional .SignonState_t signon_state = 1 [default = SIGNONSTATE_NONE]; 137 | optional uint32 spawn_count = 2; 138 | optional uint32 num_server_players = 3; 139 | repeated string players_networkids = 4; 140 | optional string map_name = 5; 141 | optional string addons = 6; 142 | } 143 | 144 | message CSVCMsg_GameEvent { 145 | message key_t { 146 | optional int32 type = 1; 147 | optional string val_string = 2; 148 | optional float val_float = 3; 149 | optional int32 val_long = 4; 150 | optional int32 val_short = 5; 151 | optional int32 val_byte = 6; 152 | optional bool val_bool = 7; 153 | optional uint64 val_uint64 = 8; 154 | } 155 | 156 | optional string event_name = 1; 157 | optional int32 eventid = 2; 158 | repeated .CSVCMsg_GameEvent.key_t keys = 3; 159 | } 160 | 161 | message CSVCMsgList_GameEvents { 162 | message event_t { 163 | optional int32 tick = 1; 164 | optional .CSVCMsg_GameEvent event = 2; 165 | } 166 | 167 | repeated .CSVCMsgList_GameEvents.event_t events = 1; 168 | } 169 | 170 | message CNETMsg_SpawnGroup_Load { 171 | optional string worldname = 1; 172 | optional string entitylumpname = 2; 173 | optional string entityfiltername = 3; 174 | optional uint32 spawngrouphandle = 4; 175 | optional uint32 spawngroupownerhandle = 5; 176 | optional .CMsgVector world_offset_pos = 6; 177 | optional .CMsgQAngle world_offset_angle = 7; 178 | optional bytes spawngroupmanifest = 8; 179 | optional uint32 flags = 9; 180 | optional int32 tickcount = 10; 181 | optional bool manifestincomplete = 11; 182 | optional string localnamefixup = 12; 183 | optional string parentnamefixup = 13; 184 | optional int32 manifestloadpriority = 14; 185 | optional uint32 worldgroupid = 15; 186 | optional uint32 creationsequence = 16; 187 | optional string savegamefilename = 17; 188 | optional uint32 spawngroupparenthandle = 18; 189 | optional bool leveltransition = 19; 190 | optional string worldgroupname = 20; 191 | } 192 | 193 | message CNETMsg_SpawnGroup_ManifestUpdate { 194 | optional uint32 spawngrouphandle = 1; 195 | optional bytes spawngroupmanifest = 2; 196 | optional bool manifestincomplete = 3; 197 | } 198 | 199 | message CNETMsg_SpawnGroup_SetCreationTick { 200 | optional uint32 spawngrouphandle = 1; 201 | optional int32 tickcount = 2; 202 | optional uint32 creationsequence = 3; 203 | } 204 | 205 | message CNETMsg_SpawnGroup_Unload { 206 | optional uint32 spawngrouphandle = 1; 207 | optional uint32 flags = 2; 208 | optional int32 tickcount = 3; 209 | } 210 | 211 | message CNETMsg_SpawnGroup_LoadCompleted { 212 | optional uint32 spawngrouphandle = 1; 213 | } 214 | 215 | message CSVCMsg_GameSessionConfiguration { 216 | optional bool is_multiplayer = 1; 217 | optional bool is_loadsavegame = 2; 218 | optional bool is_background_map = 3; 219 | optional bool is_headless = 4; 220 | optional uint32 min_client_limit = 5; 221 | optional uint32 max_client_limit = 6; 222 | optional uint32 max_clients = 7; 223 | optional fixed32 tick_interval = 8; 224 | optional string hostname = 9; 225 | optional string savegamename = 10; 226 | optional string s1_mapname = 11; 227 | optional string gamemode = 12; 228 | optional string server_ip_address = 13; 229 | optional bytes data = 14; 230 | optional bool is_localonly = 15; 231 | optional bool no_steam_server = 19; 232 | optional bool is_transition = 16; 233 | optional string previouslevel = 17; 234 | optional string landmarkname = 18; 235 | } 236 | 237 | message CNETMsg_DebugOverlay { 238 | optional int32 etype = 1; 239 | repeated .CMsgVector vectors = 2; 240 | repeated .CMsgRGBA colors = 3; 241 | repeated float dimensions = 4; 242 | repeated float times = 5; 243 | repeated bool bools = 6; 244 | repeated uint64 uint64s = 7; 245 | repeated string strings = 8; 246 | } 247 | -------------------------------------------------------------------------------- /protobufs/networksystem_protomessages.proto: -------------------------------------------------------------------------------- 1 | message NetMessageSplitscreenUserChanged { 2 | optional uint32 slot = 1; 3 | } 4 | 5 | message NetMessageConnectionClosed { 6 | optional uint32 reason = 1; 7 | } 8 | 9 | message NetMessageConnectionCrashed { 10 | optional uint32 reason = 1; 11 | } 12 | 13 | message NetMessagePacketStart { 14 | } 15 | 16 | message NetMessagePacketEnd { 17 | } 18 | -------------------------------------------------------------------------------- /protobufs/protoc/protoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Source2ZE/CS2VoiceFix/e3ef10cb9c72a071e3176d529c1da04bc73e529d/protobufs/protoc/protoc -------------------------------------------------------------------------------- /protobufs/protoc/protoc_old: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Source2ZE/CS2VoiceFix/e3ef10cb9c72a071e3176d529c1da04bc73e529d/protobufs/protoc/protoc_old -------------------------------------------------------------------------------- /protobufs/protocompile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mkdir temp 4 | mkdir generated 5 | 6 | for proto in *.proto; do 7 | sed '1i\syntax = "proto2";' "$proto" > "temp/$proto" 8 | done 9 | 10 | cd temp 11 | ../protoc/protoc --cpp_out=../generated *.proto 12 | 13 | rm -rf temp -------------------------------------------------------------------------------- /protobufs/steamdatagram_messages_auth.proto: -------------------------------------------------------------------------------- 1 | import "steamnetworkingsockets_messages_certs.proto"; 2 | 3 | option optimize_for = SPEED; 4 | option cc_generic_services = false; 5 | 6 | message CMsgSteamDatagramRelayAuthTicket { 7 | message ExtraField { 8 | optional string name = 1; 9 | optional string string_value = 2; 10 | optional sint64 int64_value = 3; 11 | optional fixed64 fixed64_value = 5; 12 | } 13 | 14 | optional fixed32 time_expiry = 1; 15 | optional string authorized_client_identity_string = 14; 16 | optional string gameserver_identity_string = 15; 17 | optional fixed32 authorized_public_ip = 3; 18 | optional bytes gameserver_address = 11; 19 | optional uint32 app_id = 7; 20 | optional uint32 virtual_port = 10; 21 | repeated .CMsgSteamDatagramRelayAuthTicket.ExtraField extra_fields = 8; 22 | optional fixed64 legacy_authorized_steam_id = 2; 23 | optional fixed64 legacy_gameserver_steam_id = 4; 24 | optional fixed32 legacy_gameserver_pop_id = 9; 25 | optional bytes legacy_authorized_client_identity_binary = 12; 26 | optional bytes legacy_gameserver_identity_binary = 13; 27 | } 28 | 29 | message CMsgSteamDatagramSignedRelayAuthTicket { 30 | optional fixed64 reserved_do_not_use = 1; 31 | optional bytes ticket = 3; 32 | optional bytes signature = 4; 33 | optional fixed64 key_id = 2; 34 | repeated .CMsgSteamDatagramCertificateSigned certs = 5; 35 | } 36 | 37 | message CMsgSteamDatagramCachedCredentialsForApp { 38 | optional bytes private_key = 1; 39 | optional bytes cert = 2; 40 | repeated bytes relay_tickets = 3; 41 | } 42 | 43 | message CMsgSteamDatagramGameCoordinatorServerLogin { 44 | optional uint32 time_generated = 1; 45 | optional uint32 appid = 2; 46 | optional bytes routing = 3; 47 | optional bytes appdata = 4; 48 | optional bytes legacy_identity_binary = 5; 49 | optional string identity_string = 6; 50 | optional fixed64 dummy_steam_id = 99; 51 | } 52 | 53 | message CMsgSteamDatagramSignedGameCoordinatorServerLogin { 54 | optional .CMsgSteamDatagramCertificateSigned cert = 1; 55 | optional bytes login = 2; 56 | optional bytes signature = 3; 57 | } 58 | 59 | message CMsgSteamDatagramHostedServerAddressPlaintext { 60 | optional fixed32 ipv4 = 1; 61 | optional bytes ipv6 = 2; 62 | optional uint32 port = 3; 63 | optional fixed64 routing_secret = 4; 64 | optional uint32 protocol_version = 5; 65 | } 66 | -------------------------------------------------------------------------------- /protobufs/steammessages.proto: -------------------------------------------------------------------------------- 1 | import "google/protobuf/descriptor.proto"; 2 | 3 | extend .google.protobuf.FieldOptions { 4 | optional bool key_field = 60000 [default = false]; 5 | } 6 | 7 | extend .google.protobuf.MessageOptions { 8 | optional int32 msgpool_soft_limit = 60000 [default = 32]; 9 | optional int32 msgpool_hard_limit = 60001 [default = 384]; 10 | } 11 | 12 | enum GCProtoBufMsgSrc { 13 | GCProtoBufMsgSrc_Unspecified = 0; 14 | GCProtoBufMsgSrc_FromSystem = 1; 15 | GCProtoBufMsgSrc_FromSteamID = 2; 16 | GCProtoBufMsgSrc_FromGC = 3; 17 | GCProtoBufMsgSrc_ReplySystem = 4; 18 | } 19 | 20 | message CMsgProtoBufHeader { 21 | option (msgpool_soft_limit) = 256; 22 | option (msgpool_hard_limit) = 1024; 23 | 24 | optional fixed64 client_steam_id = 1; 25 | optional int32 client_session_id = 2; 26 | optional uint32 source_app_id = 3; 27 | optional fixed64 job_id_source = 10 [default = 18446744073709551615]; 28 | optional fixed64 job_id_target = 11 [default = 18446744073709551615]; 29 | optional string target_job_name = 12; 30 | optional int32 eresult = 13 [default = 2]; 31 | optional string error_message = 14; 32 | optional uint32 ip = 15; 33 | optional .GCProtoBufMsgSrc gc_msg_src = 200 [default = GCProtoBufMsgSrc_Unspecified]; 34 | optional uint32 gc_dir_index_source = 201; 35 | } 36 | 37 | message CChinaAgreementSessions_StartAgreementSessionInGame_Request { 38 | optional uint32 appid = 1; 39 | optional fixed64 steamid = 2; 40 | optional string client_ipaddress = 3; 41 | } 42 | 43 | message CChinaAgreementSessions_StartAgreementSessionInGame_Response { 44 | optional string agreement_url = 1; 45 | } 46 | -------------------------------------------------------------------------------- /protobufs/steammessages_cloud.steamworkssdk.proto: -------------------------------------------------------------------------------- 1 | import "steammessages_unified_base.steamworkssdk.proto"; 2 | 3 | message CCloud_GetUploadServerInfo_Request { 4 | optional uint32 appid = 1 [(description) = "App ID to which a file will be uploaded to."]; 5 | } 6 | 7 | message CCloud_GetUploadServerInfo_Response { 8 | optional string server_url = 1; 9 | } 10 | 11 | message CCloud_GetFileDetails_Request { 12 | optional uint64 ugcid = 1 [(description) = "ID of the Cloud file to get details for."]; 13 | optional uint32 appid = 2 [(description) = "App ID the file belongs to."]; 14 | } 15 | 16 | message CCloud_UserFile { 17 | optional uint32 appid = 1; 18 | optional uint64 ugcid = 2; 19 | optional string filename = 3; 20 | optional uint64 timestamp = 4; 21 | optional uint32 file_size = 5; 22 | optional string url = 6; 23 | optional fixed64 steamid_creator = 7; 24 | } 25 | 26 | message CCloud_GetFileDetails_Response { 27 | optional .CCloud_UserFile details = 1; 28 | } 29 | 30 | message CCloud_EnumerateUserFiles_Request { 31 | optional uint32 appid = 1 [(description) = "App ID to enumerate the files of."]; 32 | optional bool extended_details = 2 [(description) = "(Optional) Get extended details back on the files found. Defaults to only returned the app Id and UGC Id of the files found."]; 33 | optional uint32 count = 3 [(description) = "(Optional) Maximum number of results to return on this call. Defaults to a maximum of 500 files returned."]; 34 | optional uint32 start_index = 4 [(description) = "(Optional) Starting index to begin enumeration at. Defaults to the beginning of the list."]; 35 | } 36 | 37 | message CCloud_EnumerateUserFiles_Response { 38 | repeated .CCloud_UserFile files = 1; 39 | optional uint32 total_files = 2; 40 | } 41 | 42 | message CCloud_Delete_Request { 43 | optional string filename = 1; 44 | optional uint32 appid = 2 [(description) = "App ID the file belongs to."]; 45 | } 46 | 47 | message CCloud_Delete_Response { 48 | } 49 | 50 | service Cloud { 51 | option (service_description) = "A service for Steam Cloud operations."; 52 | 53 | rpc GetUploadServerInfo (.CCloud_GetUploadServerInfo_Request) returns (.CCloud_GetUploadServerInfo_Response) { 54 | option (method_description) = "Returns the URL of the proper cloud server for a user."; 55 | } 56 | 57 | rpc GetFileDetails (.CCloud_GetFileDetails_Request) returns (.CCloud_GetFileDetails_Response) { 58 | option (method_description) = "Returns details on a Cloud file."; 59 | } 60 | 61 | rpc EnumerateUserFiles (.CCloud_EnumerateUserFiles_Request) returns (.CCloud_EnumerateUserFiles_Response) { 62 | option (method_description) = "Enumerates Cloud files for a user of a given app ID. Returns up to 500 files at a time."; 63 | } 64 | 65 | rpc Delete (.CCloud_Delete_Request) returns (.CCloud_Delete_Response) { 66 | option (method_description) = "Deletes a file from the user's cloud."; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /protobufs/steammessages_gamenetworkingui.proto: -------------------------------------------------------------------------------- 1 | import "steamnetworkingsockets_messages.proto"; 2 | import "steamdatagram_messages_sdr.proto"; 3 | 4 | option optimize_for = SPEED; 5 | option cc_generic_services = true; 6 | 7 | message CGameNetworkingUI_GlobalState { 8 | } 9 | 10 | message CGameNetworkingUI_ConnectionState { 11 | optional string connection_key = 1; 12 | optional uint32 appid = 2; 13 | optional fixed32 connection_id_local = 3; 14 | optional string identity_local = 4; 15 | optional string identity_remote = 5; 16 | optional uint32 connection_state = 10; 17 | optional uint32 start_time = 12; 18 | optional uint32 close_time = 13; 19 | optional uint32 close_reason = 14; 20 | optional string close_message = 15; 21 | optional string status_loc_token = 16; 22 | optional uint32 transport_kind = 20; 23 | optional string sdrpopid_local = 21; 24 | optional string sdrpopid_remote = 22; 25 | optional string address_remote = 23; 26 | optional .CMsgSteamDatagramP2PRoutingSummary p2p_routing = 24; 27 | optional uint32 ping_interior = 25; 28 | optional uint32 ping_remote_front = 26; 29 | optional uint32 ping_default_internet_route = 27; 30 | optional .CMsgSteamDatagramConnectionQuality e2e_quality_local = 30; 31 | optional .CMsgSteamDatagramConnectionQuality e2e_quality_remote = 31; 32 | optional uint64 e2e_quality_remote_instantaneous_time = 32; 33 | optional uint64 e2e_quality_remote_lifetime_time = 33; 34 | optional .CMsgSteamDatagramConnectionQuality front_quality_local = 40; 35 | optional .CMsgSteamDatagramConnectionQuality front_quality_remote = 41; 36 | optional uint64 front_quality_remote_instantaneous_time = 42; 37 | optional uint64 front_quality_remote_lifetime_time = 43; 38 | } 39 | 40 | message CGameNetworkingUI_Message { 41 | repeated .CGameNetworkingUI_ConnectionState connection_state = 1; 42 | } 43 | 44 | message CGameNetworkingUI_ConnectionSummary { 45 | optional uint32 transport_kind = 1; 46 | optional uint32 connection_state = 8; 47 | optional string sdrpop_local = 2; 48 | optional string sdrpop_remote = 3; 49 | optional uint32 ping_ms = 4; 50 | optional float packet_loss = 5; 51 | optional uint32 ping_default_internet_route = 6; 52 | optional bool ip_was_shared = 7; 53 | } 54 | 55 | message CGameNetworkingUI_AppSummary { 56 | optional uint32 appid = 1; 57 | optional bool ip_was_shared_with_friend = 10; 58 | optional bool ip_was_shared_with_nonfriend = 11; 59 | optional uint32 active_connections = 20; 60 | optional .CGameNetworkingUI_ConnectionSummary main_cxn = 30; 61 | } 62 | -------------------------------------------------------------------------------- /protobufs/steammessages_helprequest.steamworkssdk.proto: -------------------------------------------------------------------------------- 1 | import "steammessages_unified_base.steamworkssdk.proto"; 2 | 3 | option cc_generic_services = true; 4 | 5 | message CHelpRequestLogs_UploadUserApplicationLog_Request { 6 | optional uint32 appid = 1; 7 | optional string log_type = 2; 8 | optional string version_string = 3; 9 | optional string log_contents = 4; 10 | } 11 | 12 | message CHelpRequestLogs_UploadUserApplicationLog_Response { 13 | optional uint64 id = 1; 14 | } 15 | 16 | service HelpRequestLogs { 17 | option (service_description) = "Service for dealing with user-submitted logs"; 18 | 19 | rpc UploadUserApplicationLog (.CHelpRequestLogs_UploadUserApplicationLog_Request) returns (.CHelpRequestLogs_UploadUserApplicationLog_Response) { 20 | option (method_description) = "User uploading application logs"; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /protobufs/steammessages_oauth.steamworkssdk.proto: -------------------------------------------------------------------------------- 1 | import "steammessages_unified_base.steamworkssdk.proto"; 2 | 3 | message COAuthToken_ImplicitGrantNoPrompt_Request { 4 | optional string clientid = 1 [(description) = "Client ID for which to count the number of issued tokens"]; 5 | } 6 | 7 | message COAuthToken_ImplicitGrantNoPrompt_Response { 8 | optional string access_token = 1 [(description) = "OAuth Token, granted on success"]; 9 | optional string redirect_uri = 2 [(description) = "Redirection URI provided during client registration."]; 10 | } 11 | 12 | service OAuthToken { 13 | option (service_description) = "Service containing methods to manage OAuth tokens"; 14 | 15 | rpc ImplicitGrantNoPrompt (.COAuthToken_ImplicitGrantNoPrompt_Request) returns (.COAuthToken_ImplicitGrantNoPrompt_Response) { 16 | option (method_description) = "Grants an implicit OAuth token (grant type 'token') for the specified client ID on behalf of a user without prompting"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /protobufs/steammessages_player.steamworkssdk.proto: -------------------------------------------------------------------------------- 1 | import "steammessages_unified_base.steamworkssdk.proto"; 2 | 3 | option cc_generic_services = true; 4 | 5 | enum ENotificationSetting { 6 | k_ENotificationSettingNotifyUseDefault = 0; 7 | k_ENotificationSettingAlways = 1; 8 | k_ENotificationSettingNever = 2; 9 | } 10 | 11 | message CPlayer_GetMutualFriendsForIncomingInvites_Request { 12 | } 13 | 14 | message CPlayer_IncomingInviteMutualFriendList { 15 | optional fixed64 steamid = 1; 16 | repeated uint32 mutual_friend_account_ids = 2; 17 | } 18 | 19 | message CPlayer_GetMutualFriendsForIncomingInvites_Response { 20 | repeated .CPlayer_IncomingInviteMutualFriendList incoming_invite_mutual_friends_lists = 1; 21 | } 22 | 23 | message CPlayer_GetFriendsGameplayInfo_Request { 24 | optional uint32 appid = 1; 25 | } 26 | 27 | message CPlayer_GetFriendsGameplayInfo_Response { 28 | message FriendsGameplayInfo { 29 | optional fixed64 steamid = 1; 30 | optional uint32 minutes_played = 2; 31 | optional uint32 minutes_played_forever = 3; 32 | } 33 | 34 | message OwnGameplayInfo { 35 | optional fixed64 steamid = 1; 36 | optional uint32 minutes_played = 2; 37 | optional uint32 minutes_played_forever = 3; 38 | optional bool in_wishlist = 4; 39 | optional bool owned = 5; 40 | } 41 | 42 | optional .CPlayer_GetFriendsGameplayInfo_Response.OwnGameplayInfo your_info = 1; 43 | repeated .CPlayer_GetFriendsGameplayInfo_Response.FriendsGameplayInfo in_game = 2; 44 | repeated .CPlayer_GetFriendsGameplayInfo_Response.FriendsGameplayInfo played_recently = 3; 45 | repeated .CPlayer_GetFriendsGameplayInfo_Response.FriendsGameplayInfo played_ever = 4; 46 | repeated .CPlayer_GetFriendsGameplayInfo_Response.FriendsGameplayInfo owns = 5; 47 | repeated .CPlayer_GetFriendsGameplayInfo_Response.FriendsGameplayInfo in_wishlist = 6; 48 | } 49 | 50 | message CPlayer_GetGameBadgeLevels_Request { 51 | optional uint32 appid = 1; 52 | } 53 | 54 | message CPlayer_GetGameBadgeLevels_Response { 55 | message Badge { 56 | optional int32 level = 1; 57 | optional int32 series = 2; 58 | optional uint32 border_color = 3; 59 | } 60 | 61 | optional uint32 player_level = 1; 62 | repeated .CPlayer_GetGameBadgeLevels_Response.Badge badges = 2; 63 | } 64 | 65 | message CPlayer_GetLastPlayedTimes_Request { 66 | optional uint32 min_last_played = 1 [(description) = "The most recent last-played time the client already knows about"]; 67 | } 68 | 69 | message CPlayer_GetLastPlayedTimes_Response { 70 | message Game { 71 | optional int32 appid = 1; 72 | optional uint32 last_playtime = 2; 73 | optional int32 playtime_2weeks = 3; 74 | optional int32 playtime_forever = 4; 75 | optional uint32 first_playtime = 5; 76 | } 77 | 78 | repeated .CPlayer_GetLastPlayedTimes_Response.Game games = 1; 79 | } 80 | 81 | message CPlayer_AcceptSSA_Request { 82 | } 83 | 84 | message CPlayer_AcceptSSA_Response { 85 | } 86 | 87 | message CPlayer_GetNicknameList_Request { 88 | } 89 | 90 | message CPlayer_GetNicknameList_Response { 91 | message PlayerNickname { 92 | optional fixed32 accountid = 1; 93 | optional string nickname = 2; 94 | } 95 | 96 | repeated .CPlayer_GetNicknameList_Response.PlayerNickname nicknames = 1; 97 | } 98 | 99 | message CPlayer_GetPerFriendPreferences_Request { 100 | } 101 | 102 | message PerFriendPreferences { 103 | optional fixed32 accountid = 1; 104 | optional string nickname = 2; 105 | optional .ENotificationSetting notifications_showingame = 3 [default = k_ENotificationSettingNotifyUseDefault]; 106 | optional .ENotificationSetting notifications_showonline = 4 [default = k_ENotificationSettingNotifyUseDefault]; 107 | optional .ENotificationSetting notifications_showmessages = 5 [default = k_ENotificationSettingNotifyUseDefault]; 108 | optional .ENotificationSetting sounds_showingame = 6 [default = k_ENotificationSettingNotifyUseDefault]; 109 | optional .ENotificationSetting sounds_showonline = 7 [default = k_ENotificationSettingNotifyUseDefault]; 110 | optional .ENotificationSetting sounds_showmessages = 8 [default = k_ENotificationSettingNotifyUseDefault]; 111 | optional .ENotificationSetting notifications_sendmobile = 9 [default = k_ENotificationSettingNotifyUseDefault]; 112 | } 113 | 114 | message CPlayer_GetPerFriendPreferences_Response { 115 | repeated .PerFriendPreferences preferences = 1; 116 | } 117 | 118 | message CPlayer_SetPerFriendPreferences_Request { 119 | optional .PerFriendPreferences preferences = 1; 120 | } 121 | 122 | message CPlayer_SetPerFriendPreferences_Response { 123 | } 124 | 125 | message CPlayer_AddFriend_Request { 126 | optional fixed64 steamid = 1 [(description) = "Steam ID of user to whom to send a friend invite."]; 127 | } 128 | 129 | message CPlayer_AddFriend_Response { 130 | optional bool invite_sent = 1 [(description) = "True if the operation was successful, false otherwise."]; 131 | optional uint32 friend_relationship = 2 [(description) = "the resulting relationship. Depending on state, may move directly to friends rather than invite sent"]; 132 | } 133 | 134 | message CPlayer_RemoveFriend_Request { 135 | optional fixed64 steamid = 1 [(description) = "Steam ID of friend to remove."]; 136 | } 137 | 138 | message CPlayer_RemoveFriend_Response { 139 | optional uint32 friend_relationship = 1 [(description) = "the resulting relationship"]; 140 | } 141 | 142 | message CPlayer_IgnoreFriend_Request { 143 | optional fixed64 steamid = 1; 144 | optional bool unignore = 2 [(description) = "If set, remove from ignore/block list instead of adding "]; 145 | } 146 | 147 | message CPlayer_IgnoreFriend_Response { 148 | optional uint32 friend_relationship = 1 [(description) = "the resulting relationship"]; 149 | } 150 | 151 | message CPlayer_GetCommunityPreferences_Request { 152 | } 153 | 154 | message CPlayer_CommunityPreferences { 155 | optional bool hide_adult_content_violence = 1 [default = true]; 156 | optional bool hide_adult_content_sex = 2 [default = true]; 157 | optional bool parenthesize_nicknames = 4 [default = false]; 158 | optional uint32 timestamp_updated = 3; 159 | } 160 | 161 | message CPlayer_GetCommunityPreferences_Response { 162 | optional .CPlayer_CommunityPreferences preferences = 1; 163 | } 164 | 165 | message CPlayer_SetCommunityPreferences_Request { 166 | optional .CPlayer_CommunityPreferences preferences = 1; 167 | } 168 | 169 | message CPlayer_SetCommunityPreferences_Response { 170 | } 171 | 172 | message CPlayer_GetNewSteamAnnouncementState_Request { 173 | optional int32 language = 1; 174 | } 175 | 176 | message CPlayer_GetNewSteamAnnouncementState_Response { 177 | optional int32 state = 1; 178 | optional string announcement_headline = 2; 179 | optional string announcement_url = 3; 180 | optional uint32 time_posted = 4; 181 | optional uint64 announcement_gid = 5; 182 | } 183 | 184 | message CPlayer_UpdateSteamAnnouncementLastRead_Request { 185 | optional uint64 announcement_gid = 1; 186 | optional uint32 time_posted = 2; 187 | } 188 | 189 | message CPlayer_UpdateSteamAnnouncementLastRead_Response { 190 | } 191 | 192 | service Player { 193 | option (service_description) = "A service for accessing Steam player data"; 194 | 195 | rpc GetMutualFriendsForIncomingInvites (.CPlayer_GetMutualFriendsForIncomingInvites_Request) returns (.CPlayer_GetMutualFriendsForIncomingInvites_Response) { 196 | option (method_description) = "Get me the mutual friends for each of my pending incoming invites (individuals and clans)."; 197 | } 198 | 199 | rpc GetFriendsGameplayInfo (.CPlayer_GetFriendsGameplayInfo_Request) returns (.CPlayer_GetFriendsGameplayInfo_Response) { 200 | option (method_description) = "Get a list of friends who are playing, have played, own, or want a game"; 201 | } 202 | 203 | rpc GetGameBadgeLevels (.CPlayer_GetGameBadgeLevels_Request) returns (.CPlayer_GetGameBadgeLevels_Response) { 204 | option (method_description) = "Returns the Steam Level of a user, the Badge level for the game, and if it's foil"; 205 | } 206 | 207 | rpc ClientGetLastPlayedTimes (.CPlayer_GetLastPlayedTimes_Request) returns (.CPlayer_GetLastPlayedTimes_Response) { 208 | option (method_description) = "Gets the last-played times for the account"; 209 | } 210 | 211 | rpc AcceptSSA (.CPlayer_AcceptSSA_Request) returns (.CPlayer_AcceptSSA_Response) { 212 | option (method_description) = "User is accepting the SSA"; 213 | } 214 | 215 | rpc GetNicknameList (.CPlayer_GetNicknameList_Request) returns (.CPlayer_GetNicknameList_Response) { 216 | option (method_description) = "Gets the list of nicknames this user has for other users"; 217 | } 218 | 219 | rpc GetPerFriendPreferences (.CPlayer_GetPerFriendPreferences_Request) returns (.CPlayer_GetPerFriendPreferences_Response) { 220 | option (method_description) = "Gets the list of per-friend preferences this user has set for other users"; 221 | } 222 | 223 | rpc SetPerFriendPreferences (.CPlayer_SetPerFriendPreferences_Request) returns (.CPlayer_SetPerFriendPreferences_Response) { 224 | option (method_description) = "Sets the logged in user's per-friend preferences for the given user"; 225 | } 226 | 227 | rpc AddFriend (.CPlayer_AddFriend_Request) returns (.CPlayer_AddFriend_Response) { 228 | option (method_description) = "Invites another Steam user to be a friend"; 229 | } 230 | 231 | rpc RemoveFriend (.CPlayer_RemoveFriend_Request) returns (.CPlayer_RemoveFriend_Response) { 232 | option (method_description) = "Removes a friend or ignores a friend suggestion"; 233 | } 234 | 235 | rpc IgnoreFriend (.CPlayer_IgnoreFriend_Request) returns (.CPlayer_IgnoreFriend_Response) { 236 | option (method_description) = "Blocks or unblocks communication with the user. Despite name, can be a non-friend."; 237 | } 238 | 239 | rpc GetCommunityPreferences (.CPlayer_GetCommunityPreferences_Request) returns (.CPlayer_GetCommunityPreferences_Response) { 240 | option (method_description) = "Returns the player's community preferences"; 241 | } 242 | 243 | rpc SetCommunityPreferences (.CPlayer_SetCommunityPreferences_Request) returns (.CPlayer_SetCommunityPreferences_Response) { 244 | option (method_description) = "Sets the player's community preferences"; 245 | } 246 | 247 | rpc GetNewSteamAnnouncementState (.CPlayer_GetNewSteamAnnouncementState_Request) returns (.CPlayer_GetNewSteamAnnouncementState_Response) { 248 | option (method_description) = "Calculates and returns what to display for UI that renders new steam announcement available"; 249 | } 250 | 251 | rpc UpdateSteamAnnouncementLastRead (.CPlayer_UpdateSteamAnnouncementLastRead_Request) returns (.CPlayer_UpdateSteamAnnouncementLastRead_Response) { 252 | option (method_description) = "Marks latest announcement timestamp read by user"; 253 | } 254 | } 255 | -------------------------------------------------------------------------------- /protobufs/steammessages_publishedfile.steamworkssdk.proto: -------------------------------------------------------------------------------- 1 | import "steammessages_unified_base.steamworkssdk.proto"; 2 | 3 | message CPublishedFile_Subscribe_Request { 4 | optional uint64 publishedfileid = 1; 5 | optional uint32 list_type = 2; 6 | optional int32 appid = 3; 7 | optional bool notify_client = 4; 8 | } 9 | 10 | message CPublishedFile_Subscribe_Response { 11 | } 12 | 13 | message CPublishedFile_Unsubscribe_Request { 14 | optional uint64 publishedfileid = 1; 15 | optional uint32 list_type = 2; 16 | optional int32 appid = 3; 17 | optional bool notify_client = 4; 18 | } 19 | 20 | message CPublishedFile_Unsubscribe_Response { 21 | } 22 | 23 | message CPublishedFile_Publish_Request { 24 | optional uint32 appid = 1 [(description) = "App Id this file is being published FROM."]; 25 | optional uint32 consumer_appid = 2 [(description) = "App Id this file is being published TO."]; 26 | optional string cloudfilename = 3 [(description) = "Name of the file to publish in the user's cloud."]; 27 | optional string preview_cloudfilename = 4 [(description) = "Name of the file to use as the published file's preview."]; 28 | optional string title = 5 [(description) = "Text title for the published file."]; 29 | optional string file_description = 6 [(description) = "Text description for the published file."]; 30 | optional uint32 file_type = 7 [(description) = "(EWorkshopFileType) Type of Workshop file to publish."]; 31 | optional string consumer_shortcut_name = 8 [(description) = "Shortcut name for the published file."]; 32 | optional string youtube_username = 9 [(description) = "(Optional) User's YouTube account username."]; 33 | optional string youtube_videoid = 10 [(description) = "(Optional) Video Id of a YouTube video for this published file."]; 34 | optional uint32 visibility = 11 [(description) = "(ERemoteStoragePublishedFileVisibility) Visibility of the published file (private, friends, public, etc.)"]; 35 | optional string redirect_uri = 12 [(description) = "(Optional) If supplied, the resulting published file's Id is appended to the URI."]; 36 | repeated string tags = 13 [(description) = "Array of text tags to apply to the published file."]; 37 | optional string collection_type = 14 [(description) = "(Optional) Type of collection the published file represents."]; 38 | optional string game_type = 15 [(description) = "(Optional) Type of game the published file represents."]; 39 | optional string url = 16 [(description) = "(Optional) If this represents a game, this is the URL to that game's page."]; 40 | } 41 | 42 | message CPublishedFile_Publish_Response { 43 | optional uint64 publishedfileid = 1; 44 | optional string redirect_uri = 2; 45 | } 46 | 47 | message CPublishedFile_GetDetails_Request { 48 | repeated fixed64 publishedfileids = 1 [(description) = "Set of published file Ids to retrieve details for."]; 49 | optional bool includetags = 2 [(description) = "If true, return tag information in the returned details."]; 50 | optional bool includeadditionalpreviews = 3 [(description) = "If true, return preview information in the returned details."]; 51 | optional bool includechildren = 4 [(description) = "If true, return children in the returned details."]; 52 | optional bool includekvtags = 5 [(description) = "If true, return key value tags in the returned details."]; 53 | optional bool includevotes = 6 [(description) = "If true, return vote data in the returned details."]; 54 | optional bool short_description = 8 [(description) = "If true, return a short description instead of the full description."]; 55 | } 56 | 57 | message PublishedFileDetails { 58 | message Tag { 59 | optional string tag = 1; 60 | optional bool adminonly = 2; 61 | } 62 | 63 | message Preview { 64 | optional uint64 previewid = 1; 65 | optional uint32 sortorder = 2; 66 | optional string url = 3; 67 | optional uint32 size = 4; 68 | optional string filename = 5; 69 | optional string youtubevideoid = 6; 70 | } 71 | 72 | message Child { 73 | optional uint64 publishedfileid = 1; 74 | optional uint32 sortorder = 2; 75 | optional uint32 file_type = 3; 76 | } 77 | 78 | message KVTag { 79 | optional string key = 1; 80 | optional string value = 2; 81 | } 82 | 83 | message VoteData { 84 | optional float score = 1; 85 | optional uint32 votes_up = 2; 86 | optional uint32 votes_down = 3; 87 | } 88 | 89 | optional uint32 result = 1; 90 | optional uint64 publishedfileid = 2; 91 | optional fixed64 creator = 3; 92 | optional uint32 creator_appid = 4; 93 | optional uint32 consumer_appid = 5; 94 | optional uint32 consumer_shortcutid = 6; 95 | optional string filename = 7; 96 | optional uint64 file_size = 8; 97 | optional uint64 preview_file_size = 9; 98 | optional string file_url = 10; 99 | optional string preview_url = 11; 100 | optional string youtubevideoid = 12; 101 | optional string url = 13; 102 | optional fixed64 hcontent_file = 14; 103 | optional fixed64 hcontent_preview = 15; 104 | optional string title = 16; 105 | optional string file_description = 17; 106 | optional string short_description = 18; 107 | optional uint32 time_created = 19; 108 | optional uint32 time_updated = 20; 109 | optional uint32 visibility = 21; 110 | optional uint32 flags = 22; 111 | optional bool workshop_file = 23; 112 | optional bool workshop_accepted = 24; 113 | optional bool show_subscribe_all = 25; 114 | optional int32 num_comments_developer = 26; 115 | optional int32 num_comments_public = 27; 116 | optional bool banned = 28; 117 | optional string ban_reason = 29; 118 | optional fixed64 banner = 30; 119 | optional bool can_be_deleted = 31; 120 | optional bool incompatible = 32; 121 | optional string app_name = 33; 122 | optional uint32 file_type = 34; 123 | optional bool can_subscribe = 35; 124 | optional uint32 subscriptions = 36; 125 | optional uint32 favorited = 37; 126 | optional uint32 followers = 38; 127 | optional uint32 lifetime_subscriptions = 39; 128 | optional uint32 lifetime_favorited = 40; 129 | optional uint32 lifetime_followers = 41; 130 | optional uint32 views = 42; 131 | optional uint32 image_width = 43; 132 | optional uint32 image_height = 44; 133 | optional string image_url = 45; 134 | optional bool spoiler_tag = 46; 135 | optional uint32 shortcutid = 47; 136 | optional string shortcutname = 48; 137 | optional uint32 num_children = 49; 138 | optional uint32 num_reports = 50; 139 | repeated .PublishedFileDetails.Preview previews = 51; 140 | repeated .PublishedFileDetails.Tag tags = 52; 141 | repeated .PublishedFileDetails.Child children = 53; 142 | repeated .PublishedFileDetails.KVTag kvtags = 54; 143 | optional .PublishedFileDetails.VoteData vote_data = 55; 144 | optional uint32 time_subscribed = 56 [(description) = "Only valid in PublishedFile.GetUserFiles and not normal PublishedFile.GetDetail calls"]; 145 | } 146 | 147 | message CPublishedFile_GetDetails_Response { 148 | repeated .PublishedFileDetails publishedfiledetails = 1; 149 | } 150 | 151 | message CPublishedFile_GetUserFiles_Request { 152 | optional uint32 appid = 1 [(description) = "App Id to retrieve published files from."]; 153 | optional uint32 page = 3 [default = 1, (description) = "(Optional) Starting page for results."]; 154 | optional uint32 numperpage = 4 [default = 1, (description) = "(Optional) The number of results, per page to return."]; 155 | optional string sortmethod = 6 [default = "lastupdated", (description) = "(Optional) Sorting method to use on returned values."]; 156 | optional bool totalonly = 7 [(description) = "(Optional) If true, only return the total number of files that satisfy this query."]; 157 | optional uint32 privacy = 9 [(description) = "(optional) Filter by privacy settings."]; 158 | optional bool ids_only = 10 [(description) = "(Optional) If true, only return the published file ids of files that satisfy this query."]; 159 | repeated string requiredtags = 11 [(description) = "(Optional) Tags that must be present on a published file to satisfy the query."]; 160 | repeated string excludedtags = 12 [(description) = "(Optional) Tags that must NOT be present on a published file to satisfy the query."]; 161 | } 162 | 163 | message CPublishedFile_GetUserFiles_Response { 164 | message App { 165 | optional uint32 appid = 1; 166 | optional string name = 2; 167 | optional uint32 shortcutid = 3; 168 | optional bool private = 4; 169 | } 170 | 171 | optional uint32 total = 1; 172 | optional uint32 startindex = 2; 173 | repeated .PublishedFileDetails publishedfiledetails = 3; 174 | repeated .CPublishedFile_GetUserFiles_Response.App apps = 4; 175 | } 176 | 177 | message CPublishedFile_Update_Request { 178 | optional uint32 appid = 1 [(description) = "App Id this published file belongs to."]; 179 | optional fixed64 publishedfileid = 2 [(description) = "Published file id of the file we'd like update."]; 180 | optional string title = 3 [(description) = "(Optional) Title of the published file."]; 181 | optional string file_description = 4 [(description) = "(Optional) Description of the published file."]; 182 | optional uint32 visibility = 5 [(description) = "(Optional) Visibility of the published file."]; 183 | repeated string tags = 6 [(description) = "(Optional) Set of tags for the published file."]; 184 | optional string filename = 7 [(description) = "(Optional) Filename for the published file."]; 185 | optional string preview_filename = 8 [(description) = "(Optional) Preview filename for the published file."]; 186 | } 187 | 188 | message CPublishedFile_Update_Response { 189 | } 190 | 191 | message CPublishedFile_RefreshVotingQueue_Request { 192 | optional uint32 appid = 1; 193 | optional uint32 matching_file_type = 2 [(description) = "EPublishedFileInfoMatchingFileType"]; 194 | repeated string tags = 3 [(description) = "Include files that have all the tags or any of the tags if match_all_tags is set to false."]; 195 | optional bool match_all_tags = 4 [default = true, (description) = "If true, then files must have all the tags specified. If false, then must have at least one of the tags specified."]; 196 | repeated string excluded_tags = 5 [(description) = "Exclude any files that have any of these tags."]; 197 | optional uint32 desired_queue_size = 6 [(description) = "Desired number of items in the voting queue. May be clamped by the server"]; 198 | } 199 | 200 | message CPublishedFile_RefreshVotingQueue_Response { 201 | } 202 | 203 | service PublishedFile { 204 | option (service_description) = "A service to access published file data"; 205 | 206 | rpc Subscribe (.CPublishedFile_Subscribe_Request) returns (.CPublishedFile_Subscribe_Response) { 207 | option (method_description) = "Subscribes the user to the published file"; 208 | } 209 | 210 | rpc Unsubscribe (.CPublishedFile_Unsubscribe_Request) returns (.CPublishedFile_Unsubscribe_Response) { 211 | option (method_description) = "Unsubscribes the user from the published file"; 212 | } 213 | 214 | rpc Publish (.CPublishedFile_Publish_Request) returns (.CPublishedFile_Publish_Response) { 215 | option (method_description) = "Publishes a clouded user file to the Workshop."; 216 | } 217 | 218 | rpc GetDetails (.CPublishedFile_GetDetails_Request) returns (.CPublishedFile_GetDetails_Response) { 219 | option (method_description) = "Retrieves information about a set of published files."; 220 | } 221 | 222 | rpc GetUserFiles (.CPublishedFile_GetUserFiles_Request) returns (.CPublishedFile_GetUserFiles_Response) { 223 | option (method_description) = "Retrieves files published by a user."; 224 | } 225 | 226 | rpc Update (.CPublishedFile_Update_Request) returns (.CPublishedFile_Update_Response) { 227 | option (method_description) = "Updates information about a published file."; 228 | } 229 | 230 | rpc RefreshVotingQueue (.CPublishedFile_RefreshVotingQueue_Request) returns (.CPublishedFile_RefreshVotingQueue_Response) { 231 | option (method_description) = "Refresh the voting queue for the user"; 232 | } 233 | } 234 | -------------------------------------------------------------------------------- /protobufs/steammessages_unified_base.steamworkssdk.proto: -------------------------------------------------------------------------------- 1 | import "google/protobuf/descriptor.proto"; 2 | 3 | option optimize_for = SPEED; 4 | option cc_generic_services = false; 5 | 6 | extend .google.protobuf.FieldOptions { 7 | optional string description = 50000; 8 | } 9 | 10 | extend .google.protobuf.ServiceOptions { 11 | optional string service_description = 50000; 12 | optional .EProtoExecutionSite service_execution_site = 50008 [default = k_EProtoExecutionSiteUnknown]; 13 | } 14 | 15 | extend .google.protobuf.MethodOptions { 16 | optional string method_description = 50000; 17 | } 18 | 19 | extend .google.protobuf.EnumOptions { 20 | optional string enum_description = 50000; 21 | } 22 | 23 | extend .google.protobuf.EnumValueOptions { 24 | optional string enum_value_description = 50000; 25 | } 26 | 27 | enum EProtoExecutionSite { 28 | k_EProtoExecutionSiteUnknown = 0; 29 | k_EProtoExecutionSiteSteamClient = 3; 30 | } 31 | -------------------------------------------------------------------------------- /protobufs/steamnetworkingsockets_messages.proto: -------------------------------------------------------------------------------- 1 | import "steamnetworkingsockets_messages_certs.proto"; 2 | 3 | option optimize_for = SPEED; 4 | option cc_generic_services = false; 5 | 6 | enum ESteamNetworkingSocketsCipher { 7 | k_ESteamNetworkingSocketsCipher_INVALID = 0; 8 | k_ESteamNetworkingSocketsCipher_NULL = 1; 9 | k_ESteamNetworkingSocketsCipher_AES_256_GCM = 2; 10 | } 11 | 12 | message CMsgSteamDatagramSessionCryptInfo { 13 | enum EKeyType { 14 | INVALID = 0; 15 | CURVE25519 = 1; 16 | } 17 | 18 | optional .CMsgSteamDatagramSessionCryptInfo.EKeyType key_type = 1 [default = INVALID]; 19 | optional bytes key_data = 2; 20 | optional fixed64 nonce = 3; 21 | optional uint32 protocol_version = 4; 22 | repeated .ESteamNetworkingSocketsCipher ciphers = 5; 23 | } 24 | 25 | message CMsgSteamDatagramSessionCryptInfoSigned { 26 | optional bytes info = 1; 27 | optional bytes signature = 2; 28 | } 29 | 30 | message CMsgSteamDatagramDiagnostic { 31 | optional uint32 severity = 1; 32 | optional string text = 2; 33 | } 34 | 35 | message CMsgSteamDatagramLinkInstantaneousStats { 36 | optional uint32 out_packets_per_sec_x10 = 1; 37 | optional uint32 out_bytes_per_sec = 2; 38 | optional uint32 in_packets_per_sec_x10 = 3; 39 | optional uint32 in_bytes_per_sec = 4; 40 | optional uint32 ping_ms = 5; 41 | optional uint32 packets_dropped_pct = 6; 42 | optional uint32 packets_weird_sequence_pct = 7; 43 | optional uint32 peak_jitter_usec = 8; 44 | } 45 | 46 | message CMsgSteamDatagramLinkLifetimeStats { 47 | optional uint32 connected_seconds = 2; 48 | optional uint64 packets_sent = 3; 49 | optional uint64 kb_sent = 4; 50 | optional uint64 packets_recv = 5; 51 | optional uint64 kb_recv = 6; 52 | optional uint64 packets_recv_sequenced = 7; 53 | optional uint64 packets_recv_dropped = 8; 54 | optional uint64 packets_recv_out_of_order = 9; 55 | optional uint64 packets_recv_out_of_order_corrected = 15; 56 | optional uint64 packets_recv_duplicate = 10; 57 | optional uint64 packets_recv_lurch = 11; 58 | repeated uint64 multipath_packets_recv_sequenced = 12; 59 | repeated uint64 multipath_packets_recv_later = 13; 60 | optional uint32 multipath_send_enabled = 14; 61 | optional uint32 quality_histogram_100 = 21; 62 | optional uint32 quality_histogram_99 = 22; 63 | optional uint32 quality_histogram_97 = 23; 64 | optional uint32 quality_histogram_95 = 24; 65 | optional uint32 quality_histogram_90 = 25; 66 | optional uint32 quality_histogram_75 = 26; 67 | optional uint32 quality_histogram_50 = 27; 68 | optional uint32 quality_histogram_1 = 28; 69 | optional uint32 quality_histogram_dead = 29; 70 | optional uint32 quality_ntile_2nd = 30; 71 | optional uint32 quality_ntile_5th = 31; 72 | optional uint32 quality_ntile_25th = 32; 73 | optional uint32 quality_ntile_50th = 33; 74 | optional uint32 ping_histogram_25 = 41; 75 | optional uint32 ping_histogram_50 = 42; 76 | optional uint32 ping_histogram_75 = 43; 77 | optional uint32 ping_histogram_100 = 44; 78 | optional uint32 ping_histogram_125 = 45; 79 | optional uint32 ping_histogram_150 = 46; 80 | optional uint32 ping_histogram_200 = 47; 81 | optional uint32 ping_histogram_300 = 48; 82 | optional uint32 ping_histogram_max = 49; 83 | optional uint32 ping_ntile_5th = 50; 84 | optional uint32 ping_ntile_50th = 51; 85 | optional uint32 ping_ntile_75th = 52; 86 | optional uint32 ping_ntile_95th = 53; 87 | optional uint32 ping_ntile_98th = 54; 88 | optional uint32 jitter_histogram_negligible = 61; 89 | optional uint32 jitter_histogram_1 = 62; 90 | optional uint32 jitter_histogram_2 = 63; 91 | optional uint32 jitter_histogram_5 = 64; 92 | optional uint32 jitter_histogram_10 = 65; 93 | optional uint32 jitter_histogram_20 = 66; 94 | } 95 | 96 | message CMsgSteamDatagramConnectionQuality { 97 | optional .CMsgSteamDatagramLinkInstantaneousStats instantaneous = 1; 98 | optional .CMsgSteamDatagramLinkLifetimeStats lifetime = 2; 99 | } 100 | 101 | message CMsgICECandidate { 102 | optional string candidate = 3; 103 | } 104 | 105 | message CMsgICERendezvous { 106 | message Auth { 107 | optional string pwd_frag = 1; 108 | } 109 | 110 | optional .CMsgICERendezvous.Auth auth = 2; 111 | optional .CMsgICECandidate add_candidate = 1; 112 | } 113 | 114 | message CMsgSteamNetworkingP2PRendezvous { 115 | message ConnectRequest { 116 | optional .CMsgSteamDatagramSessionCryptInfoSigned crypt = 6; 117 | optional .CMsgSteamDatagramCertificateSigned cert = 7; 118 | optional uint32 to_virtual_port = 9; 119 | optional uint32 from_virtual_port = 10; 120 | optional string from_fakeip = 11; 121 | } 122 | 123 | message ConnectOK { 124 | optional .CMsgSteamDatagramSessionCryptInfoSigned crypt = 5; 125 | optional .CMsgSteamDatagramCertificateSigned cert = 6; 126 | } 127 | 128 | message ConnectionClosed { 129 | optional string debug = 5; 130 | optional uint32 reason_code = 6; 131 | } 132 | 133 | message ReliableMessage { 134 | optional .CMsgICERendezvous ice = 1; 135 | } 136 | 137 | message ApplicationMessage { 138 | optional bytes data = 1; 139 | optional uint64 msg_num = 2; 140 | optional uint32 flags = 3; 141 | optional uint32 lane_idx = 4; 142 | } 143 | 144 | optional string from_identity = 8; 145 | optional fixed32 from_connection_id = 9; 146 | optional string to_identity = 10; 147 | optional fixed32 to_connection_id = 1; 148 | optional bytes sdr_routes = 2; 149 | optional uint32 ack_peer_routes_revision = 3; 150 | optional bool ice_enabled = 7; 151 | optional bytes hosted_server_ticket = 14; 152 | optional .CMsgSteamNetworkingP2PRendezvous.ConnectRequest connect_request = 4; 153 | optional .CMsgSteamNetworkingP2PRendezvous.ConnectOK connect_ok = 5; 154 | optional .CMsgSteamNetworkingP2PRendezvous.ConnectionClosed connection_closed = 6; 155 | optional uint32 ack_reliable_msg = 11; 156 | optional uint32 first_reliable_msg = 12; 157 | repeated .CMsgSteamNetworkingP2PRendezvous.ReliableMessage reliable_messages = 13; 158 | repeated .CMsgSteamNetworkingP2PRendezvous.ApplicationMessage application_messages = 15; 159 | } 160 | 161 | message CMsgSteamNetworkingICESessionSummary { 162 | optional uint32 failure_reason_code = 7; 163 | optional uint32 local_candidate_types = 1; 164 | optional uint32 remote_candidate_types = 2; 165 | optional uint32 initial_route_kind = 3; 166 | optional uint32 initial_ping = 4; 167 | optional uint32 initial_score = 6; 168 | optional uint32 negotiation_ms = 5; 169 | optional uint32 best_route_kind = 16; 170 | optional uint32 best_ping = 17; 171 | optional uint32 best_score = 18; 172 | optional uint32 best_time = 19; 173 | optional uint32 selected_seconds = 12; 174 | optional uint32 user_settings = 13; 175 | optional uint32 ice_enable_var = 14; 176 | optional uint32 local_candidate_types_allowed = 15; 177 | } 178 | -------------------------------------------------------------------------------- /protobufs/steamnetworkingsockets_messages_certs.proto: -------------------------------------------------------------------------------- 1 | option optimize_for = SPEED; 2 | option cc_generic_services = false; 3 | 4 | message CMsgSteamNetworkingIdentityLegacyBinary { 5 | optional fixed64 steam_id = 16; 6 | optional bytes generic_bytes = 2; 7 | optional string generic_string = 3; 8 | optional bytes ipv6_and_port = 4; 9 | } 10 | 11 | message CMsgSteamDatagramCertificate { 12 | enum EKeyType { 13 | INVALID = 0; 14 | ED25519 = 1; 15 | } 16 | 17 | optional .CMsgSteamDatagramCertificate.EKeyType key_type = 1 [default = INVALID]; 18 | optional bytes key_data = 2; 19 | optional fixed64 legacy_steam_id = 4; 20 | optional .CMsgSteamNetworkingIdentityLegacyBinary legacy_identity_binary = 11; 21 | optional string identity_string = 12; 22 | repeated fixed32 gameserver_datacenter_ids = 5; 23 | optional fixed32 time_created = 8; 24 | optional fixed32 time_expiry = 9; 25 | repeated uint32 app_ids = 10; 26 | repeated string ip_addresses = 13; 27 | } 28 | 29 | message CMsgSteamDatagramCertificateSigned { 30 | optional bytes cert = 4; 31 | optional fixed64 ca_key_id = 5; 32 | optional bytes ca_signature = 6; 33 | optional bytes private_key_data = 1; 34 | } 35 | 36 | message CMsgSteamDatagramCertificateRequest { 37 | optional .CMsgSteamDatagramCertificate cert = 1; 38 | } 39 | -------------------------------------------------------------------------------- /protobufs/steamnetworkingsockets_messages_udp.proto: -------------------------------------------------------------------------------- 1 | import "steamnetworkingsockets_messages_certs.proto"; 2 | import "steamnetworkingsockets_messages.proto"; 3 | 4 | option optimize_for = SPEED; 5 | option cc_generic_services = false; 6 | 7 | enum ESteamNetworkingUDPMsgID { 8 | k_ESteamNetworkingUDPMsg_ChallengeRequest = 32; 9 | k_ESteamNetworkingUDPMsg_ChallengeReply = 33; 10 | k_ESteamNetworkingUDPMsg_ConnectRequest = 34; 11 | k_ESteamNetworkingUDPMsg_ConnectOK = 35; 12 | k_ESteamNetworkingUDPMsg_ConnectionClosed = 36; 13 | k_ESteamNetworkingUDPMsg_NoConnection = 37; 14 | } 15 | 16 | message CMsgSteamSockets_UDP_ChallengeRequest { 17 | optional fixed32 connection_id = 1; 18 | optional fixed64 my_timestamp = 3; 19 | optional uint32 protocol_version = 4; 20 | } 21 | 22 | message CMsgSteamSockets_UDP_ChallengeReply { 23 | optional fixed32 connection_id = 1; 24 | optional fixed64 challenge = 2; 25 | optional fixed64 your_timestamp = 3; 26 | optional uint32 protocol_version = 4; 27 | } 28 | 29 | message CMsgSteamSockets_UDP_ConnectRequest { 30 | optional fixed32 client_connection_id = 1; 31 | optional fixed64 challenge = 2; 32 | optional fixed64 my_timestamp = 5; 33 | optional uint32 ping_est_ms = 6; 34 | optional .CMsgSteamDatagramSessionCryptInfoSigned crypt = 7; 35 | optional .CMsgSteamDatagramCertificateSigned cert = 4; 36 | optional uint32 legacy_protocol_version = 8; 37 | optional string identity_string = 10; 38 | optional fixed64 legacy_client_steam_id = 3; 39 | optional .CMsgSteamNetworkingIdentityLegacyBinary legacy_identity_binary = 9; 40 | } 41 | 42 | message CMsgSteamSockets_UDP_ConnectOK { 43 | optional fixed32 client_connection_id = 1; 44 | optional fixed32 server_connection_id = 5; 45 | optional fixed64 your_timestamp = 3; 46 | optional uint32 delay_time_usec = 4; 47 | optional .CMsgSteamDatagramSessionCryptInfoSigned crypt = 7; 48 | optional .CMsgSteamDatagramCertificateSigned cert = 8; 49 | optional string identity_string = 11; 50 | optional fixed64 legacy_server_steam_id = 2; 51 | optional .CMsgSteamNetworkingIdentityLegacyBinary legacy_identity_binary = 10; 52 | } 53 | 54 | message CMsgSteamSockets_UDP_ConnectionClosed { 55 | optional fixed32 to_connection_id = 4; 56 | optional fixed32 from_connection_id = 5; 57 | optional string debug = 2; 58 | optional uint32 reason_code = 3; 59 | } 60 | 61 | message CMsgSteamSockets_UDP_NoConnection { 62 | optional fixed32 from_connection_id = 2; 63 | optional fixed32 to_connection_id = 3; 64 | } 65 | 66 | message CMsgSteamSockets_UDP_Stats { 67 | enum Flags { 68 | ACK_REQUEST_E2E = 2; 69 | ACK_REQUEST_IMMEDIATE = 4; 70 | NOT_PRIMARY_TRANSPORT_E2E = 16; 71 | } 72 | 73 | optional .CMsgSteamDatagramConnectionQuality stats = 1; 74 | optional uint32 flags = 3; 75 | } 76 | -------------------------------------------------------------------------------- /protobufs/te.proto: -------------------------------------------------------------------------------- 1 | import "networkbasetypes.proto"; 2 | 3 | enum ETEProtobufIds { 4 | TE_EffectDispatchId = 400; 5 | TE_ArmorRicochetId = 401; 6 | TE_BeamEntPointId = 402; 7 | TE_BeamEntsId = 403; 8 | TE_BeamPointsId = 404; 9 | TE_BeamRingId = 405; 10 | TE_BSPDecalId = 407; 11 | TE_BubblesId = 408; 12 | TE_BubbleTrailId = 409; 13 | TE_DecalId = 410; 14 | TE_WorldDecalId = 411; 15 | TE_EnergySplashId = 412; 16 | TE_FizzId = 413; 17 | TE_ShatterSurfaceId = 414; 18 | TE_GlowSpriteId = 415; 19 | TE_ImpactId = 416; 20 | TE_MuzzleFlashId = 417; 21 | TE_BloodStreamId = 418; 22 | TE_ExplosionId = 419; 23 | TE_DustId = 420; 24 | TE_LargeFunnelId = 421; 25 | TE_SparksId = 422; 26 | TE_PhysicsPropId = 423; 27 | TE_PlayerDecalId = 424; 28 | TE_ProjectedDecalId = 425; 29 | TE_SmokeId = 426; 30 | } 31 | 32 | message CMsgTEArmorRicochet { 33 | optional .CMsgVector pos = 1; 34 | optional .CMsgVector dir = 2; 35 | } 36 | 37 | message CMsgTEBaseBeam { 38 | optional fixed64 modelindex = 1; 39 | optional fixed64 haloindex = 2; 40 | optional uint32 startframe = 3; 41 | optional uint32 framerate = 4; 42 | optional float life = 5; 43 | optional float width = 6; 44 | optional float endwidth = 7; 45 | optional uint32 fadelength = 8; 46 | optional float amplitude = 9; 47 | optional fixed32 color = 10; 48 | optional uint32 speed = 11; 49 | optional uint32 flags = 12; 50 | } 51 | 52 | message CMsgTEBeamEntPoint { 53 | optional .CMsgTEBaseBeam base = 1; 54 | optional uint32 startentity = 2; 55 | optional uint32 endentity = 3; 56 | optional .CMsgVector start = 4; 57 | optional .CMsgVector end = 5; 58 | } 59 | 60 | message CMsgTEBeamEnts { 61 | optional .CMsgTEBaseBeam base = 1; 62 | optional uint32 startentity = 2; 63 | optional uint32 endentity = 3; 64 | } 65 | 66 | message CMsgTEBeamPoints { 67 | optional .CMsgTEBaseBeam base = 1; 68 | optional .CMsgVector start = 2; 69 | optional .CMsgVector end = 3; 70 | } 71 | 72 | message CMsgTEBeamRing { 73 | optional .CMsgTEBaseBeam base = 1; 74 | optional uint32 startentity = 2; 75 | optional uint32 endentity = 3; 76 | } 77 | 78 | message CMsgTEBSPDecal { 79 | optional .CMsgVector origin = 1; 80 | optional .CMsgVector normal = 2; 81 | optional .CMsgVector saxis = 3; 82 | optional int32 entity = 4 [default = -1]; 83 | optional uint32 index = 5; 84 | } 85 | 86 | message CMsgTEBubbles { 87 | optional .CMsgVector mins = 1; 88 | optional .CMsgVector maxs = 2; 89 | optional float height = 3; 90 | optional uint32 count = 4; 91 | optional float speed = 5; 92 | } 93 | 94 | message CMsgTEBubbleTrail { 95 | optional .CMsgVector mins = 1; 96 | optional .CMsgVector maxs = 2; 97 | optional float waterz = 3; 98 | optional uint32 count = 4; 99 | optional float speed = 5; 100 | } 101 | 102 | message CMsgTEDecal { 103 | optional .CMsgVector origin = 1; 104 | optional .CMsgVector start = 2; 105 | optional int32 entity = 3 [default = -1]; 106 | optional uint32 hitbox = 4; 107 | optional uint32 index = 5; 108 | } 109 | 110 | message CMsgEffectData { 111 | optional .CMsgVector origin = 1; 112 | optional .CMsgVector start = 2; 113 | optional .CMsgVector normal = 3; 114 | optional .CMsgQAngle angles = 4; 115 | optional fixed32 entity = 5 [default = 16777215]; 116 | optional fixed32 otherentity = 6 [default = 16777215]; 117 | optional float scale = 7; 118 | optional float magnitude = 8; 119 | optional float radius = 9; 120 | optional fixed32 surfaceprop = 10; 121 | optional fixed64 effectindex = 11; 122 | optional uint32 damagetype = 12; 123 | optional uint32 material = 13; 124 | optional uint32 hitbox = 14; 125 | optional uint32 color = 15; 126 | optional uint32 flags = 16; 127 | optional int32 attachmentindex = 17; 128 | optional uint32 effectname = 18; 129 | optional uint32 attachmentname = 19; 130 | } 131 | 132 | message CMsgTEEffectDispatch { 133 | optional .CMsgEffectData effectdata = 1; 134 | } 135 | 136 | message CMsgTEEnergySplash { 137 | optional .CMsgVector pos = 1; 138 | optional .CMsgVector dir = 2; 139 | optional bool explosive = 3; 140 | } 141 | 142 | message CMsgTEFizz { 143 | optional int32 entity = 1 [default = -1]; 144 | optional uint32 density = 2; 145 | optional int32 current = 3; 146 | } 147 | 148 | message CMsgTEShatterSurface { 149 | optional .CMsgVector origin = 1; 150 | optional .CMsgQAngle angles = 2; 151 | optional .CMsgVector force = 3; 152 | optional .CMsgVector forcepos = 4; 153 | optional float width = 5; 154 | optional float height = 6; 155 | optional float shardsize = 7; 156 | optional uint32 surfacetype = 8; 157 | optional fixed32 frontcolor = 9; 158 | optional fixed32 backcolor = 10; 159 | } 160 | 161 | message CMsgTEGlowSprite { 162 | optional .CMsgVector origin = 1; 163 | optional float scale = 2; 164 | optional float life = 3; 165 | optional uint32 brightness = 4; 166 | } 167 | 168 | message CMsgTEImpact { 169 | optional .CMsgVector origin = 1; 170 | optional .CMsgVector normal = 2; 171 | optional uint32 type = 3; 172 | } 173 | 174 | message CMsgTEMuzzleFlash { 175 | optional .CMsgVector origin = 1; 176 | optional .CMsgQAngle angles = 2; 177 | optional float scale = 3; 178 | optional uint32 type = 4; 179 | } 180 | 181 | message CMsgTEBloodStream { 182 | optional .CMsgVector origin = 1; 183 | optional .CMsgVector direction = 2; 184 | optional fixed32 color = 3; 185 | optional uint32 amount = 4; 186 | } 187 | 188 | message CMsgTEExplosion { 189 | optional .CMsgVector origin = 1; 190 | optional uint32 framerate = 2; 191 | optional uint32 flags = 3; 192 | optional .CMsgVector normal = 4; 193 | optional uint32 materialtype = 5; 194 | optional uint32 radius = 6; 195 | optional uint32 magnitude = 7; 196 | optional float scale = 8; 197 | optional bool affect_ragdolls = 9; 198 | optional string effect_name = 10; 199 | optional uint32 explosion_type = 11; 200 | } 201 | 202 | message CMsgTEDust { 203 | optional .CMsgVector origin = 1; 204 | optional float size = 2; 205 | optional float speed = 3; 206 | optional .CMsgVector direction = 4; 207 | } 208 | 209 | message CMsgTELargeFunnel { 210 | optional .CMsgVector origin = 1; 211 | optional uint32 reversed = 2; 212 | } 213 | 214 | message CMsgTESparks { 215 | optional .CMsgVector origin = 1; 216 | optional uint32 magnitude = 2; 217 | optional uint32 length = 3; 218 | optional .CMsgVector direction = 4; 219 | } 220 | 221 | message CMsgTEPhysicsProp { 222 | optional .CMsgVector origin = 1; 223 | optional .CMsgVector velocity = 2; 224 | optional .CMsgQAngle angles = 3; 225 | optional fixed32 skin = 4; 226 | optional uint32 flags = 5; 227 | optional uint32 effects = 6; 228 | optional fixed32 color = 7; 229 | optional fixed64 modelindex = 8; 230 | optional uint32 unused_breakmodelsnottomake = 9; 231 | optional float scale = 10; 232 | optional .CMsgVector dmgpos = 11; 233 | optional .CMsgVector dmgdir = 12; 234 | optional int32 dmgtype = 13; 235 | } 236 | 237 | message CMsgTEPlayerDecal { 238 | optional .CMsgVector origin = 1; 239 | optional int32 player = 2 [default = -1]; 240 | optional int32 entity = 3 [default = -1]; 241 | } 242 | 243 | message CMsgTEProjectedDecal { 244 | optional .CMsgVector origin = 1; 245 | optional .CMsgQAngle angles = 2; 246 | optional uint32 index = 3; 247 | optional float distance = 4; 248 | } 249 | 250 | message CMsgTESmoke { 251 | optional .CMsgVector origin = 1; 252 | optional float scale = 2; 253 | } 254 | 255 | message CMsgTEWorldDecal { 256 | optional .CMsgVector origin = 1; 257 | optional .CMsgVector normal = 2; 258 | optional uint32 index = 3; 259 | } 260 | -------------------------------------------------------------------------------- /protobufs/uifontfile_format.proto: -------------------------------------------------------------------------------- 1 | message CUIFontFilePB { 2 | optional string font_file_name = 1; 3 | optional bytes opentype_font_data = 2; 4 | } 5 | 6 | message CUIFontFilePackagePB { 7 | message CUIEncryptedFontFilePB { 8 | optional bytes encrypted_contents = 1; 9 | } 10 | 11 | required uint32 package_version = 1; 12 | repeated .CUIFontFilePackagePB.CUIEncryptedFontFilePB encrypted_font_files = 2; 13 | } 14 | -------------------------------------------------------------------------------- /protobufs/usercmd.proto: -------------------------------------------------------------------------------- 1 | import "networkbasetypes.proto"; 2 | 3 | message CInButtonStatePB { 4 | optional uint64 buttonstate1 = 1; 5 | optional uint64 buttonstate2 = 2; 6 | optional uint64 buttonstate3 = 3; 7 | } 8 | 9 | message CSubtickMoveStep { 10 | optional uint64 button = 1; 11 | optional bool pressed = 2; 12 | optional float when = 3; 13 | optional float analog_forward_delta = 4; 14 | optional float analog_left_delta = 5; 15 | } 16 | 17 | message CBaseUserCmdPB { 18 | optional int32 command_number = 1; 19 | optional int32 client_tick = 2; 20 | optional .CInButtonStatePB buttons_pb = 3; 21 | optional .CMsgQAngle viewangles = 4; 22 | optional float forwardmove = 5; 23 | optional float leftmove = 6; 24 | optional float upmove = 7; 25 | optional int32 impulse = 8; 26 | optional int32 weaponselect = 9; 27 | optional int32 random_seed = 10; 28 | optional int32 mousedx = 11; 29 | optional int32 mousedy = 12; 30 | optional uint32 pawn_entity_handle = 14 [default = 16777215]; 31 | repeated .CSubtickMoveStep subtick_moves = 18; 32 | optional bytes move_crc = 19; 33 | optional uint32 consumed_server_angle_changes = 20; 34 | optional int32 cmd_flags = 21; 35 | } 36 | 37 | message CUserCmdBasePB { 38 | optional .CBaseUserCmdPB base = 1; 39 | } 40 | -------------------------------------------------------------------------------- /protobufs/valveextensions.proto: -------------------------------------------------------------------------------- 1 | import "google/protobuf/descriptor.proto"; 2 | 3 | extend .google.protobuf.FieldOptions { 4 | optional bool valve_map_field = 61000 [default = false]; 5 | optional bool valve_map_key = 61001 [default = false]; 6 | optional int32 diff_encode_field = 61002 [default = 0]; 7 | optional bool delta_ignore = 61003 [default = false]; 8 | optional uint32 steamml_max_entries = 61004 [default = 0]; 9 | optional bool steamml_is_timestamp = 61005 [default = false]; 10 | optional uint32 steamlearn_count = 61006 [default = 0]; 11 | } 12 | 13 | extend .google.protobuf.EnumValueOptions { 14 | optional string schema_friendly_name = 1000; 15 | optional string schema_description = 1001; 16 | optional bool schema_suppress_enumerator = 1002; 17 | } 18 | -------------------------------------------------------------------------------- /src/cs2_sdk/entity/cbaseentity.h: -------------------------------------------------------------------------------- 1 | /** 2 | * ============================================================================= 3 | * CS2Fixes 4 | * Copyright (C) 2023 Source2ZE 5 | * ============================================================================= 6 | * 7 | * This program is free software; you can redistribute it and/or modify it under 8 | * the terms of the GNU General Public License, version 3.0, as published by the 9 | * Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 14 | * details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see . 18 | */ 19 | 20 | #pragma once 21 | 22 | #include "../schema.h" 23 | #include "ehandle.h" 24 | 25 | 26 | class Z_CBaseEntity : public CEntityInstance 27 | { 28 | public: 29 | typedef Z_CBaseEntity ThisClass; 30 | static constexpr const char *ThisClassName = "CBaseEntity"; 31 | static constexpr bool IsStruct = false; 32 | }; 33 | -------------------------------------------------------------------------------- /src/cs2_sdk/entity/cbaseplayercontroller.h: -------------------------------------------------------------------------------- 1 | /** 2 | * ============================================================================= 3 | * CS2Fixes 4 | * Copyright (C) 2023 Source2ZE 5 | * ============================================================================= 6 | * 7 | * This program is free software; you can redistribute it and/or modify it under 8 | * the terms of the GNU General Public License, version 3.0, as published by the 9 | * Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 14 | * details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see . 18 | */ 19 | 20 | #pragma once 21 | 22 | #include "ehandle.h" 23 | #include "cbaseentity.h" 24 | 25 | enum class PlayerConnectedState : uint32_t 26 | { 27 | PlayerNeverConnected = 0xFFFFFFFF, 28 | PlayerConnected = 0x0, 29 | PlayerConnecting = 0x1, 30 | PlayerReconnecting = 0x2, 31 | PlayerDisconnecting = 0x3, 32 | PlayerDisconnected = 0x4, 33 | PlayerReserved = 0x5, 34 | }; 35 | 36 | class CBasePlayerController : public Z_CBaseEntity 37 | { 38 | public: 39 | DECLARE_SCHEMA_CLASS(CBasePlayerController); 40 | 41 | SCHEMA_FIELD(uint64, m_steamID) 42 | SCHEMA_FIELD_POINTER(char, m_iszPlayerName) 43 | SCHEMA_FIELD(PlayerConnectedState, m_iConnected) 44 | 45 | const char *GetPlayerName() { return m_iszPlayerName(); } 46 | bool IsConnected() { return m_iConnected() == PlayerConnectedState::PlayerConnected; } 47 | }; -------------------------------------------------------------------------------- /src/cs2_sdk/entity/cbaseplayerpawn.h: -------------------------------------------------------------------------------- 1 | /** 2 | * ============================================================================= 3 | * CS2Fixes 4 | * Copyright (C) 2023 Source2ZE 5 | * ============================================================================= 6 | * 7 | * This program is free software; you can redistribute it and/or modify it under 8 | * the terms of the GNU General Public License, version 3.0, as published by the 9 | * Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 14 | * details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see . 18 | */ 19 | 20 | #pragma once 21 | 22 | #include "cbaseentity.h" 23 | #include "cbasemodelentity.h" 24 | #include "services.h" 25 | 26 | class CBasePlayerPawn : public CBaseModelEntity 27 | { 28 | public: 29 | DECLARE_SCHEMA_CLASS(CBasePlayerPawn); 30 | 31 | SCHEMA_FIELD(CPlayer_MovementServices*, m_pMovementServices) 32 | SCHEMA_FIELD(CPlayer_WeaponServices*, m_pWeaponServices) 33 | SCHEMA_FIELD(CCSPlayer_ItemServices*, m_pItemServices) 34 | SCHEMA_FIELD(CHandle, m_hController) 35 | 36 | void TakeDamage(int iDamage) 37 | { 38 | if (m_iHealth() - iDamage <= 0) 39 | CommitSuicide(false, true); 40 | else 41 | Z_CBaseEntity::TakeDamage(iDamage); 42 | } 43 | 44 | void CommitSuicide(bool bExplode, bool bForce) 45 | { 46 | static int offset = g_GameConfig->GetOffset("CBasePlayerPawn_CommitSuicide"); 47 | CALL_VIRTUAL(void, offset, this, bExplode, bForce); 48 | } 49 | 50 | CBasePlayerController *GetController() { return m_hController.Get(); } 51 | }; -------------------------------------------------------------------------------- /src/cs2_sdk/schema.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * ============================================================================= 3 | * CS2Fixes 4 | * Copyright (C) 2023 Source2ZE 5 | * ============================================================================= 6 | * 7 | * This program is free software; you can redistribute it and/or modify it under 8 | * the terms of the GNU General Public License, version 3.0, as published by the 9 | * Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 14 | * details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see . 18 | */ 19 | 20 | #include "schema.h" 21 | 22 | #include "schemasystem/schemasystem.h" 23 | #include "tier1/utlmap.h" 24 | #include "tier0/memdbgon.h" 25 | #include "../utils/plat.h" 26 | #include "entity/cbaseentity.h" 27 | #include "interfaces.h" 28 | 29 | extern CGlobalVars *gpGlobals; 30 | 31 | using SchemaKeyValueMap_t = CUtlMap; 32 | using SchemaTableMap_t = CUtlMap; 33 | 34 | 35 | static bool IsFieldNetworked(SchemaClassFieldData_t& field) 36 | { 37 | for (int i = 0; i < field.m_nStaticMetadataCount; i++) 38 | { 39 | static auto networkEnabled = hash_32_fnv1a_const("MNetworkEnable"); 40 | if (networkEnabled == hash_32_fnv1a_const(field.m_pStaticMetadata[i].m_pszName)) 41 | return true; 42 | } 43 | 44 | return false; 45 | } 46 | 47 | static bool InitSchemaFieldsForClass(SchemaTableMap_t *tableMap, const char* className, uint32_t classKey) 48 | { 49 | CSchemaSystemTypeScope* pType = Interfaces::g_pSchemaSystem2->FindTypeScopeForModule(MODULE_PREFIX "server" MODULE_EXT); 50 | 51 | if (!pType) 52 | return false; 53 | 54 | SchemaClassInfoData_t* pClassInfo = pType->FindDeclaredClass(className).Get(); 55 | 56 | if (!pClassInfo) 57 | { 58 | SchemaKeyValueMap_t *map = new SchemaKeyValueMap_t(0, 0, DefLessFunc(uint32_t)); 59 | tableMap->Insert(classKey, map); 60 | 61 | Warning("InitSchemaFieldsForClass(): '%s' was not found!\n", className); 62 | return false; 63 | } 64 | 65 | short fieldsSize = pClassInfo->m_nFieldCount; 66 | SchemaClassFieldData_t* pFields = pClassInfo->m_pFields; 67 | 68 | SchemaKeyValueMap_t *keyValueMap = new SchemaKeyValueMap_t(0, 0, DefLessFunc(uint32_t)); 69 | keyValueMap->EnsureCapacity(fieldsSize); 70 | tableMap->Insert(classKey, keyValueMap); 71 | 72 | for (int i = 0; i < fieldsSize; ++i) 73 | { 74 | SchemaClassFieldData_t& field = pFields[i]; 75 | 76 | #ifdef _DEBUG 77 | Message("%s::%s found at -> 0x%X - %llx\n", className, field.m_pszName, field.m_nSingleInheritanceOffset, &field); 78 | #endif 79 | 80 | keyValueMap->Insert(hash_32_fnv1a_const(field.m_pszName), {field.m_nSingleInheritanceOffset, IsFieldNetworked(field)}); 81 | } 82 | 83 | return true; 84 | } 85 | 86 | int16_t schema::FindChainOffset(const char* className) 87 | { 88 | CSchemaSystemTypeScope* pType = Interfaces::g_pSchemaSystem2->FindTypeScopeForModule(MODULE_PREFIX "server" MODULE_EXT); 89 | 90 | if (!pType) 91 | return false; 92 | 93 | SchemaClassInfoData_t* pClassInfo = pType->FindDeclaredClass(className).Get(); 94 | 95 | do 96 | { 97 | SchemaClassFieldData_t* pFields = pClassInfo->m_pFields; 98 | short fieldsSize = pClassInfo->m_nFieldCount; 99 | for (int i = 0; i < fieldsSize; ++i) 100 | { 101 | SchemaClassFieldData_t& field = pFields[i]; 102 | 103 | if (V_strcmp(field.m_pszName, "__m_pChainEntity") == 0) 104 | { 105 | return field.m_nSingleInheritanceOffset; 106 | } 107 | } 108 | } while ((pClassInfo = pClassInfo->m_pBaseClasses->m_pClass) != nullptr); 109 | 110 | return 0; 111 | } 112 | 113 | SchemaKey schema::GetOffset(const char* className, uint32_t classKey, const char* memberName, uint32_t memberKey) 114 | { 115 | static SchemaTableMap_t schemaTableMap(0, 0, DefLessFunc(uint32_t)); 116 | int16_t tableMapIndex = schemaTableMap.Find(classKey); 117 | if (!schemaTableMap.IsValidIndex(tableMapIndex)) 118 | { 119 | if (InitSchemaFieldsForClass(&schemaTableMap, className, classKey)) 120 | return GetOffset(className, classKey, memberName, memberKey); 121 | 122 | return { 0, 0 }; 123 | } 124 | 125 | SchemaKeyValueMap_t *tableMap = schemaTableMap[tableMapIndex]; 126 | int16_t memberIndex = tableMap->Find(memberKey); 127 | if (!tableMap->IsValidIndex(memberIndex)) 128 | { 129 | Warning("schema::GetOffset(): '%s' was not found in '%s'!\n", memberName, className); 130 | return { 0, 0 }; 131 | } 132 | 133 | return tableMap->Element(memberIndex); 134 | } -------------------------------------------------------------------------------- /src/cs2_sdk/schema.h: -------------------------------------------------------------------------------- 1 | /** 2 | * ============================================================================= 3 | * CS2Fixes 4 | * Copyright (C) 2023 Source2ZE 5 | * ============================================================================= 6 | * 7 | * This program is free software; you can redistribute it and/or modify it under 8 | * the terms of the GNU General Public License, version 3.0, as published by the 9 | * Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 14 | * details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see . 18 | */ 19 | 20 | #pragma once 21 | 22 | #include "stdint.h" 23 | 24 | #ifdef _WIN32 25 | #pragma warning(push) 26 | #pragma warning(disable : 4005) 27 | #endif 28 | 29 | #include 30 | 31 | #ifdef _WIN32 32 | #pragma warning(pop) 33 | #endif 34 | 35 | #include "tier0/dbg.h" 36 | #include "const.h" 37 | #include "stdint.h" 38 | #undef schema 39 | 40 | struct SchemaKey 41 | { 42 | int32 offset; 43 | bool networked; 44 | }; 45 | 46 | class Z_CBaseEntity; 47 | 48 | constexpr uint32_t val_32_const = 0x811c9dc5; 49 | constexpr uint32_t prime_32_const = 0x1000193; 50 | constexpr uint64_t val_64_const = 0xcbf29ce484222325; 51 | constexpr uint64_t prime_64_const = 0x100000001b3; 52 | 53 | inline constexpr uint32_t hash_32_fnv1a_const(const char *const str, const uint32_t value = val_32_const) noexcept 54 | { 55 | return (str[0] == '\0') ? value : hash_32_fnv1a_const(&str[1], (value ^ uint32_t(str[0])) * prime_32_const); 56 | } 57 | 58 | inline constexpr uint64_t hash_64_fnv1a_const(const char *const str, const uint64_t value = val_64_const) noexcept 59 | { 60 | return (str[0] == '\0') ? value : hash_64_fnv1a_const(&str[1], (value ^ uint64_t(str[0])) * prime_64_const); 61 | } 62 | 63 | #define SCHEMA_FIELD_OFFSET(type, varName, extra_offset) \ 64 | class varName##_prop \ 65 | { \ 66 | public: \ 67 | std::add_lvalue_reference_t Get() \ 68 | { \ 69 | static constexpr auto datatable_hash = hash_32_fnv1a_const(ThisClassName); \ 70 | static constexpr auto prop_hash = hash_32_fnv1a_const(#varName); \ 71 | \ 72 | static const auto m_key = \ 73 | schema::GetOffset(ThisClassName, datatable_hash, #varName, prop_hash); \ 74 | \ 75 | static const size_t offset = offsetof(ThisClass, varName); \ 76 | ThisClass *pThisClass = (ThisClass *)((byte *)this - offset); \ 77 | \ 78 | return *reinterpret_cast>( \ 79 | (uintptr_t)(pThisClass) + m_key.offset + extra_offset); \ 80 | } \ 81 | void Set(type val) \ 82 | { \ 83 | static constexpr auto datatable_hash = hash_32_fnv1a_const(ThisClassName); \ 84 | static constexpr auto prop_hash = hash_32_fnv1a_const(#varName); \ 85 | \ 86 | static const auto m_key = \ 87 | schema::GetOffset(ThisClassName, datatable_hash, #varName, prop_hash); \ 88 | \ 89 | \ 90 | static const size_t offset = offsetof(ThisClass, varName); \ 91 | ThisClass *pThisClass = (ThisClass *)((byte *)this - offset); \ 92 | \ 93 | *reinterpret_cast>((uintptr_t)(pThisClass) + m_key.offset + extra_offset) = val; \ 94 | } \ 95 | operator std::add_lvalue_reference_t() { return Get(); } \ 96 | std::add_lvalue_reference_t operator ()() { return Get(); } \ 97 | std::add_lvalue_reference_t operator->() { return Get(); } \ 98 | void operator()(type val) { Set(val); } \ 99 | void operator=(type val) { Set(val); } \ 100 | } varName; 101 | 102 | #define SCHEMA_FIELD_POINTER_OFFSET(type, varName, extra_offset) \ 103 | class varName##_prop \ 104 | { \ 105 | public: \ 106 | type *Get() \ 107 | { \ 108 | static constexpr auto datatable_hash = hash_32_fnv1a_const(ThisClassName); \ 109 | static constexpr auto prop_hash = hash_32_fnv1a_const(#varName); \ 110 | \ 111 | static const auto m_key = \ 112 | schema::GetOffset(ThisClassName, datatable_hash, #varName, prop_hash); \ 113 | \ 114 | static const size_t offset = offsetof(ThisClass, varName); \ 115 | ThisClass *pThisClass = (ThisClass *)((byte *)this - offset); \ 116 | \ 117 | return reinterpret_cast>( \ 118 | (uintptr_t)(pThisClass) + m_key.offset + extra_offset); \ 119 | } \ 120 | operator type*() { return Get(); } \ 121 | type* operator ()() { return Get(); } \ 122 | type* operator->() { return Get(); } \ 123 | } varName; 124 | 125 | // Use this when you want the member's value itself 126 | #define SCHEMA_FIELD(type, varName) \ 127 | SCHEMA_FIELD_OFFSET(type, varName, 0) 128 | 129 | // Use this when you want a pointer to a member 130 | #define SCHEMA_FIELD_POINTER(type, varName) \ 131 | SCHEMA_FIELD_POINTER_OFFSET(type, varName, 0) 132 | 133 | namespace schema 134 | { 135 | int16_t FindChainOffset(const char *className); 136 | SchemaKey GetOffset(const char *className, uint32_t classKey, const char *memberName, uint32_t memberKey); 137 | } 138 | 139 | #define DECLARE_SCHEMA_CLASS_BASE(className, isStruct) \ 140 | typedef className ThisClass; \ 141 | static constexpr const char *ThisClassName = #className; \ 142 | static constexpr bool IsStruct = isStruct; 143 | 144 | #define DECLARE_SCHEMA_CLASS(className) DECLARE_SCHEMA_CLASS_BASE(className, false) 145 | 146 | // Use this for classes that can be wholly included within other classes (like CCollisionProperty within CBaseModelEntity) 147 | #define DECLARE_SCHEMA_CLASS_INLINE(className) \ 148 | DECLARE_SCHEMA_CLASS_BASE(className, true) -------------------------------------------------------------------------------- /src/cs2_sdk/serversideclient.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "playerslot.h" 4 | #include "steam/steamclientpublic.h" 5 | #include "utlstring.h" 6 | #include "inetchannel.h" 7 | 8 | class CServerSideClient : public INetworkMessageProcessingPreFilter 9 | { 10 | public: 11 | virtual ~CServerSideClient() = 0; 12 | 13 | INetChannel* GetNetChannel() const { return m_NetChannel; }; 14 | CPlayerSlot GetPlayerSlot() const { return m_nClientSlot; }; 15 | CEntityIndex GetEntityIndex() const { return m_nEntityIndex; }; 16 | CPlayerUserId GetUserID() const { return m_UserID; }; 17 | int GetSignonState() const { return m_nSignonState; } 18 | CSteamID GetClientSteamID() const { return m_SteamID; } 19 | const char* GetClientName() const { return m_Name; }; 20 | bool IsConnected() const { return m_nSignonState >= SIGNONSTATE_CONNECTED; }; 21 | bool IsSpawned() const { return m_nSignonState >= SIGNONSTATE_NEW; }; 22 | bool IsActive() const { return m_nSignonState == SIGNONSTATE_FULL; }; 23 | bool IsFakeClient() const { return m_bFakePlayer; }; 24 | bool IsHLTV() const { return m_bIsHLTV; } 25 | bool IsFullyAuthenticated() { return m_bFullyAuthenticated; } 26 | const netadr_t* GetRemoteAddress() const { return &m_NetAdr0; } 27 | 28 | private: 29 | [[maybe_unused]] void* m_pVT1; // INetworkMessageProcessingPreFilter 30 | [[maybe_unused]] char pad1[0x30]; 31 | #ifdef __linux__ 32 | [[maybe_unused]] char pad2[0x10]; 33 | #endif 34 | CUtlString m_Name; // 64 | 80 35 | CPlayerSlot m_nClientSlot; // 72 | 88 36 | CEntityIndex m_nEntityIndex; // 76 | 92 37 | [[maybe_unused]] char pad3[0x8]; 38 | INetChannel* m_NetChannel; // 88 | 104 39 | [[maybe_unused]] char pad4[0x4]; 40 | int32 m_nSignonState; // 100 | 116 41 | [[maybe_unused]] char pad5[0x38]; 42 | bool m_bFakePlayer; // 160 | 176 43 | [[maybe_unused]] char pad6[0x7]; 44 | CPlayerUserId m_UserID; // 168 | 184 45 | [[maybe_unused]] char pad7[0x1]; 46 | CSteamID m_SteamID; // 171 | 187 47 | [[maybe_unused]] char pad8[0x19]; 48 | netadr_t m_NetAdr0; // 204 | 220 49 | [[maybe_unused]] char pad9[0x14]; 50 | netadr_t m_NetAdr1; // 236 | 252 51 | [[maybe_unused]] char pad10[0x22]; 52 | bool m_bIsHLTV; // 282 | 298 53 | [[maybe_unused]] char pad11[0x19]; 54 | int m_nDeltaTick; // 308 | 324 55 | [[maybe_unused]] char pad12[0x882]; 56 | bool m_bFullyAuthenticated; // 2490 | 2506 57 | }; -------------------------------------------------------------------------------- /src/extension.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * ============================================================================= 3 | * CS2VoiceFix 4 | * Copyright (C) 2024 Poggu 5 | * ============================================================================= 6 | * 7 | * This program is free software; you can redistribute it and/or modify it under 8 | * the terms of the GNU General Public License, version 3.0, as published by the 9 | * Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 14 | * details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see . 18 | */ 19 | 20 | #include 21 | #include "extension.h" 22 | #include 23 | #include "utils/module.h" 24 | #include 25 | #include 26 | #include "interfaces.h" 27 | #include "networkstringtabledefs.h" 28 | #include "../protobufs/generated/netmessages.pb.h" 29 | #include "networksystem/inetworkmessages.h" 30 | #include "cs2_sdk/serversideclient.h" 31 | 32 | #ifdef _WIN32 33 | #define ROOTBIN "/bin/win64/" 34 | #define GAMEBIN "/csgo/bin/win64/" 35 | #else 36 | #define ROOTBIN "/bin/linuxsteamrt64/" 37 | #define GAMEBIN "/csgo/bin/linuxsteamrt64/" 38 | #endif 39 | 40 | #undef max 41 | 42 | CS2VoiceFix g_CS2VoiceFix; 43 | int g_iSendNetMessage; 44 | uint64_t g_randomSeed = 0; 45 | 46 | SH_DECL_HOOK6_void(IServerGameClients, OnClientConnected, SH_NOATTRIB, 0, CPlayerSlot, const char*, uint64, const char*, const char*, bool); 47 | 48 | #ifdef WIN32 49 | // WINDOWS 50 | SH_DECL_MANUALHOOK2(SendNetMessage, 15, 0, 0, bool, CNetMessage*, NetChannelBufType_t); 51 | #else 52 | // LINUX 53 | SH_DECL_MANUALHOOK2(SendNetMessage, 16, 0, 0, bool, CNetMessage*, NetChannelBufType_t); 54 | #endif 55 | 56 | CGameEntitySystem* GameEntitySystem() 57 | { 58 | #ifdef WIN32 59 | static int offset = 88; 60 | #else 61 | static int offset = 80; 62 | #endif 63 | return *reinterpret_cast((uintptr_t)(g_pGameResourceServiceServer)+offset); 64 | } 65 | 66 | // Should only be called within the active game loop (i e map should be loaded and active) 67 | // otherwise that'll be nullptr! 68 | CGlobalVars* GetGameGlobals() 69 | { 70 | INetworkGameServer* server = g_pNetworkServerService->GetIGameServer(); 71 | 72 | if (!server) 73 | return nullptr; 74 | 75 | return g_pNetworkServerService->GetIGameServer()->GetGlobals(); 76 | } 77 | 78 | void SetupHook(CS2VoiceFix* plugin) 79 | { 80 | CModule engineModule(ROOTBIN, "engine2"); 81 | 82 | auto serverSideClientVTable = engineModule.FindVirtualTable("CServerSideClient"); 83 | g_iSendNetMessage = SH_ADD_MANUALDVPHOOK(SendNetMessage, serverSideClientVTable, SH_MEMBER(plugin, &CS2VoiceFix::Hook_SendNetMessage), false); 84 | } 85 | 86 | PLUGIN_EXPOSE(CS2VoiceFix, g_CS2VoiceFix); 87 | bool CS2VoiceFix::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late) 88 | { 89 | PLUGIN_SAVEVARS(); 90 | 91 | GET_V_IFACE_CURRENT(GetEngineFactory, Interfaces::engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER); 92 | GET_V_IFACE_CURRENT(GetEngineFactory, Interfaces::icvar, ICvar, CVAR_INTERFACE_VERSION); 93 | GET_V_IFACE_ANY(GetServerFactory, Interfaces::server, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL); 94 | GET_V_IFACE_ANY(GetServerFactory, Interfaces::gameclients, IServerGameClients, INTERFACEVERSION_SERVERGAMECLIENTS); 95 | GET_V_IFACE_ANY(GetEngineFactory, g_pNetworkServerService, INetworkServerService, NETWORKSERVERSERVICE_INTERFACE_VERSION); 96 | GET_V_IFACE_CURRENT(GetEngineFactory, g_pGameResourceServiceServer, IGameResourceService, GAMERESOURCESERVICESERVER_INTERFACE_VERSION); 97 | GET_V_IFACE_ANY(GetEngineFactory, Interfaces::networkMessages, INetworkMessages, NETWORKMESSAGES_INTERFACE_VERSION); 98 | g_SMAPI->AddListener( this, this ); 99 | 100 | SH_ADD_HOOK(IServerGameClients, OnClientConnected, Interfaces::gameclients, SH_MEMBER(this, &CS2VoiceFix::Hook_OnClientConnected), false); 101 | 102 | SetupHook(this); 103 | 104 | g_pCVar = Interfaces::icvar; 105 | ConVar_Register( FCVAR_RELEASE | FCVAR_GAMEDLL ); 106 | 107 | srand(time(NULL)); 108 | // just random numbers to create bogus "steam ids" in voice data 109 | g_randomSeed = 800 + rand() % ((0x00FFFFFFFFFFFFFF) - 800); 110 | 111 | return true; 112 | } 113 | 114 | uint64_t g_playerIds[64]; 115 | 116 | bool CS2VoiceFix::Hook_SendNetMessage(CNetMessage* pData, NetChannelBufType_t bufType) 117 | { 118 | CServerSideClient* client = META_IFACEPTR(CServerSideClient); 119 | 120 | NetMessageInfo_t* info = pData->GetNetMessage()->GetNetMessageInfo(); 121 | if (info) 122 | { 123 | if (info->m_MessageId == SVC_Messages::svc_VoiceData) 124 | { 125 | auto msg = pData->ToPB(); 126 | 127 | auto playerSlot = msg->client(); 128 | //ConMsg("%i -> %i (%llu)\n", playerSlot, client->GetPlayerSlot().Get(), g_playerIds[client->GetPlayerSlot().Get()] + playerSlot); 129 | 130 | msg->set_xuid(g_playerIds[client->GetPlayerSlot().Get()] + playerSlot); 131 | } 132 | } 133 | 134 | 135 | RETURN_META_VALUE(MRES_IGNORED, true); 136 | } 137 | 138 | void CS2VoiceFix::Hook_OnClientConnected(CPlayerSlot slot, const char* pszName, uint64 xuid, const char* pszNetworkID, const char* pszAddress, bool bFakePlayer) 139 | { 140 | g_playerIds[slot.Get()] = g_randomSeed; 141 | g_randomSeed += 66; 142 | } 143 | 144 | bool CS2VoiceFix::Unload(char *error, size_t maxlen) 145 | { 146 | SH_REMOVE_HOOK(IServerGameClients, OnClientConnected, Interfaces::gameclients, SH_MEMBER(this, &CS2VoiceFix::Hook_OnClientConnected), false); 147 | SH_REMOVE_HOOK_ID(g_iSendNetMessage); 148 | return true; 149 | } 150 | 151 | void CS2VoiceFix::AllPluginsLoaded() 152 | { 153 | } 154 | 155 | void CS2VoiceFix::OnLevelInit( char const *pMapName, 156 | char const *pMapEntities, 157 | char const *pOldLevel, 158 | char const *pLandmarkName, 159 | bool loadGame, 160 | bool background ) 161 | { 162 | } 163 | 164 | void CS2VoiceFix::OnLevelShutdown() 165 | { 166 | } 167 | 168 | bool CS2VoiceFix::Pause(char *error, size_t maxlen) 169 | { 170 | return true; 171 | } 172 | 173 | bool CS2VoiceFix::Unpause(char *error, size_t maxlen) 174 | { 175 | return true; 176 | } 177 | 178 | const char *CS2VoiceFix::GetLicense() 179 | { 180 | return "GPLv3"; 181 | } 182 | 183 | const char *CS2VoiceFix::GetVersion() 184 | { 185 | return "1.0.1"; 186 | } 187 | 188 | const char *CS2VoiceFix::GetDate() 189 | { 190 | return __DATE__; 191 | } 192 | 193 | const char *CS2VoiceFix::GetLogTag() 194 | { 195 | return "CS2VoiceFix"; 196 | } 197 | 198 | const char *CS2VoiceFix::GetAuthor() 199 | { 200 | return "Poggu"; 201 | } 202 | 203 | const char *CS2VoiceFix::GetDescription() 204 | { 205 | return "Fixes voice chat breaking on addon unload"; 206 | } 207 | 208 | const char *CS2VoiceFix::GetName() 209 | { 210 | return "CS2VoiceFix"; 211 | } 212 | 213 | const char *CS2VoiceFix::GetURL() 214 | { 215 | return "https://poggu.me"; 216 | } 217 | -------------------------------------------------------------------------------- /src/extension.h: -------------------------------------------------------------------------------- 1 | /** 2 | * ============================================================================= 3 | * CS2VoiceFix 4 | * Copyright (C) 2024 Poggu 5 | * ============================================================================= 6 | * 7 | * This program is free software; you can redistribute it and/or modify it under 8 | * the terms of the GNU General Public License, version 3.0, as published by the 9 | * Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 14 | * details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see . 18 | */ 19 | 20 | #ifndef _INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_ 21 | #define _INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_ 22 | 23 | #include 24 | #include 25 | #include 26 | #include "networksystem/inetworkserializer.h" 27 | 28 | class CS2VoiceFix : public ISmmPlugin, public IMetamodListener 29 | { 30 | public: 31 | bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late); 32 | bool Unload(char *error, size_t maxlen); 33 | bool Pause(char *error, size_t maxlen); 34 | bool Unpause(char *error, size_t maxlen); 35 | void AllPluginsLoaded(); 36 | public: //hooks 37 | bool Hook_SendNetMessage(CNetMessage* pData, NetChannelBufType_t bufType); 38 | void Hook_OnClientConnected(CPlayerSlot slot, const char* pszName, uint64 xuid, const char* pszNetworkID, const char* pszAddress, bool bFakePlayer); 39 | void OnLevelInit( char const *pMapName, 40 | char const *pMapEntities, 41 | char const *pOldLevel, 42 | char const *pLandmarkName, 43 | bool loadGame, 44 | bool background ); 45 | void OnLevelShutdown(); 46 | public: 47 | const char *GetAuthor(); 48 | const char *GetName(); 49 | const char *GetDescription(); 50 | const char *GetURL(); 51 | const char *GetLicense(); 52 | const char *GetVersion(); 53 | const char *GetDate(); 54 | const char *GetLogTag(); 55 | }; 56 | 57 | extern CS2VoiceFix g_CS2VoiceFix; 58 | 59 | PLUGIN_GLOBALVARS(); 60 | 61 | #endif //_INCLUDE_METAMOD_SOURCE_STUB_PLUGIN_H_ 62 | -------------------------------------------------------------------------------- /src/interfaces.h: -------------------------------------------------------------------------------- 1 | #include "eiface.h" 2 | 3 | class CSchemaSystem; 4 | class IGameEventManager2; 5 | class INetworkStringTableContainer; 6 | class IGameEventSystem; 7 | class INetworkMessages; 8 | 9 | namespace Interfaces 10 | { 11 | 12 | inline IServerGameDLL* server = NULL; 13 | inline IServerGameClients* gameclients = NULL; 14 | inline IVEngineServer* engine = NULL; 15 | inline IGameEventManager2* gameevents = NULL; 16 | inline ICvar* icvar = NULL; 17 | inline CSchemaSystem* g_pSchemaSystem2 = NULL; 18 | inline INetworkStringTableContainer* networkStringTableContainerServer = NULL; 19 | inline IGameEventSystem* gameEventSystem = NULL; 20 | inline INetworkMessages* networkMessages = NULL; 21 | 22 | } // namespace Interfaces -------------------------------------------------------------------------------- /src/network_connection.pb.h: -------------------------------------------------------------------------------- 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! 2 | // source: network_connection.proto 3 | 4 | #ifndef GOOGLE_PROTOBUF_INCLUDED_network_5fconnection_2eproto 5 | #define GOOGLE_PROTOBUF_INCLUDED_network_5fconnection_2eproto 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | #if PROTOBUF_VERSION < 3021000 12 | #error This file was generated by a newer version of protoc which is 13 | #error incompatible with your Protocol Buffer headers. Please update 14 | #error your headers. 15 | #endif 16 | #if 3021008 < PROTOBUF_MIN_PROTOC_VERSION 17 | #error This file was generated by an older version of protoc which is 18 | #error incompatible with your Protocol Buffer headers. Please 19 | #error regenerate this file with a newer version of protoc. 20 | #endif 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include // IWYU pragma: export 30 | #include // IWYU pragma: export 31 | #include 32 | #include 33 | // @@protoc_insertion_point(includes) 34 | #include 35 | #define PROTOBUF_INTERNAL_EXPORT_network_5fconnection_2eproto 36 | PROTOBUF_NAMESPACE_OPEN 37 | namespace internal { 38 | class AnyMetadata; 39 | } // namespace internal 40 | PROTOBUF_NAMESPACE_CLOSE 41 | 42 | // Internal implementation detail -- do not use these members. 43 | struct TableStruct_network_5fconnection_2eproto { 44 | static const uint32_t offsets[]; 45 | }; 46 | extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_network_5fconnection_2eproto; 47 | PROTOBUF_NAMESPACE_OPEN 48 | PROTOBUF_NAMESPACE_CLOSE 49 | 50 | enum ENetworkDisconnectionReason : int { 51 | NETWORK_DISCONNECT_INVALID = 0, 52 | NETWORK_DISCONNECT_SHUTDOWN = 1, 53 | NETWORK_DISCONNECT_DISCONNECT_BY_USER = 2, 54 | NETWORK_DISCONNECT_DISCONNECT_BY_SERVER = 3, 55 | NETWORK_DISCONNECT_LOST = 4, 56 | NETWORK_DISCONNECT_OVERFLOW = 5, 57 | NETWORK_DISCONNECT_STEAM_BANNED = 6, 58 | NETWORK_DISCONNECT_STEAM_INUSE = 7, 59 | NETWORK_DISCONNECT_STEAM_TICKET = 8, 60 | NETWORK_DISCONNECT_STEAM_LOGON = 9, 61 | NETWORK_DISCONNECT_STEAM_AUTHCANCELLED = 10, 62 | NETWORK_DISCONNECT_STEAM_AUTHALREADYUSED = 11, 63 | NETWORK_DISCONNECT_STEAM_AUTHINVALID = 12, 64 | NETWORK_DISCONNECT_STEAM_VACBANSTATE = 13, 65 | NETWORK_DISCONNECT_STEAM_LOGGED_IN_ELSEWHERE = 14, 66 | NETWORK_DISCONNECT_STEAM_VAC_CHECK_TIMEDOUT = 15, 67 | NETWORK_DISCONNECT_STEAM_DROPPED = 16, 68 | NETWORK_DISCONNECT_STEAM_OWNERSHIP = 17, 69 | NETWORK_DISCONNECT_SERVERINFO_OVERFLOW = 18, 70 | NETWORK_DISCONNECT_TICKMSG_OVERFLOW = 19, 71 | NETWORK_DISCONNECT_STRINGTABLEMSG_OVERFLOW = 20, 72 | NETWORK_DISCONNECT_DELTAENTMSG_OVERFLOW = 21, 73 | NETWORK_DISCONNECT_TEMPENTMSG_OVERFLOW = 22, 74 | NETWORK_DISCONNECT_SOUNDSMSG_OVERFLOW = 23, 75 | NETWORK_DISCONNECT_SNAPSHOTOVERFLOW = 24, 76 | NETWORK_DISCONNECT_SNAPSHOTERROR = 25, 77 | NETWORK_DISCONNECT_RELIABLEOVERFLOW = 26, 78 | NETWORK_DISCONNECT_BADDELTATICK = 27, 79 | NETWORK_DISCONNECT_NOMORESPLITS = 28, 80 | NETWORK_DISCONNECT_TIMEDOUT = 29, 81 | NETWORK_DISCONNECT_DISCONNECTED = 30, 82 | NETWORK_DISCONNECT_LEAVINGSPLIT = 31, 83 | NETWORK_DISCONNECT_DIFFERENTCLASSTABLES = 32, 84 | NETWORK_DISCONNECT_BADRELAYPASSWORD = 33, 85 | NETWORK_DISCONNECT_BADSPECTATORPASSWORD = 34, 86 | NETWORK_DISCONNECT_HLTVRESTRICTED = 35, 87 | NETWORK_DISCONNECT_NOSPECTATORS = 36, 88 | NETWORK_DISCONNECT_HLTVUNAVAILABLE = 37, 89 | NETWORK_DISCONNECT_HLTVSTOP = 38, 90 | NETWORK_DISCONNECT_KICKED = 39, 91 | NETWORK_DISCONNECT_BANADDED = 40, 92 | NETWORK_DISCONNECT_KICKBANADDED = 41, 93 | NETWORK_DISCONNECT_HLTVDIRECT = 42, 94 | NETWORK_DISCONNECT_PURESERVER_CLIENTEXTRA = 43, 95 | NETWORK_DISCONNECT_PURESERVER_MISMATCH = 44, 96 | NETWORK_DISCONNECT_USERCMD = 45, 97 | NETWORK_DISCONNECT_REJECTED_BY_GAME = 46, 98 | NETWORK_DISCONNECT_MESSAGE_PARSE_ERROR = 47, 99 | NETWORK_DISCONNECT_INVALID_MESSAGE_ERROR = 48, 100 | NETWORK_DISCONNECT_BAD_SERVER_PASSWORD = 49, 101 | NETWORK_DISCONNECT_DIRECT_CONNECT_RESERVATION = 50, 102 | NETWORK_DISCONNECT_CONNECTION_FAILURE = 51, 103 | NETWORK_DISCONNECT_NO_PEER_GROUP_HANDLERS = 52, 104 | NETWORK_DISCONNECT_RECONNECTION = 53, 105 | NETWORK_DISCONNECT_LOOPSHUTDOWN = 54, 106 | NETWORK_DISCONNECT_LOOPDEACTIVATE = 55, 107 | NETWORK_DISCONNECT_HOST_ENDGAME = 56, 108 | NETWORK_DISCONNECT_LOOP_LEVELLOAD_ACTIVATE = 57, 109 | NETWORK_DISCONNECT_CREATE_SERVER_FAILED = 58, 110 | NETWORK_DISCONNECT_EXITING = 59, 111 | NETWORK_DISCONNECT_REQUEST_HOSTSTATE_IDLE = 60, 112 | NETWORK_DISCONNECT_REQUEST_HOSTSTATE_HLTVRELAY = 61, 113 | NETWORK_DISCONNECT_CLIENT_CONSISTENCY_FAIL = 62, 114 | NETWORK_DISCONNECT_CLIENT_UNABLE_TO_CRC_MAP = 63, 115 | NETWORK_DISCONNECT_CLIENT_NO_MAP = 64, 116 | NETWORK_DISCONNECT_CLIENT_DIFFERENT_MAP = 65, 117 | NETWORK_DISCONNECT_SERVER_REQUIRES_STEAM = 66, 118 | NETWORK_DISCONNECT_STEAM_DENY_MISC = 67, 119 | NETWORK_DISCONNECT_STEAM_DENY_BAD_ANTI_CHEAT = 68, 120 | NETWORK_DISCONNECT_SERVER_SHUTDOWN = 69, 121 | NETWORK_DISCONNECT_REPLAY_INCOMPATIBLE = 71, 122 | NETWORK_DISCONNECT_CONNECT_REQUEST_TIMEDOUT = 72, 123 | NETWORK_DISCONNECT_SERVER_INCOMPATIBLE = 73, 124 | NETWORK_DISCONNECT_LOCALPROBLEM_MANYRELAYS = 74, 125 | NETWORK_DISCONNECT_LOCALPROBLEM_HOSTEDSERVERPRIMARYRELAY = 75, 126 | NETWORK_DISCONNECT_LOCALPROBLEM_NETWORKCONFIG = 76, 127 | NETWORK_DISCONNECT_LOCALPROBLEM_OTHER = 77, 128 | NETWORK_DISCONNECT_REMOTE_TIMEOUT = 79, 129 | NETWORK_DISCONNECT_REMOTE_TIMEOUT_CONNECTING = 80, 130 | NETWORK_DISCONNECT_REMOTE_OTHER = 81, 131 | NETWORK_DISCONNECT_REMOTE_BADCRYPT = 82, 132 | NETWORK_DISCONNECT_REMOTE_CERTNOTTRUSTED = 83, 133 | NETWORK_DISCONNECT_UNUSUAL = 84, 134 | NETWORK_DISCONNECT_INTERNAL_ERROR = 85, 135 | NETWORK_DISCONNECT_REJECT_BADCHALLENGE = 128, 136 | NETWORK_DISCONNECT_REJECT_NOLOBBY = 129, 137 | NETWORK_DISCONNECT_REJECT_BACKGROUND_MAP = 130, 138 | NETWORK_DISCONNECT_REJECT_SINGLE_PLAYER = 131, 139 | NETWORK_DISCONNECT_REJECT_HIDDEN_GAME = 132, 140 | NETWORK_DISCONNECT_REJECT_LANRESTRICT = 133, 141 | NETWORK_DISCONNECT_REJECT_BADPASSWORD = 134, 142 | NETWORK_DISCONNECT_REJECT_SERVERFULL = 135, 143 | NETWORK_DISCONNECT_REJECT_INVALIDRESERVATION = 136, 144 | NETWORK_DISCONNECT_REJECT_FAILEDCHANNEL = 137, 145 | NETWORK_DISCONNECT_REJECT_CONNECT_FROM_LOBBY = 138, 146 | NETWORK_DISCONNECT_REJECT_RESERVED_FOR_LOBBY = 139, 147 | NETWORK_DISCONNECT_REJECT_INVALIDKEYLENGTH = 140, 148 | NETWORK_DISCONNECT_REJECT_OLDPROTOCOL = 141, 149 | NETWORK_DISCONNECT_REJECT_NEWPROTOCOL = 142, 150 | NETWORK_DISCONNECT_REJECT_INVALIDCONNECTION = 143, 151 | NETWORK_DISCONNECT_REJECT_INVALIDCERTLEN = 144, 152 | NETWORK_DISCONNECT_REJECT_INVALIDSTEAMCERTLEN = 145, 153 | NETWORK_DISCONNECT_REJECT_STEAM = 146, 154 | NETWORK_DISCONNECT_REJECT_SERVERAUTHDISABLED = 147, 155 | NETWORK_DISCONNECT_REJECT_SERVERCDKEYAUTHINVALID = 148, 156 | NETWORK_DISCONNECT_REJECT_BANNED = 149, 157 | NETWORK_DISCONNECT_KICKED_TEAMKILLING = 150, 158 | NETWORK_DISCONNECT_KICKED_TK_START = 151, 159 | NETWORK_DISCONNECT_KICKED_UNTRUSTEDACCOUNT = 152, 160 | NETWORK_DISCONNECT_KICKED_CONVICTEDACCOUNT = 153, 161 | NETWORK_DISCONNECT_KICKED_COMPETITIVECOOLDOWN = 154, 162 | NETWORK_DISCONNECT_KICKED_TEAMHURTING = 155, 163 | NETWORK_DISCONNECT_KICKED_HOSTAGEKILLING = 156, 164 | NETWORK_DISCONNECT_KICKED_VOTEDOFF = 157, 165 | NETWORK_DISCONNECT_KICKED_IDLE = 158, 166 | NETWORK_DISCONNECT_KICKED_SUICIDE = 159, 167 | NETWORK_DISCONNECT_KICKED_NOSTEAMLOGIN = 160, 168 | NETWORK_DISCONNECT_KICKED_NOSTEAMTICKET = 161 169 | }; 170 | bool ENetworkDisconnectionReason_IsValid(int value); 171 | constexpr ENetworkDisconnectionReason ENetworkDisconnectionReason_MIN = NETWORK_DISCONNECT_INVALID; 172 | constexpr ENetworkDisconnectionReason ENetworkDisconnectionReason_MAX = NETWORK_DISCONNECT_KICKED_NOSTEAMTICKET; 173 | constexpr int ENetworkDisconnectionReason_ARRAYSIZE = ENetworkDisconnectionReason_MAX + 1; 174 | 175 | const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ENetworkDisconnectionReason_descriptor(); 176 | template 177 | inline const std::string& ENetworkDisconnectionReason_Name(T enum_t_value) { 178 | static_assert(::std::is_same::value || 179 | ::std::is_integral::value, 180 | "Incorrect type passed to function ENetworkDisconnectionReason_Name."); 181 | return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( 182 | ENetworkDisconnectionReason_descriptor(), enum_t_value); 183 | } 184 | inline bool ENetworkDisconnectionReason_Parse( 185 | ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ENetworkDisconnectionReason* value) { 186 | return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( 187 | ENetworkDisconnectionReason_descriptor(), name, value); 188 | } 189 | // =================================================================== 190 | 191 | 192 | // =================================================================== 193 | 194 | static const int kNetworkConnectionTokenFieldNumber = 50500; 195 | extern ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::PROTOBUF_NAMESPACE_ID::EnumValueOptions, 196 | ::PROTOBUF_NAMESPACE_ID::internal::StringTypeTraits, 9, false > 197 | network_connection_token; 198 | 199 | // =================================================================== 200 | 201 | #ifdef __GNUC__ 202 | #pragma GCC diagnostic push 203 | #pragma GCC diagnostic ignored "-Wstrict-aliasing" 204 | #endif // __GNUC__ 205 | #ifdef __GNUC__ 206 | #pragma GCC diagnostic pop 207 | #endif // __GNUC__ 208 | 209 | // @@protoc_insertion_point(namespace_scope) 210 | 211 | 212 | PROTOBUF_NAMESPACE_OPEN 213 | 214 | template <> struct is_proto_enum< ::ENetworkDisconnectionReason> : ::std::true_type {}; 215 | template <> 216 | inline const EnumDescriptor* GetEnumDescriptor< ::ENetworkDisconnectionReason>() { 217 | return ::ENetworkDisconnectionReason_descriptor(); 218 | } 219 | 220 | PROTOBUF_NAMESPACE_CLOSE 221 | 222 | // @@protoc_insertion_point(global_scope) 223 | 224 | #include 225 | #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_network_5fconnection_2eproto 226 | -------------------------------------------------------------------------------- /src/utils/module.h: -------------------------------------------------------------------------------- 1 | /** 2 | * ============================================================================= 3 | * CS2Fixes 4 | * Copyright (C) 2023-2024 Source2ZE 5 | * ============================================================================= 6 | * 7 | * This program is free software; you can redistribute it and/or modify it under 8 | * the terms of the GNU General Public License, version 3.0, as published by the 9 | * Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 14 | * details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see . 18 | */ 19 | 20 | #pragma once 21 | #include "dbg.h" 22 | #include "interface.h" 23 | #include "strtools.h" 24 | #include "plat.h" 25 | 26 | #include 27 | #include 28 | 29 | 30 | #ifdef _WIN32 31 | #include 32 | #endif 33 | 34 | 35 | #ifdef _WIN32 36 | #define ROOTBIN "/bin/win64/" 37 | #define GAMEBIN "/csgo/bin/win64/" 38 | #else 39 | #define ROOTBIN "/bin/linuxsteamrt64/" 40 | #define GAMEBIN "/csgo/bin/linuxsteamrt64/" 41 | #endif 42 | 43 | enum SigError 44 | { 45 | SIG_OK, 46 | SIG_NOT_FOUND, 47 | SIG_FOUND_MULTIPLE, 48 | }; 49 | 50 | // equivalent to FindSignature, but allows for multiple signatures to be found and iterated over 51 | class SignatureIterator 52 | { 53 | public: 54 | SignatureIterator(void* pBase, size_t iSize, const byte* pSignature, size_t iSigLength) : 55 | m_pBase((byte*)pBase), m_iSize(iSize), m_pSignature(pSignature), m_iSigLength(iSigLength) 56 | { 57 | m_pCurrent = m_pBase; 58 | } 59 | 60 | void* FindNext(bool allowWildcard) 61 | { 62 | for (size_t i = 0; i < m_iSize; i++) 63 | { 64 | size_t Matches = 0; 65 | while (*(m_pCurrent + i + Matches) == m_pSignature[Matches] || (allowWildcard && m_pSignature[Matches] == '\x2A')) 66 | { 67 | Matches++; 68 | if (Matches == m_iSigLength) 69 | { 70 | m_pCurrent += i + 1; 71 | return m_pCurrent - 1; 72 | } 73 | } 74 | } 75 | 76 | return nullptr; 77 | } 78 | private: 79 | byte* m_pBase; 80 | size_t m_iSize; 81 | const byte* m_pSignature; 82 | size_t m_iSigLength; 83 | byte* m_pCurrent; 84 | }; 85 | 86 | class CModule 87 | { 88 | public: 89 | CModule(const char* path, const char* module) : 90 | m_pszModule(module), m_pszPath(path) 91 | { 92 | char szModule[MAX_PATH]; 93 | 94 | V_snprintf(szModule, MAX_PATH, "%s%s%s%s%s", Plat_GetGameDirectory(), path, MODULE_PREFIX, m_pszModule, MODULE_EXT); 95 | 96 | m_hModule = dlmount(szModule); 97 | 98 | if (!m_hModule) 99 | Error("Could not find %s\n", szModule); 100 | 101 | #ifdef _WIN32 102 | MODULEINFO m_hModuleInfo; 103 | GetModuleInformation(GetCurrentProcess(), m_hModule, &m_hModuleInfo, sizeof(m_hModuleInfo)); 104 | 105 | m_base = (void*)m_hModuleInfo.lpBaseOfDll; 106 | m_size = m_hModuleInfo.SizeOfImage; 107 | InitializeSections(); 108 | #else 109 | if (int e = GetModuleInformation(m_hModule, &m_base, &m_size, m_sections)) 110 | Error("Failed to get module info for %s, error %d\n", szModule, e); 111 | #endif 112 | 113 | for (auto& section : m_sections) 114 | printf("Section %s base: 0x%p | size: %d\n", section.m_szName.c_str(), section.m_pBase, section.m_iSize); 115 | 116 | printf("Initialized module %s base: 0x%p | size: %d\n", m_pszModule, m_base, m_size); 117 | } 118 | 119 | ~CModule() 120 | { 121 | dlclose(m_hModule); 122 | } 123 | 124 | void* FindSignature(const byte* pData, size_t iSigLength, int& error) 125 | { 126 | unsigned char* pMemory; 127 | void* return_addr = nullptr; 128 | error = 0; 129 | 130 | pMemory = (byte*)m_base; 131 | 132 | for (size_t i = 0; i < m_size; i++) 133 | { 134 | size_t Matches = 0; 135 | while (*(pMemory + i + Matches) == pData[Matches] || pData[Matches] == '\x2A') 136 | { 137 | Matches++; 138 | if (Matches == iSigLength) 139 | { 140 | if (return_addr) 141 | { 142 | error = SIG_FOUND_MULTIPLE; 143 | return return_addr; 144 | } 145 | 146 | return_addr = (void*)(pMemory + i); 147 | break; 148 | } 149 | } 150 | } 151 | 152 | if (!return_addr) 153 | error = SIG_NOT_FOUND; 154 | 155 | return return_addr; 156 | } 157 | 158 | void* FindInterface(const char* name) 159 | { 160 | CreateInterfaceFn fn = (CreateInterfaceFn)dlsym(m_hModule, "CreateInterface"); 161 | 162 | if (!fn) 163 | Error("Could not find CreateInterface in %s\n", m_pszModule); 164 | 165 | void* pInterface = fn(name, nullptr); 166 | 167 | if (!pInterface) 168 | Error("Could not find %s in %s\n", name, m_pszModule); 169 | 170 | printf("Found interface %s in %s\n", name, m_pszModule); 171 | 172 | return pInterface; 173 | } 174 | 175 | Section* GetSection(const std::string_view name) 176 | { 177 | for (auto& section : m_sections) 178 | { 179 | if (section.m_szName == name) 180 | return §ion; 181 | } 182 | 183 | return nullptr; 184 | } 185 | #ifdef _WIN32 186 | void InitializeSections(); 187 | #endif 188 | void* FindVirtualTable(const std::string& name); 189 | public: 190 | const char* m_pszModule; 191 | const char* m_pszPath; 192 | HINSTANCE m_hModule; 193 | void* m_base; 194 | size_t m_size; 195 | std::vector
m_sections; 196 | }; -------------------------------------------------------------------------------- /src/utils/plat.h: -------------------------------------------------------------------------------- 1 | /** 2 | * ============================================================================= 3 | * CS2Fixes 4 | * Copyright (C) 2023-2024 Source2ZE 5 | * ============================================================================= 6 | * 7 | * This program is free software; you can redistribute it and/or modify it under 8 | * the terms of the GNU General Public License, version 3.0, as published by the 9 | * Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 14 | * details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see . 18 | */ 19 | 20 | #pragma once 21 | #include 22 | #include 23 | #include 24 | #include "metamod_oslink.h" 25 | 26 | struct Section 27 | { 28 | std::string m_szName; 29 | void* m_pBase; 30 | size_t m_iSize; 31 | }; 32 | 33 | #if defined(_WIN32) 34 | #define FASTCALL __fastcall 35 | #define THISCALL __thiscall 36 | #else 37 | #define FASTCALL 38 | #define THISCALL 39 | #define strtok_s strtok_r 40 | #endif 41 | 42 | struct Module 43 | { 44 | #ifndef _WIN32 45 | void* pHandle; 46 | #endif 47 | uint8_t* pBase; 48 | unsigned int nSize; 49 | }; 50 | 51 | #ifndef _WIN32 52 | int GetModuleInformation(HINSTANCE module, void** base, size_t* length, std::vector
& m_sections); 53 | #endif 54 | 55 | #ifdef _WIN32 56 | #define MODULE_PREFIX "" 57 | #define MODULE_EXT ".dll" 58 | #else 59 | #define MODULE_PREFIX "lib" 60 | #define MODULE_EXT ".so" 61 | #endif 62 | 63 | void Plat_WriteMemory(void* pPatchAddress, uint8_t* pPatch, int iPatchSize); -------------------------------------------------------------------------------- /src/utils/plat_unix.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * ============================================================================= 3 | * CS2Fixes 4 | * Copyright (C) 2023-2024 Source2ZE 5 | * ============================================================================= 6 | * 7 | * This program is free software; you can redistribute it and/or modify it under 8 | * the terms of the GNU General Public License, version 3.0, as published by the 9 | * Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 14 | * details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see . 18 | */ 19 | 20 | #ifdef __linux__ 21 | #include "module.h" 22 | #include "plat.h" 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include "sys/mman.h" 28 | #include 29 | #include 30 | #include 31 | #include "dbg.h" 32 | #include 33 | #include 34 | #include 35 | 36 | #include "tier0/memdbgon.h" 37 | 38 | #define PAGE_SIZE 4096 39 | #define PAGE_ALIGN_UP(x) ((x + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)) 40 | 41 | struct ModuleInfo 42 | { 43 | const char* path; // in 44 | uint8_t* base; // out 45 | uint size; // out 46 | }; 47 | 48 | // https://github.com/alliedmodders/sourcemod/blob/master/core/logic/MemoryUtils.cpp#L502-L587 49 | // https://github.com/komashchenko/DynLibUtils/blob/5eb95475170becfcc64fd5d32d14ec2b76dcb6d4/module_linux.cpp#L95 50 | int GetModuleInformation(HINSTANCE hModule, void** base, size_t* length, std::vector
& m_sections) 51 | { 52 | 53 | link_map* lmap; 54 | if (dlinfo(hModule, RTLD_DI_LINKMAP, &lmap) != 0) 55 | { 56 | dlclose(hModule); 57 | return 1; 58 | } 59 | 60 | int fd = open(lmap->l_name, O_RDONLY); 61 | if (fd == -1) 62 | { 63 | dlclose(hModule); 64 | return 2; 65 | } 66 | 67 | struct stat st; 68 | if (fstat(fd, &st) == 0) 69 | { 70 | void* map = mmap(nullptr, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); 71 | if (map != MAP_FAILED) 72 | { 73 | ElfW(Ehdr)* ehdr = static_cast(map); 74 | ElfW(Shdr)* shdrs = reinterpret_cast(reinterpret_cast(ehdr) + ehdr->e_shoff); 75 | const char* strTab = reinterpret_cast(reinterpret_cast(ehdr) + shdrs[ehdr->e_shstrndx].sh_offset); 76 | 77 | for (auto i = 0; i < ehdr->e_phnum; ++i) 78 | { 79 | ElfW(Phdr)* phdr = reinterpret_cast(reinterpret_cast(ehdr) + ehdr->e_phoff + i * ehdr->e_phentsize); 80 | if (phdr->p_type == PT_LOAD && phdr->p_flags & PF_X) 81 | { 82 | *base = reinterpret_cast(lmap->l_addr + phdr->p_vaddr); 83 | *length = phdr->p_filesz; 84 | break; 85 | } 86 | } 87 | 88 | for (auto i = 0; i < ehdr->e_shnum; ++i) 89 | { 90 | ElfW(Shdr)* shdr = reinterpret_cast(reinterpret_cast(shdrs) + i * ehdr->e_shentsize); 91 | if (*(strTab + shdr->sh_name) == '\0') 92 | continue; 93 | 94 | Section section; 95 | section.m_szName = strTab + shdr->sh_name; 96 | section.m_pBase = reinterpret_cast(lmap->l_addr + shdr->sh_addr); 97 | section.m_iSize = shdr->sh_size; 98 | m_sections.push_back(section); 99 | } 100 | 101 | munmap(map, st.st_size); 102 | } 103 | } 104 | 105 | close(fd); 106 | 107 | return 0; 108 | } 109 | 110 | static int parse_prot(const char* s) 111 | { 112 | int prot = 0; 113 | 114 | for (; *s; s++) 115 | { 116 | switch (*s) 117 | { 118 | case '-': 119 | break; 120 | case 'r': 121 | prot |= PROT_READ; 122 | break; 123 | case 'w': 124 | prot |= PROT_WRITE; 125 | break; 126 | case 'x': 127 | prot |= PROT_EXEC; 128 | break; 129 | case 's': 130 | break; 131 | case 'p': 132 | break; 133 | default: 134 | break; 135 | } 136 | } 137 | 138 | return prot; 139 | } 140 | 141 | static int get_prot(void* pAddr, size_t nSize) 142 | { 143 | FILE* f = fopen("/proc/self/maps", "r"); 144 | 145 | uintptr_t nAddr = (uintptr_t)pAddr; 146 | 147 | char line[512]; 148 | while (fgets(line, sizeof(line), f)) 149 | { 150 | char start[16]; 151 | char end[16]; 152 | char prot[16]; 153 | 154 | const char* src = line; 155 | 156 | char* dst = start; 157 | while (*src != '-') 158 | *dst++ = *src++; 159 | *dst = 0; 160 | 161 | src++; // skip "-"" 162 | 163 | dst = end; 164 | while (!isspace(*src)) 165 | *dst++ = *src++; 166 | *dst = 0; 167 | 168 | src++; // skip space 169 | 170 | dst = prot; 171 | while (!isspace(*src)) 172 | *dst++ = *src++; 173 | *dst = 0; 174 | 175 | uintptr_t nStart = (uintptr_t)strtoul(start, nullptr, 16); 176 | uintptr_t nEnd = (uintptr_t)strtoul(end, nullptr, 16); 177 | 178 | if (nStart < nAddr && nEnd >(nAddr + nSize)) 179 | { 180 | fclose(f); 181 | return parse_prot(prot); 182 | } 183 | } 184 | 185 | fclose(f); 186 | return 0; 187 | } 188 | 189 | void Plat_WriteMemory(void* pPatchAddress, uint8_t* pPatch, int iPatchSize) 190 | { 191 | int old_prot = get_prot(pPatchAddress, iPatchSize); 192 | 193 | uintptr_t page_size = sysconf(_SC_PAGESIZE); 194 | uint8_t* align_addr = (uint8_t*)((uintptr_t)pPatchAddress & ~(page_size - 1)); 195 | 196 | uint8_t* end = (uint8_t*)pPatchAddress + iPatchSize; 197 | uintptr_t align_size = end - align_addr; 198 | 199 | int result = mprotect(align_addr, align_size, PROT_READ | PROT_WRITE); 200 | 201 | memcpy(pPatchAddress, pPatch, iPatchSize); 202 | 203 | result = mprotect(align_addr, align_size, old_prot); 204 | } 205 | 206 | void* CModule::FindVirtualTable(const std::string& name) 207 | { 208 | auto readOnlyData = GetSection(".rodata"); 209 | auto readOnlyRelocations = GetSection(".data.rel.ro"); 210 | 211 | if (!readOnlyData || !readOnlyRelocations) 212 | { 213 | Warning("Failed to find .rodata or .data.rel.ro section\n"); 214 | return nullptr; 215 | } 216 | 217 | std::string decoratedTableName = std::to_string(name.length()) + name; 218 | 219 | SignatureIterator sigIt(readOnlyData->m_pBase, readOnlyData->m_iSize, (const byte*)decoratedTableName.c_str(), decoratedTableName.size() + 1); 220 | void* classNameString = sigIt.FindNext(false); 221 | 222 | if (!classNameString) 223 | { 224 | Warning("Failed to find type descriptor for %s\n", name.c_str()); 225 | return nullptr; 226 | } 227 | 228 | SignatureIterator sigIt2(readOnlyRelocations->m_pBase, readOnlyRelocations->m_iSize, (const byte*)&classNameString, sizeof(void*)); 229 | void* typeName = sigIt2.FindNext(false); 230 | 231 | if (!typeName) 232 | { 233 | Warning("Failed to find type name for %s\n", name.c_str()); 234 | return nullptr; 235 | } 236 | 237 | void* typeInfo = (void*)((uintptr_t)typeName - 0x8); 238 | 239 | for (const auto& sectionName : { std::string_view(".data.rel.ro"), std::string_view(".data.rel.ro.local") }) 240 | { 241 | auto section = GetSection(sectionName); 242 | if (!section) 243 | continue; 244 | 245 | SignatureIterator sigIt3(section->m_pBase, section->m_iSize, (const byte*)&typeInfo, sizeof(void*)); 246 | 247 | while (void* vtable = sigIt3.FindNext(false)) 248 | { 249 | if (*(int64_t*)((uintptr_t)vtable - 0x8) == 0) 250 | return (void*)((uintptr_t)vtable + 0x8); 251 | } 252 | } 253 | 254 | Warning("Failed to find vtable for %s\n", name.c_str()); 255 | return nullptr; 256 | } 257 | #endif 258 | 259 | -------------------------------------------------------------------------------- /src/utils/plat_win.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * ============================================================================= 3 | * CS2Fixes 4 | * Copyright (C) 2023-2024 Source2ZE 5 | * ============================================================================= 6 | * 7 | * This program is free software; you can redistribute it and/or modify it under 8 | * the terms of the GNU General Public License, version 3.0, as published by the 9 | * Free Software Foundation. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 14 | * details. 15 | * 16 | * You should have received a copy of the GNU General Public License along with 17 | * this program. If not, see . 18 | */ 19 | 20 | #ifdef WIN32 21 | 22 | #include "module.h" 23 | #include "plat.h" 24 | 25 | #include "tier0/memdbgon.h" 26 | 27 | void Plat_WriteMemory(void* pPatchAddress, uint8_t* pPatch, int iPatchSize) 28 | { 29 | WriteProcessMemory(GetCurrentProcess(), pPatchAddress, (void*)pPatch, iPatchSize, nullptr); 30 | } 31 | 32 | 33 | void CModule::InitializeSections() 34 | { 35 | IMAGE_DOS_HEADER* pDosHeader = reinterpret_cast(m_hModule); 36 | IMAGE_NT_HEADERS* pNtHeader = reinterpret_cast(reinterpret_cast(m_hModule) + pDosHeader->e_lfanew); 37 | 38 | IMAGE_SECTION_HEADER* pSectionHeader = IMAGE_FIRST_SECTION(pNtHeader); 39 | 40 | for (int i = 0; i < pNtHeader->FileHeader.NumberOfSections; i++) 41 | { 42 | Section section; 43 | section.m_szName = (char*)pSectionHeader[i].Name; 44 | section.m_pBase = (void*)((uint8_t*)m_base + pSectionHeader[i].VirtualAddress); 45 | section.m_iSize = pSectionHeader[i].SizeOfRawData; 46 | 47 | m_sections.push_back(std::move(section)); 48 | } 49 | } 50 | 51 | void* CModule::FindVirtualTable(const std::string& name) 52 | { 53 | auto runTimeData = GetSection(".data"); 54 | auto readOnlyData = GetSection(".rdata"); 55 | 56 | if (!runTimeData || !readOnlyData) 57 | { 58 | Warning("Failed to find .data or .rdata section\n"); 59 | return nullptr; 60 | } 61 | 62 | std::string decoratedTableName = ".?AV" + name + "@@"; 63 | 64 | SignatureIterator sigIt(runTimeData->m_pBase, runTimeData->m_iSize, (const byte*)decoratedTableName.c_str(), decoratedTableName.size() + 1); 65 | void* typeDescriptor = sigIt.FindNext(false); 66 | 67 | if (!typeDescriptor) 68 | { 69 | Warning("Failed to find type descriptor for %s\n", name.c_str()); 70 | return nullptr; 71 | } 72 | 73 | typeDescriptor = (void*)((uintptr_t)typeDescriptor - 0x10); 74 | 75 | const uint32_t rttiTDRva = (uintptr_t)typeDescriptor - (uintptr_t)m_base; 76 | 77 | ConMsg("RTTI Type Descriptor RVA: 0x%p\n", rttiTDRva); 78 | 79 | SignatureIterator sigIt2(readOnlyData->m_pBase, readOnlyData->m_iSize, (const byte*)&rttiTDRva, sizeof(uint32_t)); 80 | 81 | while (void* completeObjectLocator = sigIt2.FindNext(false)) 82 | { 83 | auto completeObjectLocatorHeader = (uintptr_t)completeObjectLocator - 0xC; 84 | // check RTTI Complete Object Locator header, always 0x1 85 | if (*(int32_t*)(completeObjectLocatorHeader) != 1) 86 | continue; 87 | 88 | // check RTTI Complete Object Locator vtable offset 89 | if (*(int32_t*)((uintptr_t)completeObjectLocator - 0x8) != 0) 90 | continue; 91 | 92 | SignatureIterator sigIt3(readOnlyData->m_pBase, readOnlyData->m_iSize, (const byte*)&completeObjectLocatorHeader, sizeof(void*)); 93 | void* vtable = sigIt3.FindNext(false); 94 | 95 | if (!vtable) 96 | { 97 | Warning("Failed to find vtable for %s\n", name.c_str()); 98 | return nullptr; 99 | } 100 | 101 | return (void*)((uintptr_t)vtable + 0x8); 102 | } 103 | 104 | Warning("Failed to find RTTI Complete Object Locator for %s\n", name.c_str()); 105 | return nullptr; 106 | } 107 | 108 | #endif -------------------------------------------------------------------------------- /vendor/funchook/README.md: -------------------------------------------------------------------------------- 1 | Funchook - an API hook library 2 | ============================== 3 | 4 | [![tests](https://github.com/kubo/funchook/actions/workflows/run-tests.yml/badge.svg?branch=master)](https://github.com/kubo/funchook/actions/workflows/run-tests.yml) 5 | 6 | This library depends on one of the following disassemblers. 7 | 8 | On x86_64 and x86 9 | * [diStorm3][] (default) 10 | * [zydis][] (when `-DFUNCHOOK_DISASM=zydis` is passed to the `cmake` command) 11 | * [capstone][] (when `-DFUNCHOOK_DISASM=capstone` is passed to the `cmake` command) 12 | 13 | On arm64 14 | * [capstone][] 15 | 16 | TODO 17 | ---- 18 | 19 | * write documents. 20 | 21 | News 22 | ---- 23 | 24 | ### 2.0.0 (20XX-XX-XX) 25 | 26 | * Add `funchook_prepare_with_params()` to support prehook. 27 | * Add `funchook_get_arg()` to get arguments in prehook. 28 | 29 | ### 1.1.1 (2022-10-02) 30 | 31 | * More permissive check for page allocation mmap ([#25][]) 32 | * Flush instruction cache for arm64. It does nothing for intel CPU. 33 | * Disassember engine 34 | * Upgrade capstone to 4.0.2 35 | * Upgrade distorm to 3.5.2 36 | * CMake 37 | * Allow user to specify FUNCHOOK_CPU explicitly ([#19][]) 38 | * Avoid polluting global include and link dirs ([#20][]) 39 | * Use target based compile options for gcc's -Wall ([#21][]) 40 | * Use ExternalProject_add to download captone only ([#30][]) 41 | * Add option FUNCHOOK_INSTALL ([#31][]) 42 | * Use "FUNCHOOK_CPU MATCHES " ([#32][]) 43 | * Documentation 44 | * added example usage from python ([#22][]) 45 | * Fix tests on Android ([#29][]) 46 | 47 | ### 1.1.0 (2020-03-22) 48 | 49 | * Arm64 Linux support. [capstone][] is used as the disassembler library on arm64. 50 | * Options to use [zydis][] and [capstone][] as a disassembler library on x86_64 and x86. 51 | * `extern "C"` was added in funchook.h for C++. ([#15][]) 52 | * Libc-compatible functions were removed to simplify code. 53 | 54 | ### 1.0.0 (2020-01-19) 55 | 56 | * [diStorm3][] is used as the disassembler library. 57 | * Libc-compatible functions were implemented on Linux in order not to hook function calls issued by funchook itself. 58 | 59 | Supported Platforms 60 | ------------------- 61 | 62 | * Linux x86_64 63 | * Linux x86 64 | * Linux arm64 (since 1.1.0) 65 | * macOS x86_64 (Functions in executables cannot be hooked when Xcode version >= 11.0. (*1)) 66 | * Windows x64 (except C-runtime functions under [Wine][]) 67 | * Windows 32-bit 68 | 69 | *1 [`mprotect`] fails with EACCES. 70 | 71 | Unsupported Platforms 72 | --------------------- 73 | 74 | * macOS arm64 (*1) 75 | 76 | *1 I received a mail that [`mprotect`] failed with `EINVAL`. Apple seems to prevent executable memory regions from being writable. 77 | 78 | Compilation and installation 79 | ----------- 80 | 81 | ### Unix 82 | 83 | ```shell 84 | $ git clone --recursive https://github.com/kubo/funchook.git 85 | $ mkdir build 86 | $ cd build 87 | $ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/path/to/install/directory ../funchook 88 | $ make 89 | $ make install 90 | ``` 91 | 92 | * Available [`CMAKE_BUILD_TYPE`][] values are empty(default), `Debug`, `Release`, `RelWithDebInfo`(release build with debug information) and `MinSizeRel`. 93 | * When [`CMAKE_INSTALL_PREFIX`][] isn't set, funchook is installed at `/usr/local`. 94 | 95 | installed files: 96 | * `${CMAKE_INSTALL_PREFIX}/include/funchook.h` (header file) 97 | * `${CMAKE_INSTALL_PREFIX}/lib/libfunchook.so` (symbolic link to `libfunchook.so.1`) 98 | * `${CMAKE_INSTALL_PREFIX}/lib/libfunchook.so.1` ([soname][]; symbolic link to `libfunchook.so.1.1.0`) 99 | * `${CMAKE_INSTALL_PREFIX}/lib/libfunchook.so.1.1.0` (shared library) 100 | * `${CMAKE_INSTALL_PREFIX}/lib/libfunchook.a` (static library) 101 | 102 | ### Windows 103 | 104 | Here is an example to compile funchook with Visual Studio 2017 Win64. 105 | Change the argument of `-G` to use other compilers. 106 | 107 | ```shell 108 | $ git clone --recursive https://github.com/kubo/funchook.git 109 | $ mkdir build 110 | $ cd build 111 | $ cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_INSTALL_PREFIX=c:\path\to\install\directory ..\funchook 112 | $ cmake --build . --config Release --target INSTALL 113 | ``` 114 | 115 | * Available `-G` arguments (generators) are listed in the output of `cmake --help`. 116 | * Available `--config` arguments are `Debug`(default), `Release`, `RelWithDebInfo` and `MinSizeRel`. 117 | * When [`CMAKE_INSTALL_PREFIX`][] isn't set, funchook is installed at `c:\Program Files\funchook`. 118 | 119 | installed files: 120 | * `${CMAKE_INSTALL_PREFIX}\include\funchook.h` (header file) 121 | * `${CMAKE_INSTALL_PREFIX}\bin\funchook.dll` (shared library) 122 | * `${CMAKE_INSTALL_PREFIX}\bin\funchook.pdb` (debug file for `funchook.dll` when `--config` is `Debug` or `RelWithDebInfo`) 123 | * `${CMAKE_INSTALL_PREFIX}\lib\funchook.lib` (static library) 124 | * `${CMAKE_INSTALL_PREFIX}\lib\funchook_dll.lib` (import library for `funchook.dll`) 125 | 126 | Example 127 | ------- 128 | 129 | ```c 130 | static ssize_t (*send_func)(int sockfd, const void *buf, size_t len, int flags); 131 | static ssize_t (*recv_func)(int sockfd, void *buf, size_t len, int flags); 132 | 133 | static ssize_t send_hook(int sockfd, const void *buf, size_t len, int flags); 134 | { 135 | ssize_t rv; 136 | 137 | ... do your task: logging, etc. ... 138 | rv = send_func(sockfd, buf, len, flags); /* call the original send(). */ 139 | ... do your task: logging, checking the return value, etc. ... 140 | return rv; 141 | } 142 | 143 | static ssize_t recv_hook(int sockfd, void *buf, size_t len, int flags); 144 | { 145 | ssize_t rv; 146 | 147 | ... do your task: logging, etc. ... 148 | rv = recv_func(sockfd, buf, len, flags); /* call the original recv(). */ 149 | ... do your task: logging, checking received data, etc. ... 150 | return rv; 151 | } 152 | 153 | int install_hooks() 154 | { 155 | funchook_t *funchook = funchook_create(); 156 | int rv; 157 | 158 | /* Prepare hooking. 159 | * The return value is used to call the original send function 160 | * in send_hook. 161 | */ 162 | send_func = send; 163 | rv = funchook_prepare(funchook, (void**)&send_func, send_hook); 164 | if (rv != 0) { 165 | /* error */ 166 | ... 167 | } 168 | 169 | /* ditto */ 170 | recv_func = recv; 171 | rv = funchook_prepare(funchook, (void**)&recv_func, recv_hook); 172 | if (rv != 0) { 173 | /* error */ 174 | ... 175 | } 176 | 177 | /* Install hooks. 178 | * The first 5-byte code of send() and recv() are changed respectively. 179 | */ 180 | rv = funchook_install(funchook, 0); 181 | if (rv != 0) { 182 | /* error */ 183 | ... 184 | } 185 | } 186 | 187 | ``` 188 | 189 | Example - Using Python ctypes 190 | ----------------------------- 191 | ```python 192 | # should work on python 2.7/3 windows/linux 193 | 194 | # load funchook 195 | import ctypes 196 | fh_lib = ctypes.cdll.LoadLibrary('/path/to/funchook/dll/or/so') 197 | 198 | # define signatures 199 | funchook_create = fh_lib.funchook_create 200 | funchook_create.restype = ctypes.c_void_p 201 | funchook_create.argtypes = [] 202 | 203 | funchook_prepare = fh_lib.funchook_prepare 204 | funchook_prepare.restype = ctypes.c_ssize_t 205 | funchook_prepare.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p] 206 | 207 | funchook_install = fh_lib.funchook_install 208 | funchook_install.restype = ctypes.c_ssize_t 209 | funchook_install.argtypes = [ctypes.c_void_p, ctypes.c_int] 210 | 211 | PySys_WriteStdout = ctypes.pythonapi.PySys_WriteStdout 212 | PySys_WriteStdout.restype = None 213 | PySys_WriteStdout.argtypes=[ctypes.c_char_p] 214 | 215 | # must keep those references alive, or stuff will be GC'd and weird errors will occur 216 | global orig_write, hook, orig_write_ptr 217 | 218 | # create hook (this function will replace the original function) 219 | hook_type = ctypes.PYFUNCTYPE(None, ctypes.c_char_p) 220 | orig_write = None 221 | def hook_impl(msg): 222 | print('about to write: ' + str(msg)) # do what we want 223 | orig_write(msg) # call the original function 224 | 225 | hook = hook_type(hook_impl) 226 | 227 | fh = funchook_create() 228 | # create a pointer object with the function address 229 | orig_write_ptr = ctypes.c_void_p(ctypes.c_void_p.from_address(ctypes.addressof(PySys_WriteStdout)).value) 230 | # orig_write_ptr.value will get a ptr to the original PySys_WriteStdout and PySys_WriteStdout will now point to the hook 231 | ret = funchook_prepare(fh, ctypes.addressof(orig_write_ptr), hook) 232 | assert not ret, 'ret is ' + str(ret) 233 | ret = funchook_install(fh, 0) 234 | assert not ret, 'ret is ' + str(ret) 235 | orig_write = hook_type.from_address(ctypes.addressof(orig_write_ptr)) 236 | PySys_WriteStdout(b'hi there\n') 237 | ``` 238 | 239 | License 240 | ------- 241 | 242 | GPLv2 or later with a [GPL linking exception][]. 243 | 244 | You can use funchook in any software. Though funchook is licensed under 245 | the GPL, it doesn't affect outside of funchook due to the linking exception. 246 | You have no need to open your souce code under the GPL except funchook itself. 247 | 248 | If you modify funchook itself and release it, the modifed part must be 249 | open under the GPL with or without the linking exception because funchook 250 | itself is under the GPL. 251 | 252 | [diStorm3][] and [capstone][] are released under the 3-clause BSD license. 253 | [zydis][] is released under the MIT license. They are compatible with the GPL. 254 | 255 | [GPL linking exception]: https://en.wikipedia.org/wiki/GPL_linking_exception 256 | [diStorm3]: https://github.com/gdabah/distorm/ 257 | [zydis]: https://github.com/zyantific/zydis 258 | [capstone]: https://github.com/aquynh/capstone 259 | [Wine]: https://www.winehq.org/ 260 | [`CMAKE_BUILD_TYPE`]: https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html 261 | [`CMAKE_INSTALL_PREFIX`]: https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html 262 | [soname]: https://en.wikipedia.org/wiki/Soname 263 | [#15]: https://github.com/kubo/funchook/issues/15 264 | [#19]: https://github.com/kubo/funchook/pull/19 265 | [#20]: https://github.com/kubo/funchook/pull/20 266 | [#21]: https://github.com/kubo/funchook/pull/21 267 | [#22]: https://github.com/kubo/funchook/pull/22 268 | [#25]: https://github.com/kubo/funchook/pull/25 269 | [#29]: https://github.com/kubo/funchook/pull/29 270 | [#30]: https://github.com/kubo/funchook/pull/30 271 | [#31]: https://github.com/kubo/funchook/pull/31 272 | [#32]: https://github.com/kubo/funchook/pull/32 273 | [`mprotect`]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/mprotect.2.html 274 | -------------------------------------------------------------------------------- /vendor/funchook/include/funchook.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of Funchook. 3 | * https://github.com/kubo/funchook 4 | * 5 | * Funchook is free software: you can redistribute it and/or modify it 6 | * under the terms of the GNU General Public License as published by the 7 | * Free Software Foundation, either version 2 of the License, or (at your 8 | * option) any later version. 9 | * 10 | * As a special exception, the copyright holders of this library give you 11 | * permission to link this library with independent modules to produce an 12 | * executable, regardless of the license terms of these independent 13 | * modules, and to copy and distribute the resulting executable under 14 | * terms of your choice, provided that you also meet, for each linked 15 | * independent module, the terms and conditions of the license of that 16 | * module. An independent module is a module which is not derived from or 17 | * based on this library. If you modify this library, you may extend this 18 | * exception to your version of the library, but you are not obliged to 19 | * do so. If you do not wish to do so, delete this exception statement 20 | * from your version. 21 | * 22 | * Funchook is distributed in the hope that it will be useful, but WITHOUT 23 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 24 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 25 | * for more details. 26 | * 27 | * You should have received a copy of the GNU General Public License 28 | * along with Funchook. If not, see . 29 | */ 30 | #ifndef FUNCHOOK_H 31 | #define FUNCHOOK_H 1 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | /* 38 | * Only functions with FUNCHOOK_EXPORT are visible from outside of funchook.dll 39 | * or libfunchook.so. Others are invisible. 40 | */ 41 | #ifdef FUNCHOOK_EXPORTS 42 | #if defined(_WIN32) 43 | #define FUNCHOOK_EXPORT __declspec(dllexport) 44 | #elif defined(__GNUC__) 45 | #define FUNCHOOK_EXPORT __attribute__((visibility("default"))) 46 | #endif 47 | #endif /* FUNCHOOK_EXPORTS */ 48 | #ifndef FUNCHOOK_EXPORT 49 | #define FUNCHOOK_EXPORT 50 | #endif 51 | 52 | typedef struct funchook funchook_t; 53 | 54 | #define FUNCHOOK_ERROR_INTERNAL_ERROR -1 55 | #define FUNCHOOK_ERROR_SUCCESS 0 56 | #define FUNCHOOK_ERROR_OUT_OF_MEMORY 1 57 | #define FUNCHOOK_ERROR_ALREADY_INSTALLED 2 58 | #define FUNCHOOK_ERROR_DISASSEMBLY 3 59 | #define FUNCHOOK_ERROR_IP_RELATIVE_OFFSET 4 60 | #define FUNCHOOK_ERROR_CANNOT_FIX_IP_RELATIVE 5 61 | #define FUNCHOOK_ERROR_FOUND_BACK_JUMP 6 62 | #define FUNCHOOK_ERROR_TOO_SHORT_INSTRUCTIONS 7 63 | #define FUNCHOOK_ERROR_MEMORY_ALLOCATION 8 /* memory allocation error */ 64 | #define FUNCHOOK_ERROR_MEMORY_FUNCTION 9 /* other memory function errors */ 65 | #define FUNCHOOK_ERROR_NOT_INSTALLED 10 66 | #define FUNCHOOK_ERROR_NO_AVAILABLE_REGISTERS 11 67 | #define FUNCHOOK_ERROR_NO_SPACE_NEAR_TARGET_ADDR 12 68 | 69 | #define FUNCHOOK_FLAG_THISCALL (1u << 0) 70 | #define FUNCHOOK_FLAG_FASTCALL (1u << 1) 71 | 72 | typedef struct funchook_arg_handle funchook_arg_handle_t; 73 | 74 | typedef struct funchook_info { 75 | void *original_target_func; 76 | void *target_func; 77 | void *trampoline_func; 78 | void *hook_func; 79 | void *user_data; 80 | funchook_arg_handle_t *arg_handle; 81 | } funchook_info_t; 82 | 83 | typedef void (*funchook_hook_t)(funchook_info_t *fi); 84 | 85 | typedef struct { 86 | void *hook_func; 87 | funchook_hook_t prehook; 88 | void *user_data; 89 | unsigned int flags; 90 | } funchook_params_t; 91 | 92 | /** 93 | * Create a funchook handle 94 | * 95 | * @return allocated funchook handle. NULL when out-of-memory. 96 | */ 97 | FUNCHOOK_EXPORT funchook_t *funchook_create(void); 98 | 99 | /** 100 | * Prepare hooking 101 | * 102 | * @param funchook a funchook handle created by funchook_create() 103 | * @param target_func function pointer to be intercepted. The pointer to trampoline function is set on success. 104 | * @param hook_func function pointer which is called istead of target_func 105 | * @return error code. one of FUNCHOOK_ERROR_*. 106 | */ 107 | FUNCHOOK_EXPORT int funchook_prepare(funchook_t *funchook, void **target_func, void *hook_func); 108 | 109 | FUNCHOOK_EXPORT int funchook_prepare_with_params(funchook_t *funchook, 110 | void **target_func, const funchook_params_t *params); 111 | 112 | /** 113 | * Install hooks prepared by funchook_prepare(). 114 | * 115 | * @param funchook a funchook handle created by funchook_create() 116 | * @param flags reserved. Set zero. 117 | * @return error code. one of FUNCHOOK_ERROR_*. 118 | */ 119 | FUNCHOOK_EXPORT int funchook_install(funchook_t *funchook, int flags); 120 | 121 | /** 122 | * Uninstall hooks installed by funchook_install(). 123 | * 124 | * @param funchook a funchook handle created by funchook_create() 125 | * @param flags reserved. Set zero. 126 | * @return error code. one of FUNCHOOK_ERROR_*. 127 | */ 128 | FUNCHOOK_EXPORT int funchook_uninstall(funchook_t *funchook, int flags); 129 | 130 | /** 131 | * Destroy a funchook handle 132 | * 133 | * @param funchook a funchook handle created by funchook_create() 134 | * @return error code. one of FUNCHOOK_ERROR_*. 135 | */ 136 | FUNCHOOK_EXPORT int funchook_destroy(funchook_t *funchook); 137 | 138 | /** 139 | * Get error message 140 | * 141 | * @param funchook a funchook handle created by funchook_create() 142 | * @return pointer to buffer containing error message 143 | */ 144 | FUNCHOOK_EXPORT const char *funchook_error_message(const funchook_t *funchook); 145 | 146 | /** 147 | * Set log file name to debug funchook itself. 148 | * 149 | * @param name log file name 150 | * @return error code. one of FUNCHOOK_ERROR_*. 151 | */ 152 | FUNCHOOK_EXPORT int funchook_set_debug_file(const char *name); 153 | 154 | /* This function is under developemnt. It will be used by C++ template functions later. */ 155 | FUNCHOOK_EXPORT void *funchook_arg_get_int_reg_addr(const funchook_arg_handle_t *arg_handle, int pos); 156 | 157 | /* This function is under developemnt. It will be used by C++ template functions later. */ 158 | FUNCHOOK_EXPORT void *funchook_arg_get_flt_reg_addr(const funchook_arg_handle_t *arg_handle, int pos); 159 | 160 | /* This function is under developemnt. It will be used by C++ template functions later. */ 161 | FUNCHOOK_EXPORT void *funchook_arg_get_stack_addr(const funchook_arg_handle_t *arg_handle, int pos); 162 | 163 | #ifdef __cplusplus 164 | } // extern "C" 165 | #endif 166 | 167 | #endif 168 | -------------------------------------------------------------------------------- /vendor/funchook/lib/Debug/distorm.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Source2ZE/CS2VoiceFix/e3ef10cb9c72a071e3176d529c1da04bc73e529d/vendor/funchook/lib/Debug/distorm.lib -------------------------------------------------------------------------------- /vendor/funchook/lib/Debug/distorm.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Source2ZE/CS2VoiceFix/e3ef10cb9c72a071e3176d529c1da04bc73e529d/vendor/funchook/lib/Debug/distorm.pdb -------------------------------------------------------------------------------- /vendor/funchook/lib/Debug/funchook.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Source2ZE/CS2VoiceFix/e3ef10cb9c72a071e3176d529c1da04bc73e529d/vendor/funchook/lib/Debug/funchook.lib -------------------------------------------------------------------------------- /vendor/funchook/lib/Debug/funchook.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Source2ZE/CS2VoiceFix/e3ef10cb9c72a071e3176d529c1da04bc73e529d/vendor/funchook/lib/Debug/funchook.pdb -------------------------------------------------------------------------------- /vendor/funchook/lib/Debug/libdistorm.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Source2ZE/CS2VoiceFix/e3ef10cb9c72a071e3176d529c1da04bc73e529d/vendor/funchook/lib/Debug/libdistorm.a -------------------------------------------------------------------------------- /vendor/funchook/lib/Debug/libfunchook.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Source2ZE/CS2VoiceFix/e3ef10cb9c72a071e3176d529c1da04bc73e529d/vendor/funchook/lib/Debug/libfunchook.a -------------------------------------------------------------------------------- /vendor/funchook/lib/Release/distorm.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Source2ZE/CS2VoiceFix/e3ef10cb9c72a071e3176d529c1da04bc73e529d/vendor/funchook/lib/Release/distorm.lib -------------------------------------------------------------------------------- /vendor/funchook/lib/Release/funchook.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Source2ZE/CS2VoiceFix/e3ef10cb9c72a071e3176d529c1da04bc73e529d/vendor/funchook/lib/Release/funchook.lib -------------------------------------------------------------------------------- /vendor/funchook/lib/Release/libdistorm.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Source2ZE/CS2VoiceFix/e3ef10cb9c72a071e3176d529c1da04bc73e529d/vendor/funchook/lib/Release/libdistorm.a -------------------------------------------------------------------------------- /vendor/funchook/lib/Release/libfunchook.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Source2ZE/CS2VoiceFix/e3ef10cb9c72a071e3176d529c1da04bc73e529d/vendor/funchook/lib/Release/libfunchook.a -------------------------------------------------------------------------------- /xmake.lua: -------------------------------------------------------------------------------- 1 | add_rules("mode.debug", "mode.release") 2 | 3 | includes("@builtin/xpack") 4 | 5 | local SDK_PATH = os.getenv("HL2SDKCS2") 6 | local MM_PATH = os.getenv("MMSOURCE112") 7 | 8 | target("CS2VoiceFix") 9 | set_kind("shared") 10 | add_files("src/**.cpp") 11 | add_headerfiles("src/**.h") 12 | set_symbols("hidden") 13 | 14 | add_files({ 15 | SDK_PATH.."/tier1/convar.cpp", 16 | SDK_PATH.."/public/tier0/memoverride.cpp", 17 | SDK_PATH.."/tier1/generichash.cpp", 18 | SDK_PATH.."/entity2/entitysystem.cpp", 19 | SDK_PATH.."/entity2/entityidentity.cpp", 20 | SDK_PATH.."/entity2/entitykeyvalues.cpp", 21 | SDK_PATH.."/tier1/keyvalues3.cpp", 22 | "protobufs/generated/usermessages.pb.cc", 23 | "protobufs/generated/network_connection.pb.cc", 24 | "protobufs/generated/networkbasetypes.pb.cc", 25 | "protobufs/generated/engine_gcmessages.pb.cc", 26 | "protobufs/generated/steammessages.pb.cc", 27 | "protobufs/generated/gcsdk_gcmessages.pb.cc", 28 | "protobufs/generated/cstrike15_gcmessages.pb.cc", 29 | "protobufs/generated/cstrike15_usermessages.pb.cc", 30 | "protobufs/generated/usercmd.pb.cc", 31 | "protobufs/generated/cs_usercmd.pb.cc", 32 | "protobufs/generated/netmessages.pb.cc", 33 | }) 34 | 35 | if is_plat("windows") then 36 | add_links({ 37 | SDK_PATH.."/lib/public/win64/2015/libprotobuf.lib", 38 | SDK_PATH.."/lib/public/win64/tier0.lib", 39 | SDK_PATH.."/lib/public/win64/tier1.lib", 40 | SDK_PATH.."/lib/public/win64/interfaces.lib", 41 | SDK_PATH.."/lib/public/win64/mathlib.lib", 42 | }) 43 | else 44 | add_links({ 45 | SDK_PATH.."/lib/linux64/release/libprotobuf.a", 46 | SDK_PATH.."/lib/linux64/libtier0.so", 47 | SDK_PATH.."/lib/linux64/tier1.a", 48 | SDK_PATH.."/lib/linux64/interfaces.a", 49 | SDK_PATH.."/lib/linux64/mathlib.a", 50 | }) 51 | 52 | add_cxxflags("-lstdc++", "-Wno-register") 53 | end 54 | 55 | add_linkdirs({ 56 | "vendor/funchook/lib/Release", 57 | }) 58 | 59 | add_links({ 60 | "funchook", 61 | "distorm" 62 | }) 63 | 64 | if is_plat("windows") then 65 | add_links("psapi"); 66 | add_files("src/utils/plat_win.cpp"); 67 | else 68 | add_files("src/utils/plat_unix.cpp"); 69 | end 70 | 71 | add_includedirs({ 72 | "src", 73 | "vendor/funchook/include", 74 | "vendor", 75 | -- sdk 76 | SDK_PATH, 77 | SDK_PATH.."/thirdparty/protobuf-3.21.8/src", 78 | SDK_PATH.."/common", 79 | SDK_PATH.."/game/shared", 80 | SDK_PATH.."/game/server", 81 | SDK_PATH.."/public", 82 | SDK_PATH.."/public/engine", 83 | SDK_PATH.."/public/mathlib", 84 | SDK_PATH.."/public/tier0", 85 | SDK_PATH.."/public/tier1", 86 | SDK_PATH.."/public/entity2", 87 | SDK_PATH.."/public/game/server", 88 | -- metamod 89 | MM_PATH.."/core", 90 | MM_PATH.."/core/sourcehook", 91 | }) 92 | 93 | if(is_plat("windows")) then 94 | add_defines({ 95 | "COMPILER_MSVC", 96 | "COMPILER_MSVC64", 97 | "PLATFORM_64BITS", 98 | "WIN32", 99 | "WINDOWS", 100 | "CRT_SECURE_NO_WARNINGS", 101 | "CRT_SECURE_NO_DEPRECATE", 102 | "CRT_NONSTDC_NO_DEPRECATE", 103 | "_MBCS", 104 | "META_IS_SOURCE2" 105 | }) 106 | else 107 | add_defines({ 108 | "_LINUX", 109 | "LINUX", 110 | "POSIX", 111 | "GNUC", 112 | "COMPILER_GCC", 113 | "PLATFORM_64BITS", 114 | "META_IS_SOURCE2", 115 | "_GLIBCXX_USE_CXX11_ABI=0" 116 | }) 117 | end 118 | set_languages("cxx20") --------------------------------------------------------------------------------