core/HalfLife2.h
changeset 682 a70055d6d3b3
parent 677 e2ae32d5132c
child 685 7b768fa29f08
     1.1 --- a/core/HalfLife2.h	Wed Apr 11 20:07:20 2007 +0000
     1.2 +++ b/core/HalfLife2.h	Thu Apr 12 00:45:53 2007 +0000
     1.3 @@ -16,10 +16,12 @@
     1.4  #define _INCLUDE_SOURCEMOD_CHALFLIFE2_H_
     1.5  
     1.6  #include <sh_list.h>
     1.7 +#include <sh_tinyhash.h>
     1.8  #include "sm_trie.h"
     1.9  #include "sm_globals.h"
    1.10  #include "dt_send.h"
    1.11  #include "server_class.h"
    1.12 +#include "datamap.h"
    1.13  
    1.14  using namespace SourceHook;
    1.15  
    1.16 @@ -29,6 +31,12 @@
    1.17  	Trie *lookup;
    1.18  };
    1.19  
    1.20 +struct DataMapTrie
    1.21 +{
    1.22 +	DataMapTrie() : trie(NULL) {}
    1.23 +	Trie *trie;
    1.24 +};
    1.25 +
    1.26  class CHalfLife2 : public SMGlobalClass
    1.27  {
    1.28  public:
    1.29 @@ -40,11 +48,13 @@
    1.30  public:
    1.31  	SendProp *FindInSendTable(const char *classname, const char *offset);
    1.32  	ServerClass *FindServerClass(const char *classname);
    1.33 +	typedescription_t *FindInDataMap(datamap_t *pMap, const char *offset);
    1.34  private:
    1.35  	DataTableInfo *_FindServerClass(const char *classname);
    1.36  private:
    1.37  	Trie *m_pClasses;
    1.38  	List<DataTableInfo *> m_Tables;
    1.39 +	THash<datamap_t *, DataMapTrie> m_Maps;
    1.40  };
    1.41  
    1.42  extern CHalfLife2 g_HL2;