@@ -31,7 +31,7 @@ extern INetworkStringTable *g_pStringTableServerPopFiles;
3131// Most of this is implemented in gameinterface.cpp, but some of it is per-mod in files like cs_gameinterface.cpp, etc.
3232class CServerGameClients : public IServerGameClients
3333{
34- public:
34+ public:
3535 virtual bool ClientConnect ( edict_t *pEntity, char const *pszName, char const *pszAddress, char *reject, int maxrejectlen ) OVERRIDE;
3636 virtual void ClientActive ( edict_t *pEntity, bool bLoadGame ) OVERRIDE;
3737 virtual void ClientDisconnect ( edict_t *pEntity ) OVERRIDE;
@@ -64,9 +64,9 @@ class CServerGameClients : public IServerGameClients
6464 virtual void ClientVoice ( edict_t *pEdict ) OVERRIDE;
6565};
6666
67- class CServerGameDLL : public IServerGameDLL
67+ class CServerGameDLL : public IServerGameDLL , public CGameEventListener
6868{
69- public:
69+ public:
7070 virtual bool DLLInit ( CreateInterfaceFn engineFactory, CreateInterfaceFn physicsFactory, CreateInterfaceFn fileSystemFactory, CGlobalVars *pGlobals ) OVERRIDE;
7171 virtual void DLLShutdown ( void ) OVERRIDE;
7272 // Get the simulation interval (must be compiled with identical values into both client and game .dll for MOD!!!)
@@ -149,9 +149,9 @@ class CServerGameDLL : public IServerGameDLL
149149 size_t nMapFileSize ) OVERRIDE;
150150
151151 virtual ePrepareLevelResourcesResult AsyncPrepareLevelResources ( /* in/out */ char *pszMapName, size_t nMapNameSize,
152- /* in/out */ char *pszMapFile,
153- size_t nMapFileSize,
154- float *flProgress = NULL ) OVERRIDE;
152+ /* in/out */ char *pszMapFile,
153+ size_t nMapFileSize,
154+ float *flProgress = NULL ) OVERRIDE;
155155
156156 virtual eCanProvideLevelResult CanProvideLevel ( /* in/out */ char *pMapName, int nMapNameMax ) OVERRIDE;
157157
@@ -160,12 +160,15 @@ class CServerGameDLL : public IServerGameDLL
160160
161161 virtual bool GetWorkshopMap ( uint32 uIndex, WorkshopMapDesc_t *pDesc ) OVERRIDE;
162162
163- private:
163+ private:
164164 // This can just be a wrapper on MapEntity_ParseAllEntities, but CS does some tricks in here
165165 // with the entity list.
166166 void LevelInit_ParseAllEntities ( const char *pMapEntities );
167167 void LoadMessageOfTheDay ();
168168 void LoadSpecificMOTDMsg ( const ConVar &convar, const char *pszStringName );
169+
170+ public: // IGameEventListener:
171+ virtual void FireGameEvent ( IGameEvent *event );
169172};
170173
171174// Normally, when the engine calls ClientPutInServer, it calls a global function in the game DLL
@@ -180,7 +183,7 @@ void ClientPutInServerOverride( ClientPutInServerOverrideFn fn );
180183// These are created for map entities in order as the map entities are spawned.
181184class CMapEntityRef
182185{
183- public:
186+ public:
184187 int m_iEdict; // Which edict slot this entity got. -1 if CreateEntityByName failed.
185188 int m_iSerialNumber; // The edict serial number. TODO used anywhere ?
186189};
@@ -192,7 +195,7 @@ extern CUtlLinkedList< CMapEntityRef, unsigned short > g_MapEntityRefs;
192195// -----------------------------------------------------------------------------
193196class CMapLoadEntityFilter : public IMapEntityFilter
194197{
195- public:
198+ public:
196199 virtual bool ShouldCreateEntity ( const char *pClassname )
197200 {
198201 // During map load, create all the entities.
@@ -223,7 +226,7 @@ bool IsEngineThreaded();
223226
224227class CServerGameTags : public IServerGameTags
225228{
226- public:
229+ public:
227230 virtual void GetTaggedConVarList ( KeyValues *pCvarTagList );
228231};
229232EXPOSE_SINGLE_INTERFACE ( CServerGameTags, IServerGameTags, INTERFACEVERSION_SERVERGAMETAGS );
0 commit comments