mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-12-07 02:18:30 +00:00
Fix server exiting on map change.
This commit is contained in:
parent
36cb59aada
commit
ff2e763b99
@ -39,6 +39,14 @@
|
|||||||
#include <filesystem.h>
|
#include <filesystem.h>
|
||||||
#include "metamod.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 */
|
/* Types */
|
||||||
typedef void (*CONPRINTF_FUNC)(const char *, ...);
|
typedef void (*CONPRINTF_FUNC)(const char *, ...);
|
||||||
struct UsrMsgInfo
|
struct UsrMsgInfo
|
||||||
@ -189,6 +197,10 @@ void BaseProvider::Notify_DLLInit_Pre(CreateInterfaceFn engineFactory,
|
|||||||
{
|
{
|
||||||
SH_ADD_HOOK_STATICFUNC(IServerGameClients, ClientCommand, gameclients, ClientCommand, false);
|
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()
|
void BaseProvider::Notify_DLLShutdown_Pre()
|
||||||
|
|||||||
@ -77,6 +77,9 @@ public:
|
|||||||
virtual const char *GetUserMessage(int index, int *size=NULL);
|
virtual const char *GetUserMessage(int index, int *size=NULL);
|
||||||
virtual int DetermineSourceEngine();
|
virtual int DetermineSourceEngine();
|
||||||
virtual bool ProcessVDF(const char *file, char path[], size_t path_len, char alias[], size_t alias_len);
|
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;
|
extern IVEngineServer *engine;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user