mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-20 13:54:14 +01:00
Add and use META_IS_SOURCE2 define
This commit is contained in:
parent
acd8644688
commit
d62379244c
@ -398,6 +398,8 @@ class MMSConfig(object):
|
|||||||
if sdk.name in ['csgo', 'blade', 'pvkii'] and compiler.target.platform == 'linux':
|
if sdk.name in ['csgo', 'blade', 'pvkii'] and compiler.target.platform == 'linux':
|
||||||
compiler.linkflags += ['-lstdc++']
|
compiler.linkflags += ['-lstdc++']
|
||||||
|
|
||||||
|
if sdk.name in ['dota', 'cs2']:
|
||||||
|
compiler.defines += ['META_IS_SOURCE2']
|
||||||
|
|
||||||
for path in paths:
|
for path in paths:
|
||||||
compiler.cxxincludes += [os.path.join(sdk.path, *path)]
|
compiler.cxxincludes += [os.path.join(sdk.path, *path)]
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
#include <ISmmPluginExt.h>
|
#include <ISmmPluginExt.h>
|
||||||
|
|
||||||
#ifndef META_NO_HL2SDK
|
#ifndef META_NO_HL2SDK
|
||||||
#if SOURCE_ENGINE == SE_DOTA
|
#if META_IS_SOURCE2
|
||||||
#include <interfaces/interfaces.h>
|
#include <interfaces/interfaces.h>
|
||||||
#else
|
#else
|
||||||
#include <tier1/interface.h>
|
#include <tier1/interface.h>
|
||||||
|
@ -63,7 +63,7 @@ public:
|
|||||||
SourceHook::MemFuncInfo mfi;
|
SourceHook::MemFuncInfo mfi;
|
||||||
|
|
||||||
mfi.isVirtual = false;
|
mfi.isVirtual = false;
|
||||||
#if SOURCE_ENGINE == SE_DOTA
|
#ifdef META_IS_SOURCE2
|
||||||
SourceHook::GetFuncInfo(&IServerGameDLL::Shutdown, mfi);
|
SourceHook::GetFuncInfo(&IServerGameDLL::Shutdown, mfi);
|
||||||
#else
|
#else
|
||||||
SourceHook::GetFuncInfo(&IServerGameDLL::DLLShutdown, mfi);
|
SourceHook::GetFuncInfo(&IServerGameDLL::DLLShutdown, mfi);
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <sourcehook.h>
|
#include <sourcehook.h>
|
||||||
#include <sh_memfuncinfo.h>
|
#include <sh_memfuncinfo.h>
|
||||||
#if SOURCE_ENGINE != SE_DOTA
|
#if !defined META_IS_SOURCE2
|
||||||
#include <iserverplugin.h>
|
#include <iserverplugin.h>
|
||||||
#endif
|
#endif
|
||||||
#include "ISmmAPI.h"
|
#include "ISmmAPI.h"
|
||||||
@ -96,7 +96,7 @@ extern IServerGameDLL *server;
|
|||||||
extern IServerGameClients *gameclients;
|
extern IServerGameClients *gameclients;
|
||||||
extern ICvar *icvar;
|
extern ICvar *icvar;
|
||||||
extern CGlobalVars *gpGlobals;
|
extern CGlobalVars *gpGlobals;
|
||||||
#if SOURCE_ENGINE == SE_DOTA
|
#if defined META_IS_SOURCE2
|
||||||
extern INetworkServerService *netservice;
|
extern INetworkServerService *netservice;
|
||||||
extern IEngineServiceMgr *enginesvcmgr;
|
extern IEngineServiceMgr *enginesvcmgr;
|
||||||
#endif
|
#endif
|
||||||
|
@ -105,7 +105,7 @@ private:
|
|||||||
bool KVLoadFromFile(KeyValues* kv, IFileSystem* filesystem, const char* resourceName, const char* pathID = nullptr);
|
bool KVLoadFromFile(KeyValues* kv, IFileSystem* filesystem, const char* resourceName, const char* pathID = nullptr);
|
||||||
inline bool IsUserMessageIterationSupported() const
|
inline bool IsUserMessageIterationSupported() const
|
||||||
{
|
{
|
||||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_DOTA || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV
|
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV
|
||||||
return false;
|
return false;
|
||||||
#else
|
#else
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user