Add GetGameRules to ISDKTools (bug 4707, r=pred)
This commit is contained in:
parent
ac738aff10
commit
616113d384
@ -441,6 +441,11 @@ public:
|
||||
{
|
||||
return iserver;
|
||||
}
|
||||
|
||||
virtual IGameRules *GetGameRules()
|
||||
{
|
||||
return (IGameRules*)g_pGameRules;
|
||||
}
|
||||
} g_SDKTools_API;
|
||||
|
||||
static void InitSDKToolsAPI()
|
||||
|
@ -35,9 +35,10 @@
|
||||
#include <IShareSys.h>
|
||||
|
||||
#define SMINTERFACE_SDKTOOLS_NAME "ISDKTools"
|
||||
#define SMINTERFACE_SDKTOOLS_VERSION 1
|
||||
#define SMINTERFACE_SDKTOOLS_VERSION 2
|
||||
|
||||
class IServer;
|
||||
class IGameRules;
|
||||
|
||||
/**
|
||||
* @brief SDKTools shared API
|
||||
@ -61,6 +62,13 @@ namespace SourceMod
|
||||
* @return IServer pointer, or NULL if SDKTools was unable to find one.
|
||||
*/
|
||||
virtual IServer* GetIServer() = 0;
|
||||
|
||||
/**
|
||||
* @brief Returns a pointer to GameRules if one was found.
|
||||
*
|
||||
* @return GameRules pointer, or NULL if SDKTools was unable to find one.
|
||||
*/
|
||||
virtual IGameRules* GetGameRules() = 0;
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user