mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-12-09 11:28:33 +00:00
Backported GetSourceEngineBuild from new API to legacy API (bug 4082, r=ds).
This commit is contained in:
parent
e93bd0fdbb
commit
88974ed0b5
@ -646,3 +646,8 @@ IServerPluginCallbacks *CSmmAPI::GetVSPInfo(int *pVersion)
|
|||||||
|
|
||||||
return g_pRealVspCallbacks;
|
return g_pRealVspCallbacks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CSmmAPI::GetSourceEngineBuild()
|
||||||
|
{
|
||||||
|
return g_Engine.original ? SOURCE_ENGINE_ORIGINAL : SOURCE_ENGINE_EPISODEONE;
|
||||||
|
}
|
||||||
|
|||||||
@ -71,6 +71,7 @@ namespace SourceMM
|
|||||||
int GetUserMessageCount();
|
int GetUserMessageCount();
|
||||||
int FindUserMessage(const char *name, int *size=NULL);
|
int FindUserMessage(const char *name, int *size=NULL);
|
||||||
const char *GetUserMessage(int index, int *size=NULL);
|
const char *GetUserMessage(int index, int *size=NULL);
|
||||||
|
int GetSourceEngineBuild();
|
||||||
public:
|
public:
|
||||||
bool CacheCmds();
|
bool CacheCmds();
|
||||||
bool CmdCacheSuccessful();
|
bool CmdCacheSuccessful();
|
||||||
|
|||||||
@ -35,6 +35,10 @@ class ISmmPlugin;
|
|||||||
#define MMIFACE_PLMANAGER "IPluginManager" /**< SourceMM Plugin Functions */
|
#define MMIFACE_PLMANAGER "IPluginManager" /**< SourceMM Plugin Functions */
|
||||||
#define IFACE_MAXNUM 999
|
#define IFACE_MAXNUM 999
|
||||||
|
|
||||||
|
#define SOURCE_ENGINE_UNKNOWN 0 /**< Could not determine the engine version */
|
||||||
|
#define SOURCE_ENGINE_ORIGINAL 1 /**< Original Source Engine (used by The Ship) */
|
||||||
|
#define SOURCE_ENGINE_EPISODEONE 2 /**< Episode 1 Source Engine (second major SDK) */
|
||||||
|
|
||||||
class ISmmAPI
|
class ISmmAPI
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -316,6 +320,17 @@ public: // Added in 1.4 (1:5)
|
|||||||
* EnableVSPListener().
|
* EnableVSPListener().
|
||||||
*/
|
*/
|
||||||
virtual IServerPluginCallbacks *GetVSPInfo(int *pVersion) =0;
|
virtual IServerPluginCallbacks *GetVSPInfo(int *pVersion) =0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the engine interface that MM:S is using as a backend.
|
||||||
|
*
|
||||||
|
* The values will be one of the SOURCE_ENGINE_* constants from the top
|
||||||
|
* of this file.
|
||||||
|
*
|
||||||
|
* @return A SOURCE_ENGINE_* constant value.
|
||||||
|
*/
|
||||||
|
virtual int GetSourceEngineBuild() =0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user