summaryrefslogtreecommitdiff
path: root/game/shared/tf/tf_lobby_server.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/shared/tf/tf_lobby_server.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/shared/tf/tf_lobby_server.h')
-rw-r--r--game/shared/tf/tf_lobby_server.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/game/shared/tf/tf_lobby_server.h b/game/shared/tf/tf_lobby_server.h
new file mode 100644
index 0000000..8252b83
--- /dev/null
+++ b/game/shared/tf/tf_lobby_server.h
@@ -0,0 +1,55 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: The lobby shared object for gameservers, managed by CTFLobby
+//
+//=============================================================================
+
+#ifndef TF_LOBBY_SERVER_H
+#define TF_LOBBY_SERVER_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "gcsdk/protobufsharedobject.h"
+#include "tf_gcmessages.h"
+#include "tf_matchmaking_shared.h"
+#include "playergroup.h"
+
+class CTFGSLobby : public GCSDK::CProtoBufSharedObject<CSOTFGameServerLobby, k_EProtoObjectTFGameServerLobby>
+{
+ typedef GCSDK::CProtoBufSharedObject<CSOTFGameServerLobby, k_EProtoObjectTFGameServerLobby> BaseClass;
+public:
+ virtual ~CTFGSLobby() {}
+
+ // Debug
+ void SpewDebug();
+
+ // Member helpers
+ const CTFLobbyMember* GetMemberDetails( CSteamID steamID ) const;
+ const CTFLobbyMember* GetMemberDetails( int i ) const;
+ const CSteamID GetMember( int i ) const;
+ int GetNumMembers() const { return Obj().members_size(); }
+ CTFLobbyMember_ConnectState GetMemberConnectState( int iMemberIndex ) const;
+ bool BAssertValidMemberIndex( int iMemberIndex ) const;
+
+ // Inline helpers
+ CSOTFGameServerLobby::State GetState() const { return Obj().state(); }
+ const char *GetMissionName() const { return Obj().mission_name().c_str(); }
+ EMatchGroup GetMatchGroup() const { return Obj().has_match_group() ? (EMatchGroup)Obj().match_group() : k_nMatchGroup_Invalid; }
+ uint64 GetMatchID( void ) const { return Obj().match_id(); }
+ uint32 GetFlags( void ) const { return Obj().flags(); }
+ const char *GetMapName() const { return Obj().map_name().c_str(); }
+ GCSDK::PlayerGroupID_t GetGroupID() const { return Obj().lobby_id(); }
+ bool GetLateJoinEligible() const { return Obj().late_join_eligible(); }
+ CSteamID GetServerID() const { return Obj().server_id(); }
+ const char *GetConnect() const { return Obj().connect().c_str(); }
+ uint32_t GetLobbyMMVersion() const { return Obj().lobby_mm_version(); }
+
+#ifdef USE_MVM_TOUR
+ // Returns name of tour that we are playing for. Returns NULL if we are not playing for bragging rights!
+ const char *GetMannUpTourName() const;
+#endif // USE_MVM_TOUR
+
+};
+
+#endif // TF_LOBBY_SERVER_H