1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2024-12-01 13:24:25 +01:00

Fix server exiting on map change.

This commit is contained in:
Nicholas Hastings 2015-07-10 09:30:51 -04:00
parent 36cb59aada
commit ff2e763b99
2 changed files with 15 additions and 0 deletions

View File

@ -39,6 +39,14 @@
#include <filesystem.h>
#include "metamod.h"
#if SOURCE_ENGINE == SE_SOURCE2
SH_DECL_HOOK1(ISource2ServerConfig, AllowDedicatedServers, const, 0, bool, EUniverse);
bool BaseProvider::AllowDedicatedServers(EUniverse universe) const
{
RETURN_META_VALUE(MRES_SUPERCEDE, true);
}
#endif
/* Types */
typedef void (*CONPRINTF_FUNC)(const char *, ...);
struct UsrMsgInfo
@ -189,6 +197,10 @@ void BaseProvider::Notify_DLLInit_Pre(CreateInterfaceFn engineFactory,
{
SH_ADD_HOOK_STATICFUNC(IServerGameClients, ClientCommand, gameclients, ClientCommand, false);
}
#if SOURCE_ENGINE == SE_SOURCE2
SH_ADD_VPHOOK(ISource2ServerConfig, AllowDedicatedServers, serverconfig, SH_MEMBER(this, &BaseProvider::AllowDedicatedServers), false);
#endif
}
void BaseProvider::Notify_DLLShutdown_Pre()

View File

@ -77,6 +77,9 @@ public:
virtual const char *GetUserMessage(int index, int *size=NULL);
virtual int DetermineSourceEngine();
virtual bool ProcessVDF(const char *file, char path[], size_t path_len, char alias[], size_t alias_len);
#if SOURCE_ENGINE == SE_SOURCE2
bool AllowDedicatedServers(EUniverse universe) const;
#endif
};
extern IVEngineServer *engine;