Refactor SDKTools to not expose gamerules ptr ptr outside of vglobals.cpp.

This commit is contained in:
Nicholas Hastings
2014-12-13 15:48:51 -05:00
parent b607bfeca9
commit 939b10bd8e
6 changed files with 54 additions and 47 deletions
+3 -4
View File
@@ -340,6 +340,8 @@ bool SDKTools::RegisterConCommandBase(ConCommandBase *pVar)
bool SDKTools::LevelInit(char const *pMapName, char const *pMapEntities, char const *pOldLevel, char const *pLandmarkName, bool loadGame, bool background)
{
m_bAnyLevelInited = true;
const char *name;
char key[32];
int count, n = 1;
@@ -472,10 +474,7 @@ public:
virtual void *GetGameRules()
{
if (!g_pGameRules)
return NULL;
return *g_pGameRules;
return GameRules();
}
} g_SDKTools_API;