Add GetGameRules to ISDKTools (bug 4707, r=fyren)
This commit is contained in:
parent
264e42a4c5
commit
61b677c073
@ -441,6 +441,14 @@ public:
|
|||||||
{
|
{
|
||||||
return iserver;
|
return iserver;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void *GetGameRules()
|
||||||
|
{
|
||||||
|
if (!g_pGameRules)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return *g_pGameRules;
|
||||||
|
}
|
||||||
} g_SDKTools_API;
|
} g_SDKTools_API;
|
||||||
|
|
||||||
static void InitSDKToolsAPI()
|
static void InitSDKToolsAPI()
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include <IShareSys.h>
|
#include <IShareSys.h>
|
||||||
|
|
||||||
#define SMINTERFACE_SDKTOOLS_NAME "ISDKTools"
|
#define SMINTERFACE_SDKTOOLS_NAME "ISDKTools"
|
||||||
#define SMINTERFACE_SDKTOOLS_VERSION 1
|
#define SMINTERFACE_SDKTOOLS_VERSION 2
|
||||||
|
|
||||||
class IServer;
|
class IServer;
|
||||||
|
|
||||||
@ -61,6 +61,13 @@ namespace SourceMod
|
|||||||
* @return IServer pointer, or NULL if SDKTools was unable to find one.
|
* @return IServer pointer, or NULL if SDKTools was unable to find one.
|
||||||
*/
|
*/
|
||||||
virtual IServer* GetIServer() = 0;
|
virtual IServer* GetIServer() = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns a pointer to game's CGameRules class.
|
||||||
|
*
|
||||||
|
* @return CGameRules pointer or NULL if not found.
|
||||||
|
*/
|
||||||
|
virtual void* GetGameRules() = 0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user