summaryrefslogtreecommitdiff
path: root/game/shared/lobby.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/lobby.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/shared/lobby.h')
-rw-r--r--game/shared/lobby.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/game/shared/lobby.h b/game/shared/lobby.h
new file mode 100644
index 0000000..5b30202
--- /dev/null
+++ b/game/shared/lobby.h
@@ -0,0 +1,52 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: GC based lobby. Matchmaking assigns players to a lobby
+//
+//=============================================================================
+
+#ifndef LOBBY_H
+#define LOBBY_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "playergroup.h"
+
+namespace GCSDK
+{
+class CSharedObject;
+
+class ILobby : public IPlayerGroup
+{
+public:
+ virtual ~ILobby() { }
+
+};
+
+class CLobbyInvite : public GCSDK::CProtoBufSharedObject<CSOLobbyInvite, k_EProtoObjectLobbyInvite>, public GCSDK::IPlayerGroupInvite
+{
+ //This is disabled since people shouldn't create these objects directly and should instead instantiate game specific versions of them
+ //DECLARE_CLASS_MEMPOOL( CLobbyInvite );
+
+public:
+ const static int k_nTypeID = k_EProtoObjectLobbyInvite;
+
+ virtual const CSteamID GetSenderID() const { return Obj().sender_id(); }
+ virtual PlayerGroupID_t GetGroupID() const { return Obj().group_id(); }
+ virtual const char* GetSenderName() const { return Obj().sender_name().c_str(); }
+
+ virtual GCSDK::CSharedObject* GetSharedObject() { return this; }
+
+#ifdef GC
+ // NOTE: These do not dirty fields
+ virtual void SetSenderID( const CSteamID &steamID ) { Obj().set_sender_id( steamID.ConvertToUint64() ); }
+ virtual void SetGroupID( PlayerGroupID_t nGroupID ) { Obj().set_group_id( nGroupID ); }
+ virtual void SetSenderName( const char *szName ) { Obj().set_sender_name( szName ); }
+
+ virtual void YldInitFromPlayerGroup( IPlayerGroup *pPlayerGroup );
+#endif
+};
+
+}
+
+#endif