mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-12-06 18:08:31 +00:00
builds on OB again
--HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40649
This commit is contained in:
parent
a571e46c44
commit
c4eeaaf2d1
@ -35,7 +35,7 @@ ifeq "$(ENGINE)" "orangebox"
|
|||||||
HL2PUB = $(HL2SDK_OB)/public
|
HL2PUB = $(HL2SDK_OB)/public
|
||||||
CFLAGS += -DENGINE_ORANGEBOX
|
CFLAGS += -DENGINE_ORANGEBOX
|
||||||
METAMOD = $(SOURCEMM16)
|
METAMOD = $(SOURCEMM16)
|
||||||
INCLUDE += -I$(HL2SDK)/game/server
|
INCLUDE += -I$(HL2SDK)/public/game/server
|
||||||
SRCDS = $(SRCDS_BASE)/orangebox
|
SRCDS = $(SRCDS_BASE)/orangebox
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@ -58,12 +58,15 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define CVAR_INTERFACE_VERSION VENGINE_CVAR_INTERFACE_VERSION
|
||||||
#define ENGINE_CALL(func) SH_CALL(m_EngineCC, func)
|
#define ENGINE_CALL(func) SH_CALL(m_EngineCC, func)
|
||||||
|
|
||||||
#elif defined ENGINE_ORANGEBOX
|
#elif defined ENGINE_ORANGEBOX
|
||||||
|
|
||||||
#define ENGINE_CALL(func) SH_CALL(engine, func)
|
#define ENGINE_CALL(func) SH_CALL(engine, func)
|
||||||
|
#define MM_Format g_SMAPI->Format
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif //_INCLUDE_SOURCE_ENGINE_WRAPPERS_
|
#endif //_INCLUDE_SOURCE_ENGINE_WRAPPERS_
|
||||||
|
|
||||||
|
|||||||
@ -44,6 +44,7 @@ IServerPluginHelpers *helpers = NULL;
|
|||||||
IGameEventManager2 *gameevents = NULL;
|
IGameEventManager2 *gameevents = NULL;
|
||||||
IServerPluginCallbacks *vsp_callbacks = NULL;
|
IServerPluginCallbacks *vsp_callbacks = NULL;
|
||||||
IPlayerInfoManager *playerinfomanager = NULL;
|
IPlayerInfoManager *playerinfomanager = NULL;
|
||||||
|
ICvar *icvar = NULL;
|
||||||
|
|
||||||
ConVar sample_cvar("sample_cvar", "42", 0);
|
ConVar sample_cvar("sample_cvar", "42", 0);
|
||||||
|
|
||||||
@ -68,6 +69,7 @@ bool StubPlugin::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bo
|
|||||||
GET_V_IFACE_CURRENT(GetEngineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
|
GET_V_IFACE_CURRENT(GetEngineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
|
||||||
GET_V_IFACE_CURRENT(GetEngineFactory, gameevents, IGameEventManager2, INTERFACEVERSION_GAMEEVENTSMANAGER2);
|
GET_V_IFACE_CURRENT(GetEngineFactory, gameevents, IGameEventManager2, INTERFACEVERSION_GAMEEVENTSMANAGER2);
|
||||||
GET_V_IFACE_CURRENT(GetEngineFactory, helpers, IServerPluginHelpers, INTERFACEVERSION_ISERVERPLUGINHELPERS);
|
GET_V_IFACE_CURRENT(GetEngineFactory, helpers, IServerPluginHelpers, INTERFACEVERSION_ISERVERPLUGINHELPERS);
|
||||||
|
GET_V_IFACE_CURRENT(GetEngineFactory, icvar, ICvar, CVAR_INTERFACE_VERSION);
|
||||||
GET_V_IFACE_ANY(GetServerFactory, server, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
|
GET_V_IFACE_ANY(GetServerFactory, server, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
|
||||||
GET_V_IFACE_ANY(GetServerFactory, gameclients, IServerGameClients, INTERFACEVERSION_SERVERGAMECLIENTS);
|
GET_V_IFACE_ANY(GetServerFactory, gameclients, IServerGameClients, INTERFACEVERSION_SERVERGAMECLIENTS);
|
||||||
GET_V_IFACE_ANY(GetServerFactory, playerinfomanager, IPlayerInfoManager, INTERFACEVERSION_PLAYERINFOMANAGER);
|
GET_V_IFACE_ANY(GetServerFactory, playerinfomanager, IPlayerInfoManager, INTERFACEVERSION_PLAYERINFOMANAGER);
|
||||||
@ -102,7 +104,7 @@ bool StubPlugin::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bo
|
|||||||
ENGINE_CALL(&IVEngineServer::LogPrint)("All hooks started!\n");
|
ENGINE_CALL(&IVEngineServer::LogPrint)("All hooks started!\n");
|
||||||
|
|
||||||
#if defined ENGINE_ORANGEBOX
|
#if defined ENGINE_ORANGEBOX
|
||||||
g_pCVar = ICvar;
|
g_pCVar = icvar;
|
||||||
ConVar_Register(0, &s_BaseAccessor);
|
ConVar_Register(0, &s_BaseAccessor);
|
||||||
#elif defined ENGINE_ORIGINAL
|
#elif defined ENGINE_ORIGINAL
|
||||||
ConCommandBaseMgr::OneTimeInit(&s_BaseAccessor);
|
ConCommandBaseMgr::OneTimeInit(&s_BaseAccessor);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user