Checkin missing chunks from bug 5680 (ref bug 5691).
This commit is contained in:
parent
9b5ca124ab
commit
6cb67a19e7
@ -58,38 +58,6 @@ CRemoteExtension::CRemoteExtension(IExtensionInterface *pAPI, const char *filena
|
||||
m_pAPI = pAPI;
|
||||
}
|
||||
|
||||
#if defined METAMOD_PLAPI_VERSION
|
||||
#if SOURCE_ENGINE == SE_LEFT4DEAD
|
||||
#define GAMEFIX "2.l4d"
|
||||
#elif SOURCE_ENGINE == SE_LEFT4DEAD2
|
||||
#define GAMEFIX "2.l4d2"
|
||||
#elif SOURCE_ENGINE == SE_ALIENSWARM
|
||||
#define GAMEFIX "2.swarm"
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOX
|
||||
#define GAMEFIX "2.ep2"
|
||||
#elif SOURCE_ENGINE == SE_BLOODYGOODTIME
|
||||
#define GAMEFIX "2.bgt"
|
||||
#elif SOURCE_ENGINE == SE_EYE
|
||||
#define GAMEFIX "2.eye"
|
||||
#elif SOURCE_ENGINE == SE_CSS
|
||||
#define GAMEFIX "2.css"
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
#define GAMEFIX "2.ep2v"
|
||||
#elif SOURCE_ENGINE == SE_DARKMESSIAH
|
||||
#define GAMEFIX "2.darkm"
|
||||
#elif SOURCE_ENGINE == SE_PORTAL2
|
||||
#define GAMEFIX "2.portal2"
|
||||
#elif SOURCE_ENGINE == SE_CSGO
|
||||
#define GAMEFIX "2.csgo"
|
||||
#elif SOURCE_ENGINE == SE_DOTA
|
||||
#define GAMEFIX "2.dota"
|
||||
#else
|
||||
#define GAMEFIX "2.ep1"
|
||||
#endif //(SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
#else //METAMOD_PLAPI_VERSION
|
||||
#define GAMEFIX "1.ep1"
|
||||
#endif //METAMOD_PLAPI_VERSION
|
||||
|
||||
CLocalExtension::CLocalExtension(const char *filename)
|
||||
{
|
||||
m_PlId = 0;
|
||||
@ -107,8 +75,9 @@ CLocalExtension::CLocalExtension(const char *filename)
|
||||
g_pSM->BuildPath(Path_SM,
|
||||
path,
|
||||
PLATFORM_MAX_PATH,
|
||||
"extensions/%s." GAMEFIX "." PLATFORM_LIB_EXT,
|
||||
filename);
|
||||
"extensions/%s.%s." PLATFORM_LIB_EXT,
|
||||
filename,
|
||||
smcore.gamesuffix);
|
||||
|
||||
if (libsys->IsPathFile(path))
|
||||
{
|
||||
@ -119,8 +88,9 @@ CLocalExtension::CLocalExtension(const char *filename)
|
||||
g_pSM->BuildPath(Path_SM,
|
||||
path,
|
||||
PLATFORM_MAX_PATH,
|
||||
"extensions/auto." GAMEFIX "/%s." PLATFORM_LIB_EXT,
|
||||
filename);
|
||||
"extensions/auto.%s/%s." PLATFORM_LIB_EXT,
|
||||
filename,
|
||||
smcore.gamesuffix);
|
||||
|
||||
/* Try the "normal" version */
|
||||
if (!libsys->IsPathFile(path))
|
||||
@ -509,11 +479,13 @@ void CExtensionManager::OnSourceModAllInitialized()
|
||||
{
|
||||
g_ExtType = g_ShareSys.CreateIdentType("EXTENSION");
|
||||
pluginsys->AddPluginsListener(this);
|
||||
rootmenu->AddRootConsoleCommand("exts", "Manage extensions", this);
|
||||
g_ShareSys.AddInterface(NULL, this);
|
||||
}
|
||||
|
||||
void CExtensionManager::OnSourceModShutdown()
|
||||
{
|
||||
rootmenu->RemoveRootConsoleCommand("exts", this);
|
||||
pluginsys->RemovePluginsListener(this);
|
||||
g_ShareSys.DestroyIdentType(g_ExtType);
|
||||
}
|
||||
|
@ -138,7 +138,8 @@ public:
|
||||
class CExtensionManager :
|
||||
public IExtensionSys,
|
||||
public SMGlobalClass,
|
||||
public IPluginsListener
|
||||
public IPluginsListener,
|
||||
public IRootConsoleCommand
|
||||
{
|
||||
public:
|
||||
CExtensionManager();
|
||||
|
@ -49,7 +49,7 @@ using namespace SourceHook;
|
||||
* Add 1 to the RHS of this expression to bump the intercom file
|
||||
* This is to prevent mismatching core/logic binaries
|
||||
*/
|
||||
#define SM_LOGIC_MAGIC (0x0F47C0DE - 20)
|
||||
#define SM_LOGIC_MAGIC (0x0F47C0DE - 21)
|
||||
|
||||
#if defined SM_LOGIC
|
||||
class IVEngineServer
|
||||
@ -248,6 +248,7 @@ struct sm_core_t
|
||||
void (*DoGlobalPluginLoads)();
|
||||
bool (*AreConfigsExecuted)();
|
||||
void (*ExecuteConfigs)(IPluginContext *ctx);
|
||||
const char *gamesuffix;
|
||||
/* Data */
|
||||
ServerGlobals *serverGlobals;
|
||||
void * serverFactory;
|
||||
|
@ -283,6 +283,38 @@ void do_global_plugin_loads()
|
||||
g_SourceMod.DoGlobalPluginLoads();
|
||||
}
|
||||
|
||||
#if defined METAMOD_PLAPI_VERSION
|
||||
#if SOURCE_ENGINE == SE_LEFT4DEAD
|
||||
#define GAMEFIX "2.l4d"
|
||||
#elif SOURCE_ENGINE == SE_LEFT4DEAD2
|
||||
#define GAMEFIX "2.l4d2"
|
||||
#elif SOURCE_ENGINE == SE_ALIENSWARM
|
||||
#define GAMEFIX "2.swarm"
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOX
|
||||
#define GAMEFIX "2.ep2"
|
||||
#elif SOURCE_ENGINE == SE_BLOODYGOODTIME
|
||||
#define GAMEFIX "2.bgt"
|
||||
#elif SOURCE_ENGINE == SE_EYE
|
||||
#define GAMEFIX "2.eye"
|
||||
#elif SOURCE_ENGINE == SE_CSS
|
||||
#define GAMEFIX "2.css"
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
#define GAMEFIX "2.ep2v"
|
||||
#elif SOURCE_ENGINE == SE_DARKMESSIAH
|
||||
#define GAMEFIX "2.darkm"
|
||||
#elif SOURCE_ENGINE == SE_PORTAL2
|
||||
#define GAMEFIX "2.portal2"
|
||||
#elif SOURCE_ENGINE == SE_CSGO
|
||||
#define GAMEFIX "2.csgo"
|
||||
#elif SOURCE_ENGINE == SE_DOTA
|
||||
#define GAMEFIX "2.dota"
|
||||
#else
|
||||
#define GAMEFIX "2.ep1"
|
||||
#endif //(SOURCE_ENGINE == SE_LEFT4DEAD) || (SOURCE_ENGINE == SE_LEFT4DEAD2)
|
||||
#else //METAMOD_PLAPI_VERSION
|
||||
#define GAMEFIX "1.ep1"
|
||||
#endif //METAMOD_PLAPI_VERSION
|
||||
|
||||
static ServerGlobals serverGlobals;
|
||||
|
||||
static sm_core_t core_bridge =
|
||||
@ -328,6 +360,7 @@ static sm_core_t core_bridge =
|
||||
do_global_plugin_loads,
|
||||
SM_AreConfigsExecuted,
|
||||
SM_ExecuteForPlugin,
|
||||
GAMEFIX,
|
||||
&serverGlobals
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user