1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-03-22 13:19:40 +01:00

builds on OB again

--HG--
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40649
This commit is contained in:
David Anderson 2008-02-17 23:40:37 +00:00
parent a571e46c44
commit c4eeaaf2d1
3 changed files with 7 additions and 2 deletions

View File

@ -35,7 +35,7 @@ ifeq "$(ENGINE)" "orangebox"
HL2PUB = $(HL2SDK_OB)/public
CFLAGS += -DENGINE_ORANGEBOX
METAMOD = $(SOURCEMM16)
INCLUDE += -I$(HL2SDK)/game/server
INCLUDE += -I$(HL2SDK)/public/game/server
SRCDS = $(SRCDS_BASE)/orangebox
endif

View File

@ -58,12 +58,15 @@ public:
}
};
#define CVAR_INTERFACE_VERSION VENGINE_CVAR_INTERFACE_VERSION
#define ENGINE_CALL(func) SH_CALL(m_EngineCC, func)
#elif defined ENGINE_ORANGEBOX
#define ENGINE_CALL(func) SH_CALL(engine, func)
#define MM_Format g_SMAPI->Format
#endif
#endif //_INCLUDE_SOURCE_ENGINE_WRAPPERS_

View File

@ -44,6 +44,7 @@ IServerPluginHelpers *helpers = NULL;
IGameEventManager2 *gameevents = NULL;
IServerPluginCallbacks *vsp_callbacks = NULL;
IPlayerInfoManager *playerinfomanager = NULL;
ICvar *icvar = NULL;
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, gameevents, IGameEventManager2, INTERFACEVERSION_GAMEEVENTSMANAGER2);
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, gameclients, IServerGameClients, INTERFACEVERSION_SERVERGAMECLIENTS);
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");
#if defined ENGINE_ORANGEBOX
g_pCVar = ICvar;
g_pCVar = icvar;
ConVar_Register(0, &s_BaseAccessor);
#elif defined ENGINE_ORIGINAL
ConCommandBaseMgr::OneTimeInit(&s_BaseAccessor);