mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-12-07 02:18:30 +00:00
Merge pull request #17 from alliedmodders/shim-noshim
Shim for TF2-branch games to find latest, non-shimmed engine iface.
This commit is contained in:
parent
05ae15c23c
commit
fa9ba7859f
@ -108,7 +108,16 @@ void BaseProvider::ConsolePrint(const char *str)
|
|||||||
void BaseProvider::Notify_DLLInit_Pre(CreateInterfaceFn engineFactory,
|
void BaseProvider::Notify_DLLInit_Pre(CreateInterfaceFn engineFactory,
|
||||||
CreateInterfaceFn serverFactory)
|
CreateInterfaceFn serverFactory)
|
||||||
{
|
{
|
||||||
|
#if SOURCE_ENGINE == SE_TF2 || SOURCE_ENGINE == SE_CSS || SOURCE_ENGINE == SE_DODS || SOURCE_ENGINE == SE_HL2DM || SOURCE_ENGINE == SE_SDK2013
|
||||||
|
// Shim to avoid hooking shims
|
||||||
|
engine = (IVEngineServer *)((engineFactory)("VEngineServer023", NULL));
|
||||||
|
if (!engine)
|
||||||
|
{
|
||||||
|
engine = (IVEngineServer *)((engineFactory)("VEngineServer022", NULL));
|
||||||
|
}
|
||||||
|
#else
|
||||||
engine = (IVEngineServer *)((engineFactory)(INTERFACEVERSION_VENGINESERVER, NULL));
|
engine = (IVEngineServer *)((engineFactory)(INTERFACEVERSION_VENGINESERVER, NULL));
|
||||||
|
#endif
|
||||||
if (!engine)
|
if (!engine)
|
||||||
{
|
{
|
||||||
DisplayError("Could not find IVEngineServer! Metamod cannot load.");
|
DisplayError("Could not find IVEngineServer! Metamod cannot load.");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user