mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-20 13:54:14 +01:00
Added META_NO_HL2SDK define to stop MM:S headers using the HL2SDK (bug 5079, r=dvander).
This commit is contained in:
parent
82ecaa1d6b
commit
37abddb712
@ -34,8 +34,6 @@
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <interface.h>
|
||||
#include <eiface.h>
|
||||
#include <sourcehook.h>
|
||||
#include <IPluginManager.h>
|
||||
#include <ISmmPlugin.h>
|
||||
@ -52,6 +50,17 @@
|
||||
#define MMIFACE_SH_HOOKMANAUTOGEN "IHookManagerAutoGen" /**< SourceHook::IHookManagerAutoGen Pointer */
|
||||
#define IFACE_MAXNUM 999 /**< Maximum interface version */
|
||||
|
||||
#if defined META_NO_HL2SDK
|
||||
class CGlobalVars;
|
||||
class IServerPluginCallbacks;
|
||||
struct edict_t;
|
||||
class ConCommandBase;
|
||||
#else
|
||||
#include <eiface.h>
|
||||
#endif
|
||||
|
||||
typedef void* (*CreateInterfaceFn)(const char *pName, int *pReturnCode);
|
||||
|
||||
namespace SourceMM
|
||||
{
|
||||
class ISmmPlugin;
|
||||
|
@ -34,7 +34,6 @@
|
||||
* The pure-virtual ISmmPlugin callbacks must be implemented for the load to load.
|
||||
*/
|
||||
|
||||
#include <interface.h>
|
||||
#include <sourcehook.h>
|
||||
#include <IPluginManager.h>
|
||||
#include <ISmmAPI.h>
|
||||
@ -268,7 +267,7 @@ namespace SourceMM
|
||||
* wrapper. This can be used to provide interfaces to other plugins or
|
||||
* the GameDLL.
|
||||
*
|
||||
* If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.
|
||||
* If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED.
|
||||
*
|
||||
* @param iface Interface string.
|
||||
* @param ret Optional pointer to store return code.
|
||||
@ -279,7 +278,7 @@ namespace SourceMM
|
||||
{
|
||||
if (ret)
|
||||
{
|
||||
*ret = IFACE_FAILED;
|
||||
*ret = META_IFACE_FAILED;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@ -290,7 +289,7 @@ namespace SourceMM
|
||||
* Metamod:Source's wrapper. This can be used to provide interfaces to
|
||||
* other plugins.
|
||||
*
|
||||
* If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.
|
||||
* If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED.
|
||||
*
|
||||
* @param iface Interface string.
|
||||
* @param ret Optional pointer to store return code.
|
||||
@ -301,7 +300,7 @@ namespace SourceMM
|
||||
{
|
||||
if (ret)
|
||||
{
|
||||
*ret = IFACE_FAILED;
|
||||
*ret = META_IFACE_FAILED;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@ -312,7 +311,7 @@ namespace SourceMM
|
||||
* Metamod:Source's wrapper. This can be used to provide interfaces to
|
||||
* other plugins.
|
||||
*
|
||||
* If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.
|
||||
* If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED.
|
||||
*
|
||||
* @param iface Interface string.
|
||||
* @param ret Optional pointer to store return code.
|
||||
@ -323,7 +322,7 @@ namespace SourceMM
|
||||
{
|
||||
if (ret)
|
||||
{
|
||||
*ret = IFACE_FAILED;
|
||||
*ret = META_IFACE_FAILED;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@ -334,7 +333,7 @@ namespace SourceMM
|
||||
* Metamod:Source's wrapper. This can be used to provide interfaces to
|
||||
* other plugins.
|
||||
*
|
||||
* If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.
|
||||
* If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED.
|
||||
*
|
||||
* @param iface Interface string.
|
||||
* @param ret Optional pointer to store return code.
|
||||
@ -345,7 +344,7 @@ namespace SourceMM
|
||||
{
|
||||
if (ret)
|
||||
{
|
||||
*ret = IFACE_FAILED;
|
||||
*ret = META_IFACE_FAILED;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@ -355,7 +354,7 @@ namespace SourceMM
|
||||
* @brief Called when Metamod's own factory is invoked.
|
||||
* This can be used to provide interfaces to other plugins.
|
||||
*
|
||||
* If ret is passed, you should fill it with IFACE_OK or IFACE_FAILED.
|
||||
* If ret is passed, you should fill it with META_IFACE_OK or META_IFACE_FAILED.
|
||||
*
|
||||
* @param iface Interface string.
|
||||
* @param ret Optional pointer to store return code.
|
||||
@ -366,7 +365,7 @@ namespace SourceMM
|
||||
{
|
||||
if (ret)
|
||||
{
|
||||
*ret = IFACE_FAILED;
|
||||
*ret = META_IFACE_FAILED;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
@ -28,6 +28,13 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
// Interface return status, binary-compatible with HL2SDK's IFACE_OK and IFACE_FAILED.
|
||||
enum
|
||||
{
|
||||
META_IFACE_OK = 0,
|
||||
META_IFACE_FAILED
|
||||
};
|
||||
|
||||
/**
|
||||
* @file ISmmPluginExt.h Provides an alternate method for loading plugins,
|
||||
* without needing to include the default headers and all their Half-Life baggage.
|
||||
|
Loading…
x
Reference in New Issue
Block a user