From 58af1b7c4a850c7748705b4b0bbbf741d65e8fab Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 23 Nov 2008 22:02:49 -0600 Subject: [PATCH] Fixed regression in ISmmAPI::serverFactory. --- core-legacy/CSmmAPI.cpp | 2 +- core-legacy/gamedll_bridge.cpp | 5 +++++ core-legacy/sourcemm.h | 10 +--------- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/core-legacy/CSmmAPI.cpp b/core-legacy/CSmmAPI.cpp index 601fadb..9cbcc18 100644 --- a/core-legacy/CSmmAPI.cpp +++ b/core-legacy/CSmmAPI.cpp @@ -73,7 +73,7 @@ CreateInterfaceFn CSmmAPI::fileSystemFactory(bool syn) CreateInterfaceFn CSmmAPI::serverFactory(bool syn) { if (syn) - return CreateInterface; + return ServerFactory; return g_GameDll.factory; } diff --git a/core-legacy/gamedll_bridge.cpp b/core-legacy/gamedll_bridge.cpp index c264717..7c38efd 100644 --- a/core-legacy/gamedll_bridge.cpp +++ b/core-legacy/gamedll_bridge.cpp @@ -74,6 +74,11 @@ GetGameDllBridge() return &mm14_gamedll_bridge; } +void *ServerFactory(const char *name, int *code) +{ + return mm14_gamedll_bridge.QueryInterface(name, code); +} + /* Wrapper function. This is called when the GameDLL thinks it's using * the engine's real engineFactory. */ diff --git a/core-legacy/sourcemm.h b/core-legacy/sourcemm.h index 4302a5c..f0ee874 100644 --- a/core-legacy/sourcemm.h +++ b/core-legacy/sourcemm.h @@ -42,18 +42,10 @@ #define MIN_GAMEDLL_VERSION 3 #define MAX_GAMEDLL_VERSION 8 -/** - * @brief Entry point for HL2 Engine - */ -SMM_API void *CreateInterface(const char *name, int *code); -/** @brief Wrapper to catch GameDLL calls */ +void *ServerFactory(const char *name, int *code); void *EngineFactory(const char *name, int *code); - -/** @brief Wrapper to catch GameDLL calls */ void *PhysicsFactory(const char *name, int *code); - -/** @brief Wrapper to catch GameDLL calls */ void *FileSystemFactory(const char *name, int *code); /** @brief Loads all plugins found in a file */