finally exposed IGameHelpers interface
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40971
This commit is contained in:
@@ -85,6 +85,7 @@ void CHalfLife2::OnSourceModStartup(bool late)
|
||||
void CHalfLife2::OnSourceModAllInitialized()
|
||||
{
|
||||
m_MsgTextMsg = g_UserMsgs.GetMessageIndex("TextMsg");
|
||||
g_ShareSys.AddInterface(NULL, this);
|
||||
}
|
||||
|
||||
IChangeInfoAccessor *CBaseEdict::GetChangeAccessor()
|
||||
|
||||
+7
-6
@@ -19,12 +19,10 @@
|
||||
#include <sh_tinyhash.h>
|
||||
#include "sm_trie.h"
|
||||
#include "sm_globals.h"
|
||||
#include <dt_send.h>
|
||||
#include <server_class.h>
|
||||
#include <datamap.h>
|
||||
#include <edict.h>
|
||||
#include <IGameHelpers.h>
|
||||
|
||||
using namespace SourceHook;
|
||||
using namespace SourceMod;
|
||||
|
||||
#define HUD_PRINTTALK 3
|
||||
#define HUD_PRINTCENTER 4
|
||||
@@ -41,7 +39,9 @@ struct DataMapTrie
|
||||
Trie *trie;
|
||||
};
|
||||
|
||||
class CHalfLife2 : public SMGlobalClass
|
||||
class CHalfLife2 :
|
||||
public SMGlobalClass,
|
||||
public IGameHelpers
|
||||
{
|
||||
public:
|
||||
CHalfLife2();
|
||||
@@ -50,8 +50,9 @@ public:
|
||||
void OnSourceModStartup(bool late);
|
||||
void OnSourceModAllInitialized();
|
||||
/*void OnSourceModAllShutdown();*/
|
||||
public:
|
||||
public: //IGameHelpers
|
||||
SendProp *FindInSendTable(const char *classname, const char *offset);
|
||||
datamap_t *GetDataMap(CBaseEntity *pEntity);
|
||||
ServerClass *FindServerClass(const char *classname);
|
||||
typedescription_t *FindInDataMap(datamap_t *pMap, const char *offset);
|
||||
void SetEdictStateChanged(edict_t *pEdict, unsigned short offset);
|
||||
|
||||
@@ -472,6 +472,10 @@
|
||||
RelativePath="..\..\public\IGameConfigs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\public\IGameHelpers.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\public\IHandleSys.h"
|
||||
>
|
||||
|
||||
@@ -109,6 +109,12 @@ inline datamap_t *CBaseEntity_GetDataDescMap(CBaseEntity *pEntity)
|
||||
return VGetDataDescMap(pEntity, offset);
|
||||
}
|
||||
|
||||
/* :TODO: Move this! */
|
||||
datamap_t *CHalfLife2::GetDataMap(CBaseEntity *pEntity)
|
||||
{
|
||||
return CBaseEntity_GetDataDescMap(pEntity);
|
||||
}
|
||||
|
||||
static cell_t GetMaxEntities(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
return gpGlobals->maxEntities;
|
||||
|
||||
Reference in New Issue
Block a user