mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2026-10-11 14:28:00 +08:00
IEngineService, IEngineServiceMgr, IServer->INetworkGameServer, INetworkServerService, protos.
This commit is contained in:
1 parent
9a69b72448
commit
39abe90ee2
13 files changed
+21723
-2500
No files matched your search
+1
-2
@@ -21,7 +21,6 @@
|
||||
#include "engine/ivmodelinfo.h"
|
||||
#include "soundflags.h"
|
||||
#include "bitvec.h"
|
||||
#include "engine/iserverplugin.h"
|
||||
#include "tier1/bitbuf.h"
|
||||
#include "tier1/utlstring.h"
|
||||
#include <steam/steamclientpublic.h>
|
||||
@@ -70,7 +69,7 @@ struct EconControlPointInfo_t;
|
||||
class CEntityHandle;
|
||||
struct RenderDeviceInfo_t;
|
||||
struct RenderMultisampleType_t;
|
||||
struct GameSessionConfiguration_t;
|
||||
class GameSessionConfiguration_t;
|
||||
struct StringTableDef_t;
|
||||
struct HostStateLoopModeType_t;
|
||||
class ILoopModePrerequisiteRegistry;
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef IENGINESERVICE_H
|
||||
#define IENGINESERVICE_H
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <appframework/IAppSystem.h>
|
||||
|
||||
struct EngineLoopState_t;
|
||||
struct EventMapRegistrationType_t;
|
||||
class ILoopModeFactory;
|
||||
struct ActiveLoop_t;
|
||||
struct EventClientOutput_t;
|
||||
class ISwitchLoopModeStatusNotify;
|
||||
class IAddonListChangeNotify;
|
||||
|
||||
abstract_class IEngineService : public IAppSystem
|
||||
{
|
||||
public:
|
||||
virtual void *GetServiceDependencies( void ) = 0;
|
||||
virtual const char *GetName( void ) const = 0;
|
||||
virtual bool ShouldActivate( const char * ) = 0;
|
||||
virtual void OnLoopActivate( const EngineLoopState_t &loopState, /*CEventDispatcher<CEventIDManager_Default>*/ void * ) = 0;
|
||||
virtual void OnLoopDeactivate( const EngineLoopState_t &loopState, /*CEventDispatcher<CEventIDManager_Default>*/ void * ) = 0;
|
||||
virtual bool IsActive( void ) const = 0;
|
||||
virtual void SetActive( bool ) = 0;
|
||||
virtual void SetName( const char *pszName ) = 0;
|
||||
virtual void RegisterEventMap( /*CEventDispatcher<CEventIDManager_Default>*/ void *, EventMapRegistrationType_t ) = 0;
|
||||
virtual uint16 GetServiceIndex( void ) = 0;
|
||||
virtual void SetServiceIndex( uint16 index ) = 0;
|
||||
};
|
||||
|
||||
abstract_class IEngineServiceMgr : public IAppSystem
|
||||
{
|
||||
public:
|
||||
virtual void RegisterEngineService( const char *, IEngineService * ) = 0;
|
||||
virtual void UnregisterEngineService( const char *, IEngineService * ) = 0;
|
||||
virtual void RegisterLoopMode( const char *, ILoopModeFactory *, void ** ) = 0;
|
||||
virtual void UnregisterLoopMode( const char *, ILoopModeFactory *, void ** ) = 0;
|
||||
virtual void SwitchToLoop( const char *pszMode, KeyValues *, uint32 nId, const char *, bool ) = 0;
|
||||
virtual const char *GetActiveLoopName( void ) const = 0;
|
||||
virtual IEngineService *FindService( const char * ) = 0;
|
||||
virtual void *GetEngineWindow( void ) const = 0;
|
||||
virtual void *GetEngineSwapChain( void ) const = 0;
|
||||
virtual void *GetEngineInputContext( void ) const = 0;
|
||||
virtual void *GetEngineWindowInfo( void ) const = 0;
|
||||
virtual int64 GetEngineWindowWidth( void ) const = 0;
|
||||
virtual int64 GetEngineWindowHeight( void ) const = 0;
|
||||
virtual bool IsLoopSwitchQueued( void ) const = 0;
|
||||
virtual bool IsLoopSwitchRequested( void ) const = 0;
|
||||
virtual void *GetEventDispatcher( void ) = 0;
|
||||
virtual void *GetDebugVisualizerMgr( void ) = 0;
|
||||
virtual int GetActiveLoopClientServerMode( void ) const = 0;
|
||||
virtual void EnableMaxFramerate( bool ) = 0;
|
||||
virtual void OverrideMaxFramerate( float ) = 0;
|
||||
virtual void PrintStatus( void ) = 0;
|
||||
virtual void GetActiveLoop( ActiveLoop_t & ) = 0;
|
||||
virtual bool IsLoadingLevel( void ) const = 0;
|
||||
virtual bool IsInGameLoop( void ) const = 0;
|
||||
virtual void OnFrameRenderingFinished( bool, const EventClientOutput_t & ) = 0;
|
||||
virtual void ChangeVideoMode( RenderDeviceInfo_t & ) = 0;
|
||||
virtual void GetVideoModeChange( void ) = 0;
|
||||
virtual int GetAddonCount( void ) const = 0;
|
||||
virtual void GetAddon( int ) const = 0;
|
||||
virtual bool IsAddonMounted( const char * ) const = 0;
|
||||
virtual const char *GetAddonsString( void ) const = 0;
|
||||
virtual void InstallSwitchLoopModeStatusNotify( ISwitchLoopModeStatusNotify * ) = 0;
|
||||
virtual void UninstallSwitchLoopModeStatusNotify( ISwitchLoopModeStatusNotify * ) = 0;
|
||||
virtual void InstallAddonListChangeNotify( IAddonListChangeNotify * ) = 0;
|
||||
virtual void UninstallAddonListChangeNotify( IAddonListChangeNotify * ) = 0;
|
||||
virtual void ExitMainLoop( void ) = 0;
|
||||
};
|
||||
|
||||
#endif // IENGINESERVICE_H
|
||||
@@ -1,167 +0,0 @@
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
|
||||
#ifndef ISERVERPLUGIN_H
|
||||
#define ISERVERPLUGIN_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include "edict.h"
|
||||
#include "tier1/interface.h"
|
||||
#include "tier1/KeyValues.h"
|
||||
|
||||
class CCommand;
|
||||
struct CEntityIndex;
|
||||
|
||||
//
|
||||
// you will also want to listen for game events via IGameEventManager::AddListener()
|
||||
//
|
||||
|
||||
typedef enum
|
||||
{
|
||||
PLUGIN_CONTINUE = 0, // keep going
|
||||
PLUGIN_OVERRIDE, // run the game dll function but use our return value instead
|
||||
PLUGIN_STOP, // don't run the game dll function at all
|
||||
} PLUGIN_RESULT;
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
eQueryCvarValueStatus_ValueIntact=0, // It got the value fine.
|
||||
eQueryCvarValueStatus_CvarNotFound=1,
|
||||
eQueryCvarValueStatus_NotACvar=2, // There's a ConCommand, but it's not a ConVar.
|
||||
eQueryCvarValueStatus_CvarProtected=3 // The cvar was marked with FCVAR_SERVER_CAN_NOT_QUERY, so the server is not allowed to have its value.
|
||||
} EQueryCvarValueStatus;
|
||||
|
||||
|
||||
typedef int QueryCvarCookie_t;
|
||||
#define InvalidQueryCvarCookie -1
|
||||
|
||||
|
||||
#define INTERFACEVERSION_ISERVERPLUGINCALLBACKS_VERSION_1 "ISERVERPLUGINCALLBACKS001"
|
||||
#define INTERFACEVERSION_ISERVERPLUGINCALLBACKS_VERSION_2 "ISERVERPLUGINCALLBACKS002"
|
||||
#define INTERFACEVERSION_ISERVERPLUGINCALLBACKS "ISERVERPLUGINCALLBACKS003"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: callbacks the engine exposes to the 3rd party plugins (ala MetaMod)
|
||||
//-----------------------------------------------------------------------------
|
||||
abstract_class IServerPluginCallbacks
|
||||
{
|
||||
public:
|
||||
// Initialize the plugin to run
|
||||
// Return false if there is an error during startup.
|
||||
virtual bool Load( CreateInterfaceFn interfaceFactory, CreateInterfaceFn gameServerFactory ) = 0;
|
||||
|
||||
// Called when the plugin should be shutdown
|
||||
virtual void Unload( void ) = 0;
|
||||
|
||||
// called when a plugins execution is stopped but the plugin is not unloaded
|
||||
virtual void Pause( void ) = 0;
|
||||
|
||||
// called when a plugin should start executing again (sometime after a Pause() call)
|
||||
virtual void UnPause( void ) = 0;
|
||||
|
||||
// Returns string describing current plugin. e.g., Admin-Mod.
|
||||
virtual const char *GetPluginDescription( void ) = 0;
|
||||
|
||||
// Called any time a new level is started (after GameInit() also on level transitions within a game)
|
||||
virtual void LevelInit( char const *pMapName ) = 0;
|
||||
|
||||
// The server is about to activate
|
||||
virtual void ServerActivate( edict_t *pEdictList, int edictCount, int clientMax ) = 0;
|
||||
|
||||
// The server should run physics/think on all edicts
|
||||
virtual void GameFrame( bool simulating ) = 0;
|
||||
|
||||
// Called when a level is shutdown (including changing levels)
|
||||
virtual void LevelShutdown( void ) = 0;
|
||||
|
||||
// Client is going active
|
||||
virtual void ClientActive( edict_t *pEntity ) = 0;
|
||||
|
||||
// Client is fully connected ( has received initial baseline of entities )
|
||||
virtual void ClientFullyConnect( edict_t *pEntity ) = 0;
|
||||
|
||||
// Client is disconnecting from server
|
||||
virtual void ClientDisconnect( edict_t *pEntity ) = 0;
|
||||
|
||||
// Client is connected and should be put in the game
|
||||
virtual void ClientPutInServer( edict_t *pEntity, char const *playername ) = 0;
|
||||
|
||||
// Sets the client index for the client who typed the command into their console
|
||||
virtual void SetCommandClient( int index ) = 0;
|
||||
|
||||
// A player changed one/several replicated cvars (name etc)
|
||||
virtual void ClientSettingsChanged( edict_t *pEdict ) = 0;
|
||||
|
||||
// Client is connecting to server ( set retVal to false to reject the connection )
|
||||
// You can specify a rejection message by writing it into reject
|
||||
virtual PLUGIN_RESULT ClientConnect( bool *bAllowConnect, edict_t *pEntity, const char *pszName, const char *pszAddress, char *reject, int maxrejectlen ) = 0;
|
||||
|
||||
// The client has typed a command at the console
|
||||
virtual PLUGIN_RESULT ClientCommand( edict_t *pEntity, const CCommand &args ) = 0;
|
||||
|
||||
// A user has had their network id setup and validated
|
||||
virtual PLUGIN_RESULT NetworkIDValidated( const char *pszUserName, const char *pszNetworkID ) = 0;
|
||||
|
||||
// This is called when a query from IServerPluginHelpers::StartQueryCvarValue is finished.
|
||||
// iCookie is the value returned by IServerPluginHelpers::StartQueryCvarValue.
|
||||
// Added with version 2 of the interface.
|
||||
virtual void OnQueryCvarValueFinished( QueryCvarCookie_t iCookie, CEntityIndex index, EQueryCvarValueStatus eStatus, const char *pCvarName, const char *pCvarValue ) = 0;
|
||||
|
||||
// added with version 3 of the interface.
|
||||
virtual void OnEdictAllocated( edict_t *edict ) = 0;
|
||||
virtual void OnEdictFreed( const edict_t *edict ) = 0;
|
||||
};
|
||||
|
||||
#define INTERFACEVERSION_ISERVERPLUGINHELPERS "ISERVERPLUGINHELPERS001"
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
DIALOG_MSG = 0, // just an on screen message
|
||||
DIALOG_MENU, // an options menu
|
||||
DIALOG_TEXT, // a richtext dialog
|
||||
DIALOG_ENTRY, // an entry box
|
||||
DIALOG_ASKCONNECT // Ask the client to connect to a specified IP address. Only the "time" and "title" keys are used.
|
||||
} DIALOG_TYPE;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: functions that only 3rd party plugins need
|
||||
//-----------------------------------------------------------------------------
|
||||
abstract_class IServerPluginHelpers
|
||||
{
|
||||
public:
|
||||
// creates an onscreen menu with various option buttons
|
||||
// The keyvalues param can contain these fields:
|
||||
// "title" - (string) the title to show in the hud and in the title bar
|
||||
// "msg" - (string) a longer message shown in the GameUI
|
||||
// "color" - (color) the color to display the message in the hud (white by default)
|
||||
// "level" - (int) the priority of this message (closer to 0 is higher), only 1 message can be outstanding at a time
|
||||
// "time" - (int) the time in seconds this message should stay active in the GameUI (min 10 sec, max 200 sec)
|
||||
//
|
||||
// For DIALOG_MENU add sub keys for each option with these fields:
|
||||
// "command" - (string) client command to run if selected
|
||||
// "msg" - (string) button text for this option
|
||||
//
|
||||
virtual void CreateMessage( edict_t *pEntity, DIALOG_TYPE type, KeyValues *data, IServerPluginCallbacks *plugin ) = 0;
|
||||
virtual void ClientCommand( edict_t *pEntity, const char *cmd ) = 0;
|
||||
|
||||
// Call this to find out the value of a cvar on the client.
|
||||
//
|
||||
// It is an asynchronous query, and it will call IServerPluginCallbacks::OnQueryCvarValueFinished when
|
||||
// the value comes in from the client.
|
||||
//
|
||||
// Store the return value if you want to match this specific query to the OnQueryCvarValueFinished call.
|
||||
// Returns InvalidQueryCvarCookie if the entity is invalid.
|
||||
virtual QueryCvarCookie_t StartQueryCvarValue( edict_t *pEntity, const char *pName ) = 0;
|
||||
};
|
||||
|
||||
#endif //ISERVERPLUGIN_H
|
||||
File diff suppressed because it is too large.
Load diff
+5153
-633
File diff suppressed because it is too large.
Load diff
@@ -1,443 +1,505 @@
|
||||
//====== Copyright (c) 2012, Valve Corporation, All rights reserved. ========//
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
// Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
// THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//===========================================================================//
|
||||
//
|
||||
// Purpose: The file defines our Google Protocol Buffers which are used in over
|
||||
// the wire messages for the Source engine.
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
// Note about encoding:
|
||||
// http://code.google.com/apis/protocolbuffers/docs/encoding.html
|
||||
//
|
||||
// TL;DR: Use sint32/sint64 for values that may be negative.
|
||||
//
|
||||
// There is an important difference between the signed int types (sint32 and sint64)
|
||||
// and the "standard" int types (int32 and int64) when it comes to encoding negative
|
||||
// numbers. If you use int32 or int64 as the type for a negative number, the
|
||||
// resulting varint is always ten bytes long – it is, effectively, treated like a
|
||||
// very large unsigned integer. If you use one of the signed types, the resulting
|
||||
// varint uses ZigZag encoding, which is much more efficient.
|
||||
|
||||
|
||||
// Commenting this out allows it to be compiled for SPEED or LITE_RUNTIME.
|
||||
// option optimize_for = SPEED;
|
||||
|
||||
// We don't use the service generation functionality
|
||||
option cc_generic_services = false;
|
||||
|
||||
|
||||
//
|
||||
// STYLE NOTES:
|
||||
//
|
||||
// Use CamelCase CMsgMyMessageName style names for messages.
|
||||
//
|
||||
// Use lowercase _ delimited names like my_steam_id for field names, this is non-standard for Steam,
|
||||
// but plays nice with the Google formatted code generation.
|
||||
//
|
||||
// Try not to use required fields ever. Only do so if you are really really sure you'll never want them removed.
|
||||
// Optional should be preffered as it will make versioning easier and cleaner in the future if someone refactors
|
||||
// your message and wants to remove or rename fields.
|
||||
//
|
||||
// Use fixed64 for JobId_t, GID_t, or SteamID. This is appropriate for any field that is normally
|
||||
// going to be larger than 2^56. Otherwise use int64 for 64 bit values that are frequently smaller
|
||||
// than 2^56 as it will safe space on the wire in those cases.
|
||||
//
|
||||
// Similar to fixed64, use fixed32 for RTime32 or other 32 bit values that are frequently larger than
|
||||
// 2^28. It will safe space in those cases, otherwise use int32 which will safe space for smaller values.
|
||||
// An exception to this rule for RTime32 is if the value will frequently be zero rather than set to an actual
|
||||
// time.
|
||||
//
|
||||
|
||||
// for CMsgVector, etc.
|
||||
import "networkbasetypes.proto";
|
||||
|
||||
//=============================================================================
|
||||
// Client messages
|
||||
//=============================================================================
|
||||
|
||||
enum CLC_Messages
|
||||
{
|
||||
clc_ClientInfo = 8; // client info (table CRC etc)
|
||||
clc_Move = 9; // [CUserCmd]
|
||||
clc_VoiceData = 10; // Voicestream data from a client
|
||||
clc_BaselineAck = 11; // client acknowledges a new baseline seqnr
|
||||
clc_ListenEvents = 12; // client acknowledges a new baseline seqnr
|
||||
clc_RespondCvarValue = 13; // client is responding to a svc_GetCvarValue message.
|
||||
clc_FileCRCCheck = 14; // client is sending a file's CRC to the server to be verified.
|
||||
clc_LoadingProgress = 15; // client loading progress
|
||||
clc_SplitPlayerConnect = 16;
|
||||
clc_ClientMessage = 17;
|
||||
}
|
||||
|
||||
message CCLCMsg_ClientInfo
|
||||
{
|
||||
optional fixed32 send_table_crc = 1;
|
||||
optional uint32 server_count = 2;
|
||||
optional bool is_hltv = 3;
|
||||
optional bool is_replay = 4;
|
||||
optional uint32 friends_id = 5;
|
||||
optional string friends_name = 6;
|
||||
repeated fixed32 custom_files = 7;
|
||||
}
|
||||
|
||||
message CCLCMsg_Move
|
||||
{
|
||||
optional uint32 num_backup_commands = 1; // new commands = user_cmds_size() - num_backup_commands
|
||||
optional uint32 num_new_commands = 2;
|
||||
optional bytes data = 3;
|
||||
}
|
||||
|
||||
enum VoiceDataFormat_t
|
||||
{
|
||||
VOICEDATA_FORMAT_STEAM = 0;
|
||||
VOICEDATA_FORMAT_ENGINE = 1;
|
||||
}
|
||||
|
||||
message CCLCMsg_VoiceData
|
||||
{
|
||||
optional bytes data = 1;
|
||||
optional fixed64 xuid = 2;
|
||||
optional VoiceDataFormat_t format = 3 [default = VOICEDATA_FORMAT_STEAM];
|
||||
optional int32 sequence_bytes = 4;
|
||||
optional uint32 section_number = 5;
|
||||
optional uint32 uncompressed_sample_offset = 6;
|
||||
optional uint32 tick = 7;
|
||||
}
|
||||
|
||||
message CCLCMsg_BaselineAck
|
||||
{
|
||||
optional int32 baseline_tick = 1;
|
||||
optional int32 baseline_nr = 2;
|
||||
}
|
||||
|
||||
message CCLCMsg_ListenEvents
|
||||
{
|
||||
repeated fixed32 event_mask = 1;
|
||||
}
|
||||
|
||||
message CCLCMsg_RespondCvarValue
|
||||
{
|
||||
optional int32 cookie = 1; // QueryCvarCookie_t
|
||||
optional int32 status_code = 2; // EQueryCvarValueStatus
|
||||
optional string name = 3;
|
||||
optional string value = 4;
|
||||
}
|
||||
|
||||
message CCLCMsg_FileCRCCheck
|
||||
{
|
||||
optional int32 code_path = 1;
|
||||
optional string path = 2;
|
||||
optional int32 code_filename = 3;
|
||||
optional string filename = 4;
|
||||
optional fixed32 crc = 5;
|
||||
}
|
||||
|
||||
message CCLCMsg_LoadingProgress
|
||||
{
|
||||
optional int32 progress = 1;
|
||||
}
|
||||
|
||||
message CCLCMsg_SplitPlayerConnect
|
||||
{
|
||||
optional CMsg_CVars convars = 1;
|
||||
}
|
||||
|
||||
message CCLCMsg_ClientMessage
|
||||
{
|
||||
optional int32 msg_type = 1;
|
||||
optional bytes data = 2;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
// Server messages
|
||||
//=============================================================================
|
||||
|
||||
enum SVC_Messages
|
||||
{
|
||||
svc_ServerInfo = 8; // first message from server about game; map etc
|
||||
svc_SendTable = 9; // sends a sendtable description for a game class
|
||||
svc_ClassInfo = 10; // Info about classes (first byte is a CLASSINFO_ define).
|
||||
svc_SetPause = 11; // tells client if server paused or unpaused
|
||||
svc_CreateStringTable = 12; // inits shared string tables
|
||||
svc_UpdateStringTable = 13; // updates a string table
|
||||
svc_VoiceInit = 14; // inits used voice codecs & quality
|
||||
svc_VoiceData = 15; // Voicestream data from the server
|
||||
svc_Print = 16; // print text to console
|
||||
svc_Sounds = 17; // starts playing sound
|
||||
svc_SetView = 18; // sets entity as point of view
|
||||
svc_FixAngle = 19; // sets/corrects players viewangle
|
||||
svc_CrosshairAngle = 20; // adjusts crosshair in auto aim mode to lock on traget
|
||||
svc_BSPDecal = 21; // add a static decal to the world BSP
|
||||
svc_SplitScreen = 22; // split screen style message
|
||||
svc_UserMessage = 23; // a game specific message
|
||||
svc_EntityMessage = 24; // a message for an entity
|
||||
svc_GameEvent = 25; // global game event fired
|
||||
svc_PacketEntities = 26; // non-delta compressed entities
|
||||
svc_TempEntities = 27; // non-reliable event object
|
||||
svc_Prefetch = 28; // only sound indices for now
|
||||
svc_Menu = 29; // display a menu from a plugin
|
||||
svc_GameEventList = 30; // list of known games events and fields
|
||||
svc_GetCvarValue = 31; // Server wants to know the value of a cvar on the client
|
||||
svc_PacketReliable = 32;
|
||||
svc_FullFrameSplit = 33;
|
||||
}
|
||||
|
||||
message CSVCMsg_ServerInfo
|
||||
{
|
||||
optional int32 protocol = 1; // protocol version
|
||||
optional int32 server_count = 2; // number of changelevels since server start
|
||||
optional bool is_dedicated = 3; // dedicated server ?
|
||||
optional bool is_hltv = 4; // HLTV server ?
|
||||
optional bool is_replay = 5; // Replay server ?
|
||||
optional int32 c_os = 6; // L = linux, W = Win32
|
||||
optional fixed32 map_crc = 7; // server map CRC
|
||||
optional fixed32 client_crc = 8; // client.dll CRC server is using
|
||||
optional fixed32 string_table_crc = 9; // string table CRC server is using
|
||||
optional int32 max_clients = 10; // max number of clients on server
|
||||
optional int32 max_classes = 11; // max number of server classes
|
||||
optional int32 player_slot = 12; // our client slot number
|
||||
optional float tick_interval = 13; // server tick interval
|
||||
optional string game_dir = 14; // game directory eg "tf2"
|
||||
optional string map_name = 15; // name of current map
|
||||
optional string sky_name = 16; // name of current skybox
|
||||
optional string host_name = 17; // server name
|
||||
optional string addon_name = 18;
|
||||
}
|
||||
|
||||
message CSVCMsg_ClassInfo
|
||||
{
|
||||
message class_t
|
||||
{
|
||||
optional int32 class_id = 1;
|
||||
optional string data_table_name = 2;
|
||||
optional string class_name = 3;
|
||||
}
|
||||
|
||||
optional bool create_on_client = 1;
|
||||
repeated class_t classes = 2;
|
||||
}
|
||||
|
||||
message CSVCMsg_SetPause
|
||||
{
|
||||
optional bool paused = 1;
|
||||
}
|
||||
|
||||
message CSVCMsg_VoiceInit
|
||||
{
|
||||
optional int32 quality = 1;
|
||||
optional string codec = 2;
|
||||
optional int32 version = 3 [default = 0];
|
||||
}
|
||||
|
||||
message CSVCMsg_Print
|
||||
{
|
||||
optional string text = 1;
|
||||
}
|
||||
|
||||
message CSVCMsg_Sounds
|
||||
{
|
||||
message sounddata_t
|
||||
{
|
||||
optional sint32 origin_x = 1;
|
||||
optional sint32 origin_y = 2;
|
||||
optional sint32 origin_z = 3;
|
||||
optional uint32 volume = 4;
|
||||
optional float delay_value = 5;
|
||||
optional int32 sequence_number = 6;
|
||||
optional int32 entity_index = 7;
|
||||
optional int32 channel = 8;
|
||||
optional int32 pitch = 9;
|
||||
optional int32 flags = 10;
|
||||
optional uint32 sound_num = 11;
|
||||
optional fixed32 sound_num_handle = 12;
|
||||
optional int32 speaker_entity = 13;
|
||||
optional int32 random_seed = 14;
|
||||
optional int32 sound_level = 15; // soundlevel_t
|
||||
optional bool is_sentence = 16;
|
||||
optional bool is_ambient = 17;
|
||||
};
|
||||
|
||||
optional bool reliable_sound = 1;
|
||||
repeated sounddata_t sounds = 2;
|
||||
}
|
||||
|
||||
message CSVCMsg_Prefetch
|
||||
{
|
||||
optional int32 sound_index = 1;
|
||||
}
|
||||
|
||||
message CSVCMsg_SetView
|
||||
{
|
||||
optional int32 entity_index = 1;
|
||||
}
|
||||
|
||||
message CSVCMsg_FixAngle
|
||||
{
|
||||
optional bool relative = 1;
|
||||
optional CMsgQAngle angle = 2;
|
||||
}
|
||||
|
||||
message CSVCMsg_CrosshairAngle
|
||||
{
|
||||
optional CMsgQAngle angle = 1;
|
||||
}
|
||||
|
||||
message CSVCMsg_BSPDecal
|
||||
{
|
||||
optional CMsgVector pos = 1;
|
||||
optional int32 decal_texture_index = 2;
|
||||
optional int32 entity_index = 3;
|
||||
optional int32 model_index = 4;
|
||||
optional bool low_priority = 5;
|
||||
}
|
||||
|
||||
enum ESplitScreenMessageType
|
||||
{
|
||||
MSG_SPLITSCREEN_ADDUSER = 0;
|
||||
MSG_SPLITSCREEN_REMOVEUSER = 1;
|
||||
};
|
||||
|
||||
message CSVCMsg_SplitScreen
|
||||
{
|
||||
optional ESplitScreenMessageType type = 1 [default = MSG_SPLITSCREEN_ADDUSER];
|
||||
optional int32 slot = 2;
|
||||
optional int32 player_index = 3;
|
||||
}
|
||||
|
||||
message CSVCMsg_GetCvarValue
|
||||
{
|
||||
optional int32 cookie = 1; // QueryCvarCookie_t
|
||||
optional string cvar_name = 2;
|
||||
}
|
||||
|
||||
message CSVCMsg_Menu
|
||||
{
|
||||
optional int32 dialog_type = 1; // DIALOG_TYPE
|
||||
optional bytes menu_key_values = 2; // KeyValues.WriteAsBinary()
|
||||
}
|
||||
|
||||
message CSVCMsg_SendTable
|
||||
{
|
||||
message sendprop_t
|
||||
{
|
||||
optional int32 type = 1; // SendPropType
|
||||
optional string var_name = 2;
|
||||
optional int32 flags = 3;
|
||||
optional int32 priority = 4;
|
||||
optional string dt_name = 5; // if pProp->m_Type == DPT_DataTable || IsExcludeProp
|
||||
optional int32 num_elements = 6; // else if pProp->m_Type == DPT_Array
|
||||
optional float low_value = 7; // else ...
|
||||
optional float high_value = 8; // ...
|
||||
optional int32 num_bits = 9; // ...
|
||||
};
|
||||
|
||||
optional bool is_end = 1;
|
||||
optional string net_table_name = 2;
|
||||
optional bool needs_decoder = 3;
|
||||
repeated sendprop_t props = 4;
|
||||
}
|
||||
|
||||
message CSVCMsg_GameEventList
|
||||
{
|
||||
message key_t
|
||||
{
|
||||
optional int32 type = 1;
|
||||
optional string name = 2;
|
||||
};
|
||||
|
||||
message descriptor_t
|
||||
{
|
||||
optional int32 eventid = 1;
|
||||
optional string name = 2;
|
||||
repeated key_t keys = 3;
|
||||
};
|
||||
|
||||
repeated descriptor_t descriptors = 1;
|
||||
}
|
||||
|
||||
message CSVCMsg_PacketEntities
|
||||
{
|
||||
optional int32 max_entries = 1;
|
||||
optional int32 updated_entries = 2;
|
||||
optional bool is_delta = 3;
|
||||
optional bool update_baseline = 4;
|
||||
optional int32 baseline = 5;
|
||||
optional int32 delta_from = 6;
|
||||
optional bytes entity_data = 7;
|
||||
optional bool pending_full_frame = 8;
|
||||
}
|
||||
|
||||
message CSVCMsg_TempEntities
|
||||
{
|
||||
optional bool reliable = 1;
|
||||
optional int32 num_entries = 2;
|
||||
optional bytes entity_data = 3;
|
||||
}
|
||||
|
||||
message CSVCMsg_CreateStringTable
|
||||
{
|
||||
optional string name = 1;
|
||||
optional int32 max_entries = 2;
|
||||
optional int32 num_entries = 3;
|
||||
optional bool user_data_fixed_size = 4;
|
||||
optional int32 user_data_size = 5;
|
||||
optional int32 user_data_size_bits = 6;
|
||||
optional int32 flags = 7;
|
||||
optional bytes string_data = 8;
|
||||
}
|
||||
|
||||
message CSVCMsg_UpdateStringTable
|
||||
{
|
||||
optional int32 table_id = 1;
|
||||
optional int32 num_changed_entries = 2;
|
||||
optional bytes string_data = 3;
|
||||
}
|
||||
|
||||
message CSVCMsg_VoiceData
|
||||
{
|
||||
optional int32 client = 1;
|
||||
optional bool proximity = 2;
|
||||
optional fixed64 xuid = 3;
|
||||
optional int32 audible_mask = 4;
|
||||
optional bytes voice_data = 5;
|
||||
optional VoiceDataFormat_t format = 6 [default = VOICEDATA_FORMAT_STEAM];
|
||||
optional int32 sequence_bytes = 7;
|
||||
optional uint32 section_number = 8;
|
||||
optional uint32 uncompressed_sample_offset = 9;
|
||||
optional uint32 tick = 10;
|
||||
}
|
||||
|
||||
message CSVCMsg_PacketReliable
|
||||
{
|
||||
optional int32 tick = 1;
|
||||
optional int32 messagessize = 2;
|
||||
}
|
||||
|
||||
message CSVCMsg_FullFrameSplit
|
||||
{
|
||||
optional int32 tick = 1;
|
||||
optional int32 section = 2;
|
||||
optional int32 total = 3;
|
||||
optional bytes data = 4;
|
||||
}
|
||||
import "networkbasetypes.proto";
|
||||
|
||||
option cc_generic_services = false;
|
||||
|
||||
enum CLC_Messages {
|
||||
clc_ClientInfo = 20;
|
||||
clc_Move = 21;
|
||||
clc_VoiceData = 22;
|
||||
clc_BaselineAck = 23;
|
||||
clc_ListenEvents = 24;
|
||||
clc_RespondCvarValue = 25;
|
||||
clc_FileCRCCheck = 26;
|
||||
clc_LoadingProgress = 27;
|
||||
clc_SplitPlayerConnect = 28;
|
||||
clc_ClientMessage = 29;
|
||||
clc_SplitPlayerDisconnect = 30;
|
||||
clc_ServerStatus = 31;
|
||||
clc_ServerPing = 32;
|
||||
clc_RequestPause = 33;
|
||||
clc_CmdKeyValues = 34;
|
||||
}
|
||||
|
||||
enum SVC_Messages {
|
||||
svc_ServerInfo = 40;
|
||||
svc_FlattenedSerializer = 41;
|
||||
svc_ClassInfo = 42;
|
||||
svc_SetPause = 43;
|
||||
svc_CreateStringTable = 44;
|
||||
svc_UpdateStringTable = 45;
|
||||
svc_VoiceInit = 46;
|
||||
svc_VoiceData = 47;
|
||||
svc_Print = 48;
|
||||
svc_Sounds = 49;
|
||||
svc_SetView = 50;
|
||||
svc_ClearAllStringTables = 51;
|
||||
svc_CmdKeyValues = 52;
|
||||
svc_BSPDecal = 53;
|
||||
svc_SplitScreen = 54;
|
||||
svc_PacketEntities = 55;
|
||||
svc_Prefetch = 56;
|
||||
svc_Menu = 57;
|
||||
svc_GetCvarValue = 58;
|
||||
svc_StopSound = 59;
|
||||
svc_PeerList = 60;
|
||||
svc_PacketReliable = 61;
|
||||
svc_UserMessage = 62;
|
||||
svc_SendTable = 63;
|
||||
svc_GameEvent = 67;
|
||||
svc_TempEntities = 68;
|
||||
svc_GameEventList = 69;
|
||||
svc_FullFrameSplit = 70;
|
||||
}
|
||||
|
||||
enum VoiceDataFormat_t {
|
||||
VOICEDATA_FORMAT_STEAM = 0;
|
||||
VOICEDATA_FORMAT_ENGINE = 1;
|
||||
}
|
||||
|
||||
enum RequestPause_t {
|
||||
RP_PAUSE = 0;
|
||||
RP_UNPAUSE = 1;
|
||||
RP_TOGGLEPAUSE = 2;
|
||||
}
|
||||
|
||||
enum PrefetchType {
|
||||
PFT_SOUND = 0;
|
||||
}
|
||||
|
||||
enum ESplitScreenMessageType {
|
||||
MSG_SPLITSCREEN_ADDUSER = 0;
|
||||
MSG_SPLITSCREEN_REMOVEUSER = 1;
|
||||
}
|
||||
|
||||
enum EQueryCvarValueStatus {
|
||||
eQueryCvarValueStatus_ValueIntact = 0;
|
||||
eQueryCvarValueStatus_CvarNotFound = 1;
|
||||
eQueryCvarValueStatus_NotACvar = 2;
|
||||
eQueryCvarValueStatus_CvarProtected = 3;
|
||||
}
|
||||
|
||||
enum DIALOG_TYPE {
|
||||
DIALOG_MSG = 0;
|
||||
DIALOG_MENU = 1;
|
||||
DIALOG_TEXT = 2;
|
||||
DIALOG_ENTRY = 3;
|
||||
DIALOG_ASKCONNECT = 4;
|
||||
}
|
||||
|
||||
enum SVC_Messages_LowFrequency {
|
||||
svc_dummy = 600;
|
||||
}
|
||||
|
||||
enum Bidirectional_Messages {
|
||||
bi_RebroadcastGameEvent = 16;
|
||||
bi_RebroadcastSource = 17;
|
||||
bi_GameEvent = 18;
|
||||
}
|
||||
|
||||
enum Bidirectional_Messages_LowFrequency {
|
||||
bi_RelayInfo = 700;
|
||||
bi_RelayPacket = 701;
|
||||
}
|
||||
|
||||
message CCLCMsg_ClientInfo {
|
||||
optional fixed32 send_table_crc = 1;
|
||||
optional uint32 server_count = 2;
|
||||
optional bool is_hltv = 3;
|
||||
optional bool is_replay = 4;
|
||||
optional uint32 friends_id = 5;
|
||||
optional string friends_name = 6;
|
||||
repeated fixed32 custom_files = 7;
|
||||
}
|
||||
|
||||
message CCLCMsg_Move {
|
||||
optional uint32 num_backup_commands = 1;
|
||||
optional uint32 num_new_commands = 2;
|
||||
optional bytes data = 3;
|
||||
}
|
||||
|
||||
message CMsgVoiceAudio {
|
||||
optional .VoiceDataFormat_t format = 1 [default = VOICEDATA_FORMAT_STEAM];
|
||||
optional bytes voice_data = 2;
|
||||
optional int32 sequence_bytes = 3;
|
||||
optional uint32 section_number = 4;
|
||||
optional uint32 sample_rate = 5;
|
||||
optional uint32 uncompressed_sample_offset = 6;
|
||||
}
|
||||
|
||||
message CCLCMsg_VoiceData {
|
||||
optional .CMsgVoiceAudio audio = 1;
|
||||
optional fixed64 xuid = 2;
|
||||
optional uint32 tick = 3;
|
||||
}
|
||||
|
||||
message CCLCMsg_BaselineAck {
|
||||
optional int32 baseline_tick = 1;
|
||||
optional int32 baseline_nr = 2;
|
||||
}
|
||||
|
||||
message CCLCMsg_ListenEvents {
|
||||
repeated fixed32 event_mask = 1;
|
||||
}
|
||||
|
||||
message CCLCMsg_RespondCvarValue {
|
||||
optional int32 cookie = 1;
|
||||
optional int32 status_code = 2;
|
||||
optional string name = 3;
|
||||
optional string value = 4;
|
||||
}
|
||||
|
||||
message CCLCMsg_FileCRCCheck {
|
||||
optional int32 code_path = 1;
|
||||
optional string path = 2;
|
||||
optional int32 code_filename = 3;
|
||||
optional string filename = 4;
|
||||
optional fixed32 crc = 5;
|
||||
}
|
||||
|
||||
message CCLCMsg_LoadingProgress {
|
||||
optional int32 progress = 1;
|
||||
}
|
||||
|
||||
message CCLCMsg_SplitPlayerConnect {
|
||||
optional string playername = 1;
|
||||
}
|
||||
|
||||
message CCLCMsg_ClientMessage {
|
||||
optional int32 msg_type = 1;
|
||||
optional bytes data = 2;
|
||||
}
|
||||
|
||||
message CCLCMsg_SplitPlayerDisconnect {
|
||||
optional int32 slot = 1;
|
||||
}
|
||||
|
||||
message CCLCMsg_ServerStatus {
|
||||
optional bool simplified = 1;
|
||||
}
|
||||
|
||||
message CCLCMsg_ServerPing {
|
||||
}
|
||||
|
||||
message CCLCMsg_RequestPause {
|
||||
optional .RequestPause_t pause_type = 1 [default = RP_PAUSE];
|
||||
optional int32 pause_group = 2;
|
||||
}
|
||||
|
||||
message CCLCMsg_CmdKeyValues {
|
||||
optional bytes data = 1;
|
||||
}
|
||||
|
||||
message CSVCMsg_ServerInfo {
|
||||
optional int32 protocol = 1;
|
||||
optional int32 server_count = 2;
|
||||
optional bool is_dedicated = 3;
|
||||
optional bool is_hltv = 4;
|
||||
optional bool is_replay = 5;
|
||||
optional int32 c_os = 6;
|
||||
optional fixed32 map_crc = 7;
|
||||
optional fixed32 client_crc = 8;
|
||||
optional fixed32 string_table_crc = 9;
|
||||
optional int32 max_clients = 10;
|
||||
optional int32 max_classes = 11;
|
||||
optional int32 player_slot = 12;
|
||||
optional float tick_interval = 13;
|
||||
optional string game_dir = 14;
|
||||
optional string map_name = 15;
|
||||
optional string sky_name = 16;
|
||||
optional string host_name = 17;
|
||||
optional string addon_name = 18;
|
||||
optional .CSVCMsg_GameSessionConfiguration game_session_config = 19;
|
||||
optional bytes game_session_manifest = 20;
|
||||
}
|
||||
|
||||
message CSVCMsg_ClassInfo {
|
||||
message class_t {
|
||||
optional int32 class_id = 1;
|
||||
optional string data_table_name = 2;
|
||||
optional string class_name = 3;
|
||||
}
|
||||
|
||||
optional bool create_on_client = 1;
|
||||
repeated .CSVCMsg_ClassInfo.class_t classes = 2;
|
||||
}
|
||||
|
||||
message CSVCMsg_SetPause {
|
||||
optional bool paused = 1;
|
||||
}
|
||||
|
||||
message CSVCMsg_VoiceInit {
|
||||
optional int32 quality = 1;
|
||||
optional string codec = 2;
|
||||
optional int32 version = 3 [default = 0];
|
||||
}
|
||||
|
||||
message CSVCMsg_Print {
|
||||
optional string text = 1;
|
||||
}
|
||||
|
||||
message CSVCMsg_Sounds {
|
||||
message sounddata_t {
|
||||
optional sint32 origin_x = 1;
|
||||
optional sint32 origin_y = 2;
|
||||
optional sint32 origin_z = 3;
|
||||
optional uint32 volume = 4;
|
||||
optional float delay_value = 5;
|
||||
optional int32 sequence_number = 6;
|
||||
optional int32 entity_index = 7;
|
||||
optional int32 channel = 8;
|
||||
optional int32 pitch = 9;
|
||||
optional int32 flags = 10;
|
||||
optional uint32 sound_num = 11;
|
||||
optional fixed32 sound_num_handle = 12;
|
||||
optional int32 speaker_entity = 13;
|
||||
optional int32 random_seed = 14;
|
||||
optional int32 sound_level = 15;
|
||||
optional bool is_sentence = 16;
|
||||
optional bool is_ambient = 17;
|
||||
optional uint32 guid = 18;
|
||||
optional fixed64 sound_resource_id = 19;
|
||||
}
|
||||
|
||||
optional bool reliable_sound = 1;
|
||||
repeated .CSVCMsg_Sounds.sounddata_t sounds = 2;
|
||||
}
|
||||
|
||||
message CSVCMsg_Prefetch {
|
||||
optional int32 sound_index = 1;
|
||||
optional .PrefetchType resource_type = 2 [default = PFT_SOUND];
|
||||
}
|
||||
|
||||
message CSVCMsg_SetView {
|
||||
optional int32 entity_index = 1;
|
||||
optional int32 slot = 2;
|
||||
}
|
||||
|
||||
message CSVCMsg_FixAngle {
|
||||
optional bool relative = 1;
|
||||
optional .CMsgQAngle angle = 2;
|
||||
}
|
||||
|
||||
message CSVCMsg_CrosshairAngle {
|
||||
optional .CMsgQAngle angle = 1;
|
||||
}
|
||||
|
||||
message CSVCMsg_BSPDecal {
|
||||
optional .CMsgVector pos = 1;
|
||||
optional int32 decal_texture_index = 2;
|
||||
optional int32 entity_index = 3;
|
||||
optional int32 model_index = 4;
|
||||
optional bool low_priority = 5;
|
||||
}
|
||||
|
||||
message CSVCMsg_SplitScreen {
|
||||
optional .ESplitScreenMessageType type = 1 [default = MSG_SPLITSCREEN_ADDUSER];
|
||||
optional int32 slot = 2;
|
||||
optional int32 player_index = 3;
|
||||
}
|
||||
|
||||
message CSVCMsg_GetCvarValue {
|
||||
optional int32 cookie = 1;
|
||||
optional string cvar_name = 2;
|
||||
}
|
||||
|
||||
message CSVCMsg_Menu {
|
||||
optional int32 dialog_type = 1;
|
||||
optional bytes menu_key_values = 2;
|
||||
}
|
||||
|
||||
message CSVCMsg_SendTable {
|
||||
message sendprop_t {
|
||||
optional int32 type = 1;
|
||||
optional string var_name = 2;
|
||||
optional int32 flags = 3;
|
||||
optional int32 priority = 4;
|
||||
optional string dt_name = 5;
|
||||
optional int32 num_elements = 6;
|
||||
optional float low_value = 7;
|
||||
optional float high_value = 8;
|
||||
optional int32 num_bits = 9;
|
||||
}
|
||||
|
||||
optional bool is_end = 1;
|
||||
optional string net_table_name = 2;
|
||||
optional bool needs_decoder = 3;
|
||||
repeated .CSVCMsg_SendTable.sendprop_t props = 4;
|
||||
}
|
||||
|
||||
message CSVCMsg_GameEventList {
|
||||
message key_t {
|
||||
optional int32 type = 1;
|
||||
optional string name = 2;
|
||||
}
|
||||
|
||||
message descriptor_t {
|
||||
optional int32 eventid = 1;
|
||||
optional string name = 2;
|
||||
repeated .CSVCMsg_GameEventList.key_t keys = 3;
|
||||
}
|
||||
|
||||
repeated .CSVCMsg_GameEventList.descriptor_t descriptors = 1;
|
||||
}
|
||||
|
||||
message CSVCMsg_PacketEntities {
|
||||
optional int32 max_entries = 1;
|
||||
optional int32 updated_entries = 2;
|
||||
optional bool is_delta = 3;
|
||||
optional bool update_baseline = 4;
|
||||
optional int32 baseline = 5;
|
||||
optional int32 delta_from = 6;
|
||||
optional bytes entity_data = 7;
|
||||
optional bool pending_full_frame = 8;
|
||||
optional uint32 active_spawngroup_handle = 9;
|
||||
optional uint32 max_spawngroup_creationsequence = 10;
|
||||
}
|
||||
|
||||
message CSVCMsg_TempEntities {
|
||||
optional bool reliable = 1;
|
||||
optional int32 num_entries = 2;
|
||||
optional bytes entity_data = 3;
|
||||
}
|
||||
|
||||
message CSVCMsg_CreateStringTable {
|
||||
optional string name = 1;
|
||||
optional int32 num_entries = 2;
|
||||
optional bool user_data_fixed_size = 3;
|
||||
optional int32 user_data_size = 4;
|
||||
optional int32 user_data_size_bits = 5;
|
||||
optional int32 flags = 6;
|
||||
optional bytes string_data = 7;
|
||||
optional int32 uncompressed_size = 8;
|
||||
optional bool data_compressed = 9;
|
||||
}
|
||||
|
||||
message CSVCMsg_UpdateStringTable {
|
||||
optional int32 table_id = 1;
|
||||
optional int32 num_changed_entries = 2;
|
||||
optional bytes string_data = 3;
|
||||
}
|
||||
|
||||
message CSVCMsg_VoiceData {
|
||||
optional .CMsgVoiceAudio audio = 1;
|
||||
optional int32 client = 2;
|
||||
optional bool proximity = 3;
|
||||
optional fixed64 xuid = 4;
|
||||
optional int32 audible_mask = 5;
|
||||
optional uint32 tick = 6;
|
||||
}
|
||||
|
||||
message CSVCMsg_PacketReliable {
|
||||
optional int32 tick = 1;
|
||||
optional int32 messagessize = 2;
|
||||
optional bool state = 3;
|
||||
}
|
||||
|
||||
message CSVCMsg_FullFrameSplit {
|
||||
optional int32 tick = 1;
|
||||
optional int32 section = 2;
|
||||
optional int32 total = 3;
|
||||
optional bytes data = 4;
|
||||
}
|
||||
|
||||
message CSVCMsg_CmdKeyValues {
|
||||
optional bytes data = 1;
|
||||
}
|
||||
|
||||
message CMsgIPCAddress {
|
||||
optional fixed64 computer_guid = 1;
|
||||
optional uint32 process_id = 2;
|
||||
}
|
||||
|
||||
message CMsgServerPeer {
|
||||
optional int32 player_slot = 1;
|
||||
optional fixed64 steamid = 2;
|
||||
optional .CMsgIPCAddress ipc = 3;
|
||||
optional bool they_hear_you = 4;
|
||||
optional bool you_hear_them = 5;
|
||||
optional bool is_listenserver_host = 6;
|
||||
}
|
||||
|
||||
message CSVCMsg_PeerList {
|
||||
repeated .CMsgServerPeer peer = 1;
|
||||
}
|
||||
|
||||
message CSVCMsg_ClearAllStringTables {
|
||||
optional string mapname = 1;
|
||||
optional uint32 map_crc = 2;
|
||||
}
|
||||
|
||||
message ProtoFlattenedSerializerField_t {
|
||||
optional int32 var_type_sym = 1;
|
||||
optional int32 var_name_sym = 2;
|
||||
optional int32 bit_count = 3;
|
||||
optional float low_value = 4;
|
||||
optional float high_value = 5;
|
||||
optional int32 encode_flags = 6;
|
||||
optional int32 field_serializer_name_sym = 7;
|
||||
optional int32 field_serializer_version = 8;
|
||||
optional int32 send_node_sym = 9;
|
||||
}
|
||||
|
||||
message ProtoFlattenedSerializer_t {
|
||||
optional int32 serializer_name_sym = 1;
|
||||
optional int32 serializer_version = 2;
|
||||
repeated int32 fields_index = 3;
|
||||
}
|
||||
|
||||
message CSVCMsg_FlattenedSerializer {
|
||||
repeated .ProtoFlattenedSerializer_t serializers = 1;
|
||||
repeated string symbols = 2;
|
||||
repeated .ProtoFlattenedSerializerField_t fields = 3;
|
||||
}
|
||||
|
||||
message CSVCMsg_StopSound {
|
||||
optional fixed32 guid = 1;
|
||||
}
|
||||
|
||||
message CBidirMsg_RebroadcastGameEvent {
|
||||
optional bool posttoserver = 1;
|
||||
optional int32 buftype = 2;
|
||||
optional uint32 clientbitcount = 3;
|
||||
optional uint64 receivingclients = 4;
|
||||
}
|
||||
|
||||
message CBidirMsg_RebroadcastSource {
|
||||
optional int32 eventsource = 1;
|
||||
}
|
||||
|
||||
message SerializedNetAddress_t {
|
||||
required bytes serializedAddress = 1;
|
||||
}
|
||||
|
||||
message CBidirMsg_RelayInfo {
|
||||
enum Operation_t {
|
||||
RIO_REQUEST_RELAY = 0;
|
||||
RIO_WILL_RELAY = 1;
|
||||
RIO_NO_ROUTE = 2;
|
||||
RIO_REJECT_RELAY = 3;
|
||||
RIO_ESTABLISH_CONNECTION = 4;
|
||||
}
|
||||
|
||||
required .CBidirMsg_RelayInfo.Operation_t operation = 1 [default = RIO_REQUEST_RELAY];
|
||||
optional .SerializedNetAddress_t serializedTargetAddress = 2;
|
||||
optional uint32 additionalHops = 3;
|
||||
}
|
||||
|
||||
message SignedPayload_t {
|
||||
required bytes payloadData = 1;
|
||||
required uint32 signature = 2;
|
||||
required bool bPayloadEncrypted = 3;
|
||||
}
|
||||
|
||||
message CBidirMsg_RelayPacket {
|
||||
message SignedDestinationAddress_t {
|
||||
required .SerializedNetAddress_t serializedAddr = 1;
|
||||
required uint32 signature = 2;
|
||||
optional bytes encryptedPayloadKey = 3;
|
||||
}
|
||||
|
||||
required uint32 prevhopcount = 1;
|
||||
required .SerializedNetAddress_t originalSender = 2;
|
||||
required .SignedPayload_t signedPayload = 3;
|
||||
repeated .CBidirMsg_RelayPacket.SignedDestinationAddress_t recipientList = 4;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ void protobuf_AddDesc_network_5fconnection_2eproto() {
|
||||
::google::protobuf::protobuf_AddDesc_google_2fprotobuf_2fdescriptor_2eproto();
|
||||
::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
|
||||
"\n\030network_connection.proto\032 google/proto"
|
||||
"buf/descriptor.proto*\217 \n\033ENetworkDisconn"
|
||||
"buf/descriptor.proto*\241*\n\033ENetworkDisconn"
|
||||
"ectionReason\022\036\n\032NETWORK_DISCONNECT_INVAL"
|
||||
"ID\020\000\022\037\n\033NETWORK_DISCONNECT_SHUTDOWN\020\001\022F\n"
|
||||
"%NETWORK_DISCONNECT_DISCONNECT_BY_USER\020\002"
|
||||
@@ -161,9 +161,41 @@ void protobuf_AddDesc_network_5fconnection_2eproto() {
|
||||
"ailure\022Y\n)NETWORK_DISCONNECT_NO_PEER_GRO"
|
||||
"UP_HANDLERS\0204\032*\242\324\030&#GameUI_Disconnect_No"
|
||||
"PeerGroupHandlers\022#\n\037NETWORK_DISCONNECT_"
|
||||
"RECONNECTION\0205:E\n\030network_connection_tok"
|
||||
"en\022!.google.protobuf.EnumValueOptions\030\304\212"
|
||||
"\003 \001(\tB\003\200\001\000", 4250);
|
||||
"RECONNECTION\0205\022H\n\037NETWORK_DISCONNECT_LOO"
|
||||
"PSHUTDOWN\0206\032#\242\324\030\037#GameUI_Disconnect_Loop"
|
||||
"Shutdown\022L\n!NETWORK_DISCONNECT_LOOPDEACT"
|
||||
"IVATE\0207\032%\242\324\030!#GameUI_Disconnect_LoopDeac"
|
||||
"tivate\022H\n\037NETWORK_DISCONNECT_HOST_ENDGAM"
|
||||
"E\0208\032#\242\324\030\037#GameUI_Disconnect_Host_EndGame"
|
||||
"\022\\\n*NETWORK_DISCONNECT_LOOP_LEVELLOAD_AC"
|
||||
"TIVATE\0209\032,\242\324\030(#GameUI_Disconnect_LoopLev"
|
||||
"elLoadActivate\022V\n\'NETWORK_DISCONNECT_CRE"
|
||||
"ATE_SERVER_FAILED\020:\032)\242\324\030%#GameUI_Disconn"
|
||||
"ect_CreateServerFailed\022D\n\032NETWORK_DISCON"
|
||||
"NECT_EXITING\020;\032$\242\324\030 #GameUI_Disconnect_E"
|
||||
"xitingEngine\022T\n)NETWORK_DISCONNECT_REQUE"
|
||||
"ST_HOSTSTATE_IDLE\020<\032%\242\324\030!#GameUI_Disconn"
|
||||
"ect_Request_HSIdle\022\\\n.NETWORK_DISCONNECT"
|
||||
"_REQUEST_HOSTSTATE_HLTVRELAY\020=\032(\242\324\030$#Gam"
|
||||
"eUI_Disconnect_Request_HLTVRelay\022Q\n*NETW"
|
||||
"ORK_DISCONNECT_CLIENT_CONSISTENCY_FAIL\020>"
|
||||
"\032!\242\324\030\035#GameUI_ClientConsistencyFail\022Q\n+N"
|
||||
"ETWORK_DISCONNECT_CLIENT_UNABLE_TO_CRC_M"
|
||||
"AP\020\?\032 \242\324\030\034#GameUI_ClientUnableToCRCMap\022="
|
||||
"\n NETWORK_DISCONNECT_CLIENT_NO_MAP\020@\032\027\242\324"
|
||||
"\030\023#GameUI_ClientNoMap\022K\n\'NETWORK_DISCONN"
|
||||
"ECT_CLIENT_DIFFERENT_MAP\020A\032\036\242\324\030\032#GameUI_"
|
||||
"ClientDifferentMap\022M\n(NETWORK_DISCONNECT"
|
||||
"_SERVER_REQUIRES_STEAM\020B\032\037\242\324\030\033#GameUI_Se"
|
||||
"rverRequireSteams\022M\n\"NETWORK_DISCONNECT_"
|
||||
"STEAM_DENY_MISC\020C\032%\242\324\030!#GameUI_Disconnec"
|
||||
"t_SteamDeny_Misc\022_\n,NETWORK_DISCONNECT_S"
|
||||
"TEAM_DENY_BAD_ANTI_CHEAT\020D\032-\242\324\030)#GameUI_"
|
||||
"Disconnect_SteamDeny_BadAntiCheat\022M\n\"NET"
|
||||
"WORK_DISCONNECT_SERVER_SHUTDOWN\020E\032%\242\324\030!#"
|
||||
"GameUI_Disconnect_ServerShutdown:E\n\030netw"
|
||||
"ork_connection_token\022!.google.protobuf.E"
|
||||
"numValueOptions\030\304\212\003 \001(\tB\003\200\001\000", 5548);
|
||||
::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
|
||||
"network_connection.proto", &protobuf_RegisterTypes);
|
||||
::google::protobuf::internal::ExtensionSet::RegisterExtension(
|
||||
@@ -238,6 +270,22 @@ bool ENetworkDisconnectionReason_IsValid(int value) {
|
||||
case 51:
|
||||
case 52:
|
||||
case 53:
|
||||
case 54:
|
||||
case 55:
|
||||
case 56:
|
||||
case 57:
|
||||
case 58:
|
||||
case 59:
|
||||
case 60:
|
||||
case 61:
|
||||
case 62:
|
||||
case 63:
|
||||
case 64:
|
||||
case 65:
|
||||
case 66:
|
||||
case 67:
|
||||
case 68:
|
||||
case 69:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
|
||||
@@ -86,11 +86,27 @@ enum ENetworkDisconnectionReason {
|
||||
NETWORK_DISCONNECT_DIRECT_CONNECT_RESERVATION = 50,
|
||||
NETWORK_DISCONNECT_CONNECTION_FAILURE = 51,
|
||||
NETWORK_DISCONNECT_NO_PEER_GROUP_HANDLERS = 52,
|
||||
NETWORK_DISCONNECT_RECONNECTION = 53
|
||||
NETWORK_DISCONNECT_RECONNECTION = 53,
|
||||
NETWORK_DISCONNECT_LOOPSHUTDOWN = 54,
|
||||
NETWORK_DISCONNECT_LOOPDEACTIVATE = 55,
|
||||
NETWORK_DISCONNECT_HOST_ENDGAME = 56,
|
||||
NETWORK_DISCONNECT_LOOP_LEVELLOAD_ACTIVATE = 57,
|
||||
NETWORK_DISCONNECT_CREATE_SERVER_FAILED = 58,
|
||||
NETWORK_DISCONNECT_EXITING = 59,
|
||||
NETWORK_DISCONNECT_REQUEST_HOSTSTATE_IDLE = 60,
|
||||
NETWORK_DISCONNECT_REQUEST_HOSTSTATE_HLTVRELAY = 61,
|
||||
NETWORK_DISCONNECT_CLIENT_CONSISTENCY_FAIL = 62,
|
||||
NETWORK_DISCONNECT_CLIENT_UNABLE_TO_CRC_MAP = 63,
|
||||
NETWORK_DISCONNECT_CLIENT_NO_MAP = 64,
|
||||
NETWORK_DISCONNECT_CLIENT_DIFFERENT_MAP = 65,
|
||||
NETWORK_DISCONNECT_SERVER_REQUIRES_STEAM = 66,
|
||||
NETWORK_DISCONNECT_STEAM_DENY_MISC = 67,
|
||||
NETWORK_DISCONNECT_STEAM_DENY_BAD_ANTI_CHEAT = 68,
|
||||
NETWORK_DISCONNECT_SERVER_SHUTDOWN = 69
|
||||
};
|
||||
bool ENetworkDisconnectionReason_IsValid(int value);
|
||||
const ENetworkDisconnectionReason ENetworkDisconnectionReason_MIN = NETWORK_DISCONNECT_INVALID;
|
||||
const ENetworkDisconnectionReason ENetworkDisconnectionReason_MAX = NETWORK_DISCONNECT_RECONNECTION;
|
||||
const ENetworkDisconnectionReason ENetworkDisconnectionReason_MAX = NETWORK_DISCONNECT_SERVER_SHUTDOWN;
|
||||
const int ENetworkDisconnectionReason_ARRAYSIZE = ENetworkDisconnectionReason_MAX + 1;
|
||||
|
||||
const ::google::protobuf::EnumDescriptor* ENetworkDisconnectionReason_descriptor();
|
||||
|
||||
@@ -1,83 +1,12 @@
|
||||
//====== Copyright (c) 2012, Valve Corporation, All rights reserved. ========//
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
// Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
// THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//===========================================================================//
|
||||
//
|
||||
// Purpose: The file defines our Google Protocol Buffers which are used in over
|
||||
// the wire messages for the Source engine.
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
// Note about encoding:
|
||||
// http://code.google.com/apis/protocolbuffers/docs/encoding.html
|
||||
//
|
||||
// TL;DR: Use sint32/sint64 for values that may be negative.
|
||||
//
|
||||
// There is an important difference between the signed int types (sint32 and sint64)
|
||||
// and the "standard" int types (int32 and int64) when it comes to encoding negative
|
||||
// numbers. If you use int32 or int64 as the type for a negative number, the
|
||||
// resulting varint is always ten bytes long – it is, effectively, treated like a
|
||||
// very large unsigned integer. If you use one of the signed types, the resulting
|
||||
// varint uses ZigZag encoding, which is much more efficient.
|
||||
|
||||
|
||||
// Commenting this out allows it to be compiled for SPEED or LITE_RUNTIME.
|
||||
// option optimize_for = SPEED;
|
||||
|
||||
// We don't use the service generation functionality
|
||||
option cc_generic_services = false;
|
||||
|
||||
|
||||
//
|
||||
// STYLE NOTES:
|
||||
//
|
||||
// Use CamelCase CMsgMyMessageName style names for messages.
|
||||
//
|
||||
// Use lowercase _ delimited names like my_steam_id for field names, this is non-standard for Steam,
|
||||
// but plays nice with the Google formatted code generation.
|
||||
//
|
||||
// Try not to use required fields ever. Only do so if you are really really sure you'll never want them removed.
|
||||
// Optional should be preffered as it will make versioning easier and cleaner in the future if someone refactors
|
||||
// your message and wants to remove or rename fields.
|
||||
//
|
||||
// Use fixed64 for JobId_t, GID_t, or SteamID. This is appropriate for any field that is normally
|
||||
// going to be larger than 2^56. Otherwise use int64 for 64 bit values that are frequently smaller
|
||||
// than 2^56 as it will safe space on the wire in those cases.
|
||||
//
|
||||
// Similar to fixed64, use fixed32 for RTime32 or other 32 bit values that are frequently larger than
|
||||
// 2^28. It will safe space in those cases, otherwise use int32 which will safe space for smaller values.
|
||||
// An exception to this rule for RTime32 is if the value will frequently be zero rather than set to an actual
|
||||
// time.
|
||||
//
|
||||
|
||||
import "google/protobuf/descriptor.proto";
|
||||
|
||||
extend .google.protobuf.EnumValueOptions
|
||||
{
|
||||
option cc_generic_services = false;
|
||||
|
||||
extend .google.protobuf.EnumValueOptions {
|
||||
optional string network_connection_token = 50500;
|
||||
}
|
||||
|
||||
enum ENetworkDisconnectionReason
|
||||
{
|
||||
enum ENetworkDisconnectionReason {
|
||||
NETWORK_DISCONNECT_INVALID = 0;
|
||||
NETWORK_DISCONNECT_SHUTDOWN = 1;
|
||||
NETWORK_DISCONNECT_DISCONNECT_BY_USER = 2 [(network_connection_token) = "#GameUI_Disconnect_User"];
|
||||
@@ -132,5 +61,21 @@ enum ENetworkDisconnectionReason
|
||||
NETWORK_DISCONNECT_CONNECTION_FAILURE = 51 [(network_connection_token) = "#GameUI_Disconnect_ConnectionFailure"];
|
||||
NETWORK_DISCONNECT_NO_PEER_GROUP_HANDLERS = 52 [(network_connection_token) = "#GameUI_Disconnect_NoPeerGroupHandlers"];
|
||||
NETWORK_DISCONNECT_RECONNECTION = 53;
|
||||
NETWORK_DISCONNECT_LOOPSHUTDOWN = 54 [(network_connection_token) = "#GameUI_Disconnect_LoopShutdown"];
|
||||
NETWORK_DISCONNECT_LOOPDEACTIVATE = 55 [(network_connection_token) = "#GameUI_Disconnect_LoopDeactivate"];
|
||||
NETWORK_DISCONNECT_HOST_ENDGAME = 56 [(network_connection_token) = "#GameUI_Disconnect_Host_EndGame"];
|
||||
NETWORK_DISCONNECT_LOOP_LEVELLOAD_ACTIVATE = 57 [(network_connection_token) = "#GameUI_Disconnect_LoopLevelLoadActivate"];
|
||||
NETWORK_DISCONNECT_CREATE_SERVER_FAILED = 58 [(network_connection_token) = "#GameUI_Disconnect_CreateServerFailed"];
|
||||
NETWORK_DISCONNECT_EXITING = 59 [(network_connection_token) = "#GameUI_Disconnect_ExitingEngine"];
|
||||
NETWORK_DISCONNECT_REQUEST_HOSTSTATE_IDLE = 60 [(network_connection_token) = "#GameUI_Disconnect_Request_HSIdle"];
|
||||
NETWORK_DISCONNECT_REQUEST_HOSTSTATE_HLTVRELAY = 61 [(network_connection_token) = "#GameUI_Disconnect_Request_HLTVRelay"];
|
||||
NETWORK_DISCONNECT_CLIENT_CONSISTENCY_FAIL = 62 [(network_connection_token) = "#GameUI_ClientConsistencyFail"];
|
||||
NETWORK_DISCONNECT_CLIENT_UNABLE_TO_CRC_MAP = 63 [(network_connection_token) = "#GameUI_ClientUnableToCRCMap"];
|
||||
NETWORK_DISCONNECT_CLIENT_NO_MAP = 64 [(network_connection_token) = "#GameUI_ClientNoMap"];
|
||||
NETWORK_DISCONNECT_CLIENT_DIFFERENT_MAP = 65 [(network_connection_token) = "#GameUI_ClientDifferentMap"];
|
||||
NETWORK_DISCONNECT_SERVER_REQUIRES_STEAM = 66 [(network_connection_token) = "#GameUI_ServerRequireSteams"];
|
||||
NETWORK_DISCONNECT_STEAM_DENY_MISC = 67 [(network_connection_token) = "#GameUI_Disconnect_SteamDeny_Misc"];
|
||||
NETWORK_DISCONNECT_STEAM_DENY_BAD_ANTI_CHEAT = 68 [(network_connection_token) = "#GameUI_Disconnect_SteamDeny_BadAntiCheat"];
|
||||
NETWORK_DISCONNECT_SERVER_SHUTDOWN = 69 [(network_connection_token) = "#GameUI_Disconnect_ServerShutdown"];
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -1,235 +1,216 @@
|
||||
//====== Copyright (c) 2012, Valve Corporation, All rights reserved. ========//
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright notice, this
|
||||
// list of conditions and the following disclaimer.
|
||||
// Redistributions in binary form must reproduce the above copyright notice,
|
||||
// this list of conditions and the following disclaimer in the documentation
|
||||
// and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
// THE POSSIBILITY OF SUCH DAMAGE.
|
||||
//===========================================================================//
|
||||
//
|
||||
// Purpose: The file defines our Google Protocol Buffers which are used in over
|
||||
// the wire messages for the Source engine.
|
||||
//
|
||||
//=============================================================================
|
||||
|
||||
// Note about encoding:
|
||||
// http://code.google.com/apis/protocolbuffers/docs/encoding.html
|
||||
//
|
||||
// TL;DR: Use sint32/sint64 for values that may be negative.
|
||||
//
|
||||
// There is an important difference between the signed int types (sint32 and sint64)
|
||||
// and the "standard" int types (int32 and int64) when it comes to encoding negative
|
||||
// numbers. If you use int32 or int64 as the type for a negative number, the
|
||||
// resulting varint is always ten bytes long – it is, effectively, treated like a
|
||||
// very large unsigned integer. If you use one of the signed types, the resulting
|
||||
// varint uses ZigZag encoding, which is much more efficient.
|
||||
|
||||
|
||||
// Commenting this out allows it to be compiled for SPEED or LITE_RUNTIME.
|
||||
// option optimize_for = SPEED;
|
||||
|
||||
// We don't use the service generation functionality
|
||||
option cc_generic_services = false;
|
||||
|
||||
|
||||
//
|
||||
// STYLE NOTES:
|
||||
//
|
||||
// Use CamelCase CMsgMyMessageName style names for messages.
|
||||
//
|
||||
// Use lowercase _ delimited names like my_steam_id for field names, this is non-standard for Steam,
|
||||
// but plays nice with the Google formatted code generation.
|
||||
//
|
||||
// Try not to use required fields ever. Only do so if you are really really sure you'll never want them removed.
|
||||
// Optional should be preffered as it will make versioning easier and cleaner in the future if someone refactors
|
||||
// your message and wants to remove or rename fields.
|
||||
//
|
||||
// Use fixed64 for JobId_t, GID_t, or SteamID. This is appropriate for any field that is normally
|
||||
// going to be larger than 2^56. Otherwise use int64 for 64 bit values that are frequently smaller
|
||||
// than 2^56 as it will safe space on the wire in those cases.
|
||||
//
|
||||
// Similar to fixed64, use fixed32 for RTime32 or other 32 bit values that are frequently larger than
|
||||
// 2^28. It will safe space in those cases, otherwise use int32 which will safe space for smaller values.
|
||||
// An exception to this rule for RTime32 is if the value will frequently be zero rather than set to an actual
|
||||
// time.
|
||||
//
|
||||
|
||||
import "network_connection.proto";
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
// Common Types
|
||||
//=============================================================================
|
||||
|
||||
message CMsgVector
|
||||
{
|
||||
optional float x = 1;
|
||||
optional float y = 2;
|
||||
optional float z = 3;
|
||||
}
|
||||
|
||||
message CMsgVector2D
|
||||
{
|
||||
optional float x = 1;
|
||||
optional float y = 2;
|
||||
}
|
||||
|
||||
message CMsgQAngle
|
||||
{
|
||||
optional float x = 1;
|
||||
optional float y = 2;
|
||||
optional float z = 3;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
// Bidirectional NET Messages
|
||||
//=============================================================================
|
||||
|
||||
enum NET_Messages
|
||||
{
|
||||
net_NOP = 0;
|
||||
net_Disconnect = 1; // disconnect, last message in connection
|
||||
net_File = 2; // file transmission message request/deny
|
||||
net_SplitScreenUser = 3; // Changes split screen user, client and server must both provide handler
|
||||
net_Tick = 4; // s->c world tick, c->s ack world tick
|
||||
net_StringCmd = 5; // a string command
|
||||
net_SetConVar = 6; // sends one/multiple convar/userinfo settings
|
||||
net_SignonState = 7; // signals or acks current signon state
|
||||
}
|
||||
|
||||
enum SIGNONSTATE
|
||||
{
|
||||
SIGNONSTATE_NONE = 0; // no state yet; about to connect
|
||||
SIGNONSTATE_CHALLENGE = 1; // client challenging server; all OOB packets
|
||||
SIGNONSTATE_CONNECTED = 2; // client is connected to server; netchans ready
|
||||
SIGNONSTATE_NEW = 3; // just got serverinfo and string tables
|
||||
SIGNONSTATE_PRESPAWN = 4; // received signon buffers
|
||||
SIGNONSTATE_SPAWN = 5; // ready to receive entity packets
|
||||
SIGNONSTATE_FULL = 6; // we are fully connected; first non-delta packet received
|
||||
SIGNONSTATE_CHANGELEVEL = 7; // server is changing level; please wait
|
||||
}
|
||||
|
||||
message CMsg_CVars
|
||||
{
|
||||
message CVar
|
||||
{
|
||||
optional string name = 1;
|
||||
optional string value = 2;
|
||||
}
|
||||
|
||||
repeated CVar cvars = 1;
|
||||
}
|
||||
|
||||
message CNETMsg_NOP
|
||||
{
|
||||
}
|
||||
|
||||
message CNETMsg_SplitScreenUser
|
||||
{
|
||||
optional int32 slot = 1;
|
||||
}
|
||||
|
||||
message CNETMsg_Disconnect
|
||||
{
|
||||
optional ENetworkDisconnectionReason reason = 2 [default = NETWORK_DISCONNECT_INVALID];
|
||||
}
|
||||
|
||||
message CNETMsg_File
|
||||
{
|
||||
optional int32 transfer_id = 1;
|
||||
optional string file_name = 2;
|
||||
optional bool is_replay_demo_file = 3;
|
||||
optional bool deny = 4;
|
||||
optional bool is_file_requested = 5;
|
||||
}
|
||||
|
||||
message CNETMsg_Tick
|
||||
{
|
||||
optional uint32 tick = 1; // current tick count
|
||||
optional uint32 host_computationtime = 4;
|
||||
optional uint32 host_computationtime_std_deviation = 5;
|
||||
optional uint32 host_framestarttime_std_deviation = 6;
|
||||
}
|
||||
|
||||
message CNETMsg_StringCmd
|
||||
{
|
||||
optional string command = 1;
|
||||
}
|
||||
|
||||
message CNETMsg_SetConVar
|
||||
{
|
||||
optional CMsg_CVars convars = 1;
|
||||
}
|
||||
|
||||
message CNETMsg_SignonState
|
||||
{
|
||||
optional uint32 signon_state = 1; // See SIGNONSTATE_ defines
|
||||
optional uint32 spawn_count = 2; // server spawn count (session number)
|
||||
optional uint32 num_server_players = 3; // Number of players the server discloses as connected to the server
|
||||
repeated string players_networkids = 4; // player network ids
|
||||
optional string map_name = 5; // Name of the current map
|
||||
}
|
||||
|
||||
message CSVCMsg_GameEvent
|
||||
{
|
||||
message key_t
|
||||
{
|
||||
optional int32 type = 1; // type
|
||||
optional string val_string = 2; // TYPE_STRING
|
||||
optional float val_float = 3; // TYPE_FLOAT
|
||||
optional int32 val_long = 4; // TYPE_LONG
|
||||
optional int32 val_short = 5; // TYPE_SHORT
|
||||
optional int32 val_byte = 6; // TYPE_BYTE
|
||||
optional bool val_bool = 7; // TYPE_BOOL
|
||||
optional uint64 val_uint64 = 8; // TYPE_UINT64
|
||||
}
|
||||
|
||||
optional string event_name = 1;
|
||||
optional int32 eventid = 2;
|
||||
repeated key_t keys = 3;
|
||||
}
|
||||
|
||||
message CSVCMsgList_GameEvents
|
||||
{
|
||||
message event_t
|
||||
{
|
||||
optional int32 tick = 1;
|
||||
optional CSVCMsg_GameEvent event = 2;
|
||||
}
|
||||
|
||||
repeated event_t events = 1;
|
||||
}
|
||||
|
||||
message CSVCMsg_UserMessage
|
||||
{
|
||||
optional int32 msg_type = 1;
|
||||
optional bytes msg_data = 2;
|
||||
}
|
||||
|
||||
message CSVCMsgList_UserMessages
|
||||
{
|
||||
message usermsg_t
|
||||
{
|
||||
optional int32 tick = 1;
|
||||
optional CSVCMsg_UserMessage msg = 2;
|
||||
}
|
||||
|
||||
repeated usermsg_t usermsgs = 1;
|
||||
}
|
||||
|
||||
import "network_connection.proto";
|
||||
|
||||
option cc_generic_services = false;
|
||||
|
||||
enum NET_Messages {
|
||||
net_NOP = 0;
|
||||
net_Disconnect = 1;
|
||||
net_File = 2;
|
||||
net_SplitScreenUser = 3;
|
||||
net_Tick = 4;
|
||||
net_StringCmd = 5;
|
||||
net_SetConVar = 6;
|
||||
net_SignonState = 7;
|
||||
net_SpawnGroup_Load = 8;
|
||||
net_SpawnGroup_ManifestUpdate = 9;
|
||||
net_SpawnGroup_SetCreationTick = 11;
|
||||
net_SpawnGroup_Unload = 12;
|
||||
net_SpawnGroup_LoadCompleted = 13;
|
||||
net_ReliableMessageEndMarker = 14;
|
||||
}
|
||||
|
||||
enum SpawnGroupFlags_t {
|
||||
SPAWN_GROUP_LOAD_ENTITIES_FROM_SAVE = 1;
|
||||
SPAWN_GROUP_DONT_SPAWN_ENTITIES = 2;
|
||||
SPAWN_GROUP_SYNCHRONOUS_SPAWN = 4;
|
||||
SPAWN_GROUP_IS_INITIAL_SPAWN_GROUP = 8;
|
||||
SPAWN_GROUP_CREATE_CLIENT_ONLY_ENTITIES = 16;
|
||||
SPAWN_GROUP_SAVE_ENTITIES = 32;
|
||||
SPAWN_GROUP_BLOCK_UNTIL_LOADED = 64;
|
||||
SPAWN_GROUP_LOAD_STREAMING_DATA = 128;
|
||||
SPAWN_GROUP_CREATE_NEW_SCENE_WORLD = 256;
|
||||
}
|
||||
|
||||
message CMsgVector {
|
||||
optional float x = 1;
|
||||
optional float y = 2;
|
||||
optional float z = 3;
|
||||
}
|
||||
|
||||
message CMsgVector2D {
|
||||
optional float x = 1;
|
||||
optional float y = 2;
|
||||
}
|
||||
|
||||
message CMsgQAngle {
|
||||
optional float x = 1;
|
||||
optional float y = 2;
|
||||
optional float z = 3;
|
||||
}
|
||||
|
||||
message CMsgPlayerInfo {
|
||||
optional string name = 1;
|
||||
optional fixed64 xuid = 2;
|
||||
optional int32 userid = 3;
|
||||
optional fixed64 steamid = 4;
|
||||
optional bool fakeplayer = 5;
|
||||
optional bool ishltv = 6;
|
||||
repeated fixed32 customFiles = 7;
|
||||
optional int32 filesDownloaded = 8;
|
||||
}
|
||||
|
||||
message CMsg_CVars {
|
||||
message CVar {
|
||||
optional string name = 1;
|
||||
optional string value = 2;
|
||||
}
|
||||
|
||||
repeated .CMsg_CVars.CVar cvars = 1;
|
||||
}
|
||||
|
||||
message CNETMsg_NOP {
|
||||
}
|
||||
|
||||
message CNETMsg_SplitScreenUser {
|
||||
optional int32 slot = 1;
|
||||
}
|
||||
|
||||
message CNETMsg_Disconnect {
|
||||
optional .ENetworkDisconnectionReason reason = 2 [default = NETWORK_DISCONNECT_INVALID];
|
||||
}
|
||||
|
||||
message CNETMsg_File {
|
||||
optional int32 transfer_id = 1;
|
||||
optional string file_name = 2;
|
||||
optional bool is_replay_demo_file = 3;
|
||||
optional bool deny = 4;
|
||||
optional bool is_file_requested = 5;
|
||||
}
|
||||
|
||||
message CNETMsg_Tick {
|
||||
optional uint32 tick = 1;
|
||||
optional uint32 host_frametime = 2;
|
||||
optional uint32 host_frametime_std_deviation = 3;
|
||||
optional uint32 host_computationtime = 4;
|
||||
optional uint32 host_computationtime_std_deviation = 5;
|
||||
optional uint32 host_framestarttime_std_deviation = 6;
|
||||
}
|
||||
|
||||
message CNETMsg_StringCmd {
|
||||
optional string command = 1;
|
||||
}
|
||||
|
||||
message CNETMsg_SetConVar {
|
||||
optional .CMsg_CVars convars = 1;
|
||||
}
|
||||
|
||||
message CNETMsg_SignonState {
|
||||
optional uint32 signon_state = 1;
|
||||
optional uint32 spawn_count = 2;
|
||||
optional uint32 num_server_players = 3;
|
||||
repeated string players_networkids = 4;
|
||||
optional string map_name = 5;
|
||||
}
|
||||
|
||||
message CSVCMsg_GameEvent {
|
||||
message key_t {
|
||||
optional int32 type = 1;
|
||||
optional string val_string = 2;
|
||||
optional float val_float = 3;
|
||||
optional int32 val_long = 4;
|
||||
optional int32 val_short = 5;
|
||||
optional int32 val_byte = 6;
|
||||
optional bool val_bool = 7;
|
||||
optional uint64 val_uint64 = 8;
|
||||
}
|
||||
|
||||
optional string event_name = 1;
|
||||
optional int32 eventid = 2;
|
||||
repeated .CSVCMsg_GameEvent.key_t keys = 3;
|
||||
}
|
||||
|
||||
message CSVCMsgList_GameEvents {
|
||||
message event_t {
|
||||
optional int32 tick = 1;
|
||||
optional .CSVCMsg_GameEvent event = 2;
|
||||
}
|
||||
|
||||
repeated .CSVCMsgList_GameEvents.event_t events = 1;
|
||||
}
|
||||
|
||||
message CSVCMsg_UserMessage {
|
||||
optional int32 msg_type = 1;
|
||||
optional bytes msg_data = 2;
|
||||
}
|
||||
|
||||
message CSVCMsgList_UserMessages {
|
||||
message usermsg_t {
|
||||
optional int32 tick = 1;
|
||||
optional .CSVCMsg_UserMessage msg = 2;
|
||||
}
|
||||
|
||||
repeated .CSVCMsgList_UserMessages.usermsg_t usermsgs = 1;
|
||||
}
|
||||
|
||||
message CNETMsg_SpawnGroup_Load {
|
||||
optional string worldname = 1;
|
||||
optional string entitylumpname = 2;
|
||||
optional string entityfiltername = 3;
|
||||
optional uint32 spawngrouphandle = 4;
|
||||
optional uint32 spawngroupownerhandle = 5;
|
||||
optional .CMsgVector world_offset_pos = 6;
|
||||
optional .CMsgQAngle world_offset_angle = 7;
|
||||
optional bytes spawngroupmanifest = 8;
|
||||
optional uint32 flags = 9;
|
||||
optional int32 tickcount = 10;
|
||||
optional bool manifestincomplete = 11;
|
||||
optional string localnamefixup = 12;
|
||||
optional string parentnamefixup = 13;
|
||||
optional int32 manifestloadpriority = 14;
|
||||
optional uint32 worldgroupid = 15;
|
||||
optional uint32 creationsequence = 16;
|
||||
}
|
||||
|
||||
message CNETMsg_SpawnGroup_ManifestUpdate {
|
||||
optional uint32 spawngrouphandle = 1;
|
||||
optional bytes spawngroupmanifest = 2;
|
||||
optional bool manifestincomplete = 3;
|
||||
}
|
||||
|
||||
message CNETMsg_SpawnGroup_SetCreationTick {
|
||||
optional uint32 spawngrouphandle = 1;
|
||||
optional int32 tickcount = 2;
|
||||
optional uint32 creationsequence = 3;
|
||||
}
|
||||
|
||||
message CNETMsg_SpawnGroup_Unload {
|
||||
optional uint32 spawngrouphandle = 1;
|
||||
optional uint32 flags = 2;
|
||||
optional int32 tickcount = 3;
|
||||
}
|
||||
|
||||
message CNETMsg_SpawnGroup_LoadCompleted {
|
||||
optional uint32 spawngrouphandle = 1;
|
||||
}
|
||||
|
||||
message CSVCMsg_GameSessionConfiguration {
|
||||
optional bool is_multiplayer = 1;
|
||||
optional bool is_loadsavegame = 2;
|
||||
optional bool is_background_map = 3;
|
||||
optional bool is_headless = 4;
|
||||
optional uint32 min_client_limit = 5;
|
||||
optional uint32 max_client_limit = 6;
|
||||
optional uint32 max_clients = 7;
|
||||
optional fixed32 tick_interval = 8;
|
||||
optional string hostname = 9;
|
||||
optional string savegamename = 10;
|
||||
optional string s1_mapname = 11;
|
||||
optional string gamemode = 12;
|
||||
optional string server_ip_address = 13;
|
||||
optional bytes data = 14;
|
||||
optional bool is_localonly = 15;
|
||||
}
|
||||
|
||||
message CNETMsg_ReliableMessageEndMarker {
|
||||
}
|
||||
|
||||
+108
-47
@@ -11,60 +11,121 @@
|
||||
#endif
|
||||
|
||||
#include <inetmsghandler.h>
|
||||
#include <bitvec.h>
|
||||
#include <const.h>
|
||||
#include <edict.h>
|
||||
#include <tier1/checksum_crc.h>
|
||||
#include <engine/IEngineService.h>
|
||||
|
||||
class INetMessage;
|
||||
class IRecipientFilter;
|
||||
class IClient;
|
||||
class IGameSpawnGroupMgr;
|
||||
struct EventServerAdvanceTick_t;
|
||||
struct EventServerPollNetworking_t;
|
||||
struct EventServerProcessNetworking_t;
|
||||
struct EventServerSimulate_t;
|
||||
struct EventServerPostSimulate_t;
|
||||
struct server_state_t;
|
||||
class IPrerequisite;
|
||||
class CServerChangelevelState;
|
||||
class INetworkGameServerFactory;
|
||||
class ISource2WorldSession;
|
||||
class INetworkGameClient;
|
||||
class GameSessionConfiguration_t;
|
||||
|
||||
typedef struct player_info_s player_info_t;
|
||||
typedef int HGameResourceManifest;
|
||||
|
||||
abstract_class IServer : public IConnectionlessPacketHandler
|
||||
enum ESpawnGroupUnloadOption
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
abstract_class INetworkGameServer : public IConnectionlessPacketHandler
|
||||
{
|
||||
public:
|
||||
virtual ~IServer() {}
|
||||
|
||||
virtual int GetNumClients( void ) const = 0; // returns current number of clients
|
||||
virtual int GetNumProxies( void ) const = 0; // returns number of attached HLTV proxies
|
||||
virtual int GetNumFakeClients() const = 0; // returns number of fake clients/bots
|
||||
virtual int GetMaxClients( void ) const = 0; // returns current client limit
|
||||
virtual IClient *GetClient( int index ) = 0; // returns interface to client
|
||||
virtual int GetClientCount() const = 0; // returns number of clients slots (used & unused)
|
||||
virtual int GetUDPPort( void ) const = 0; // returns current used UDP port
|
||||
virtual float GetTime( void ) const = 0; // returns game world time
|
||||
virtual int GetTick( void ) const = 0; // returns game world tick
|
||||
virtual float GetTickInterval( void ) const = 0; // tick interval in seconds
|
||||
virtual float GetTimescale( void ) const = 0; // returns the game time scale (multiplied in conjunction with host_timescale)
|
||||
virtual const char *GetName( void ) const = 0; // public server name
|
||||
virtual const char *GetMapName( void ) const = 0; // current map name (BSP)
|
||||
virtual int GetSpawnCount( void ) const = 0;
|
||||
virtual int GetNumClasses( void ) const = 0;
|
||||
virtual int GetClassBits( void ) const = 0;
|
||||
virtual void GetNetStats( float &avgIn, float &avgOut ) = 0; // total net in/out in bytes/sec
|
||||
virtual int GetNumPlayers() = 0;
|
||||
virtual bool GetPlayerInfo( int nClientIndex, player_info_t *pinfo ) = 0;
|
||||
|
||||
virtual void Init( const GameSessionConfiguration_t &, const char * ) = 0;
|
||||
virtual void SetGameSpawnGroupMgr( IGameSpawnGroupMgr * ) = 0;
|
||||
virtual void SetGameSessionManifest( HGameResourceManifest * ) = 0;
|
||||
virtual void RegisterLoadingSpawnGroups( CUtlVector<unsigned int> & ) = 0;
|
||||
virtual void Shutdown( void ) = 0;
|
||||
virtual void AddRef( void ) = 0;
|
||||
virtual void Release ( void ) = 0;
|
||||
virtual CGlobalVars *GetGlobals(void) = 0;
|
||||
virtual bool IsActive( void ) const = 0;
|
||||
virtual bool IsLoading( void ) const = 0;
|
||||
virtual bool IsDedicated( void ) const = 0;
|
||||
virtual bool IsPaused( void ) const = 0;
|
||||
virtual bool IsMultiplayer( void ) const = 0;
|
||||
virtual bool IsPausable() const = 0;
|
||||
virtual bool IsHLTV() const = 0;
|
||||
virtual bool IsReplay() const = 0;
|
||||
|
||||
virtual const char * GetPassword() const = 0; // returns the password or NULL if none set
|
||||
|
||||
virtual void SetPaused(bool paused) = 0;
|
||||
virtual void SetTimescale( float flTimescale ) = 0;
|
||||
virtual void SetPassword(const char *password) = 0; // set password (NULL to disable)
|
||||
|
||||
virtual void BroadcastMessage( INetMessage &msg, bool onlyActive = false, bool reliable = false) = 0;
|
||||
virtual void BroadcastMessage( INetMessage &msg, IRecipientFilter &filter ) = 0;
|
||||
|
||||
virtual void DisconnectClient( IClient *client, /* ENetworkDisconnectionReason */ int reason ) = 0;
|
||||
virtual void SetServerTick( int tick ) = 0;
|
||||
virtual int GetServerTick( void ) const = 0; // returns game world tick
|
||||
virtual void SetFinalSimulationTickThisFrame( int ) = 0;
|
||||
virtual int GetMaxClients( void ) const = 0; // returns current client limit
|
||||
virtual float GetTickInterval( void ) const = 0; // tick interval in seconds
|
||||
virtual void ServerAdvanceTick( const EventServerAdvanceTick_t & ) = 0;
|
||||
virtual void ServerPollNetworking( const EventServerPollNetworking_t & ) = 0;
|
||||
virtual void ServerProcessNetworking( const EventServerProcessNetworking_t & ) = 0;
|
||||
virtual void ServerSimulate( const EventServerSimulate_t & ) = 0;
|
||||
virtual void ServerPostSimulate( const EventServerPostSimulate_t & ) = 0;
|
||||
virtual void LoadSpawnGroup( const SpawnGroupDesc_t & ) = 0;
|
||||
virtual void AsyncUnloadSpawnGroup( unsigned int, ESpawnGroupUnloadOption ) = 0;
|
||||
virtual void PrintSpawnGroupStatus( void ) const = 0;
|
||||
virtual float GetTimescale( void ) const = 0; // returns the game time scale (multiplied in conjunction with host_timescale)
|
||||
virtual bool IsSaveRestoreAllowed( void ) const = 0;
|
||||
virtual void SetMapName( const char *pszNewName ) = 0;
|
||||
virtual const char *GetMapName( void ) const = 0; // current map name (BSP)
|
||||
virtual const char *GetAddonName( void ) const = 0;
|
||||
virtual bool IsBackgroundMap( void ) const = 0;
|
||||
virtual float GetTime( void ) const = 0; // returns game world time
|
||||
virtual int GetMapVersion( void ) const = 0;
|
||||
virtual void ActivateServer( void ) = 0;
|
||||
virtual void PrepareForAssetLoad( void ) = 0;
|
||||
virtual int GetServerNetworkAddress( void ) = 0;
|
||||
virtual SpawnGroupHandle_t FindSpawnGroupByName( const char *pszName ) = 0;
|
||||
virtual void MakeSpawnGroupActive( SpawnGroupHandle_t ) = 0;
|
||||
virtual void SynchronouslySpawnGroup( SpawnGroupHandle_t ) = 0;
|
||||
virtual void SetServerState( server_state_t ) = 0;
|
||||
virtual void SpawnServer( const char * ) = 0;
|
||||
virtual void GetSpawnGroupLoadingStatus( SpawnGroupHandle_t ) = 0;
|
||||
virtual void SetSpawnGroupDescription( SpawnGroupHandle_t, const char * ) = 0;
|
||||
virtual void AddServerPrerequisites( IPrerequisite * ) = 0;
|
||||
virtual void RemoveServerPrerequisites( void ) = 0;
|
||||
virtual CUtlVector<INetworkGameClient *> *StartChangeLevel(void) = 0;
|
||||
virtual void FinishChangeLevel( CServerChangelevelState * ) = 0;
|
||||
virtual bool IsChangelevelPending( void ) const = 0;
|
||||
virtual void GetAllLoadingSpawnGroups( CUtlVector<SpawnGroupHandle_t> *pOut ) = 0;
|
||||
virtual void PreserveSteamID( void ) = 0;
|
||||
virtual void OnKickById( const CCommandContext &context, const CCommand &args) = 0;
|
||||
virtual void OnKickByName( const CCommandContext &context, const CCommand &args) = 0;
|
||||
};
|
||||
|
||||
abstract_class INetworkServerService : public IEngineService
|
||||
{
|
||||
public:
|
||||
virtual ~INetworkServerService() {}
|
||||
virtual INetworkGameServer *GetIGameServer( void ) = 0;
|
||||
virtual bool IsActiveInGame( void ) const = 0;
|
||||
virtual bool IsMultiplayer( void ) const = 0;
|
||||
virtual void StartupServer( const GameSessionConfiguration_t &config, INetworkGameServerFactory *pFactory,
|
||||
ISource2WorldSession *pWorldSession, const char * ) = 0;
|
||||
virtual void SetGameSpawnGroupMgr( IGameSpawnGroupMgr *pMgr ) = 0;
|
||||
virtual void AddServerPrerequisites( const GameSessionConfiguration_t &, const char *, ILoopModePrerequisiteRegistry *, bool ) = 0;
|
||||
virtual void SetServerSocket( int ) = 0;
|
||||
virtual bool IsServerRunning( void ) const = 0;
|
||||
virtual void DisconnectGameNow( ENetworkDisconnectionReason ) = 0;
|
||||
virtual void PrintSpawnGroupStatus( void ) const = 0;
|
||||
virtual void SetFinalSimulationTickThisFrame( int ) = 0;
|
||||
virtual void *GetGameServer( void ) = 0;
|
||||
virtual int GetTickInterval( void ) const = 0;
|
||||
virtual void ProcessSocket( void ) = 0;
|
||||
virtual int GetServerNetworkAddress( void ) = 0;
|
||||
virtual bool GameLoadFailed( void ) const = 0;
|
||||
virtual void SetGameLoadFailed( bool bFailed ) = 0;
|
||||
virtual void SetGameLoadStarted( void ) = 0;
|
||||
virtual void StartChangeLevel( void ) = 0;
|
||||
virtual void PreserveSteamID( void ) = 0;
|
||||
virtual CRC32_t GetServerSerializersCRC( void ) = 0;
|
||||
virtual void *GetServerSerializersMsg( void ) = 0;
|
||||
};
|
||||
|
||||
abstract_class INetworkGameServerFactory
|
||||
{
|
||||
public:
|
||||
virtual INetworkGameServer *Allocate(int, INetworkServerService *, ISource2WorldSession *) = 0;
|
||||
};
|
||||
|
||||
typedef INetworkGameServer IServer;
|
||||
|
||||
|
||||
#endif // ISERVER_H
|
||||
Reference in new issue
Block a user