Remove the need for SDK's. Update AMBuild scripts to AMBuild2. Fix shutdown crash. Update gamedata for testing. General code fixups.

This commit is contained in:
Dr!fter
2014-08-19 13:14:48 -04:00
parent 6c0a1b3dcb
commit 0f64a45a2b
26 changed files with 602 additions and 1869 deletions
+12 -8
View File
@@ -298,8 +298,10 @@ ISmmPlugin *g_PLAPI = NULL; /**< Metamod plugin API */
SourceHook::ISourceHook *g_SHPtr = NULL; /**< SourceHook pointer */
ISmmAPI *g_SMAPI = NULL; /**< SourceMM API pointer */
#if !defined META_NO_HL2SDK
IVEngineServer *engine = NULL; /**< IVEngineServer pointer */
IServerGameDLL *gamedll = NULL; /**< IServerGameDLL pointer */
#endif
/** Exposes the extension to Metamod */
SMM_API void *PL_EXPOSURE(const char *name, int *code)
@@ -312,14 +314,14 @@ SMM_API void *PL_EXPOSURE(const char *name, int *code)
{
if (code)
{
*code = IFACE_OK;
*code = META_IFACE_OK;
}
return static_cast<void *>(g_pExtensionIface);
}
if (code)
{
*code = IFACE_FAILED;
*code = META_IFACE_FAILED;
}
return NULL;
@@ -329,12 +331,14 @@ bool SDKExtension::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen,
{
PLUGIN_SAVEVARS();
#if !defined METAMOD_PLAPI_VERSION
GET_V_IFACE_ANY(serverFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
GET_V_IFACE_CURRENT(engineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
#else
GET_V_IFACE_ANY(GetServerFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
GET_V_IFACE_CURRENT(GetEngineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
#if !defined META_NO_HL2SDK
#if !defined METAMOD_PLAPI_VERSION
GET_V_IFACE_ANY(serverFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
GET_V_IFACE_CURRENT(engineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
#else
GET_V_IFACE_ANY(GetServerFactory, gamedll, IServerGameDLL, INTERFACEVERSION_SERVERGAMEDLL);
GET_V_IFACE_CURRENT(GetEngineFactory, engine, IVEngineServer, INTERFACEVERSION_VENGINESERVER);
#endif
#endif
m_SourceMMLoaded = true;
+5 -3
View File
@@ -100,7 +100,7 @@
#if defined SMEXT_CONF_METAMOD
#include <ISmmPlugin.h>
#include <eiface.h>
//#include <eiface.h>
#endif
using namespace SourceMod;
@@ -301,8 +301,10 @@ extern INativeInterface *ninvoke;
#if defined SMEXT_CONF_METAMOD
PLUGIN_GLOBALVARS();
extern IVEngineServer *engine;
extern IServerGameDLL *gamedll;
#if !defined META_NO_HL2SDK
extern IVEngineServer *engine;
extern IServerGameDLL *gamedll;
#endif
#endif
/** Creates a SourceMod interface macro pair */