2007-03-01 02:02:47 +01:00
|
|
|
/**
|
|
|
|
* vim: set ts=4 :
|
|
|
|
* ===============================================================
|
|
|
|
* SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
|
|
|
|
* ===============================================================
|
|
|
|
*
|
|
|
|
* This file is not open source and may not be copied without explicit
|
|
|
|
* written permission of AlliedModders LLC. This file may not be redistributed
|
|
|
|
* in whole or significant part.
|
|
|
|
* For information, see LICENSE.txt or http://www.sourcemod.net/license.php
|
|
|
|
*
|
|
|
|
* Version: $Id$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INCLUDE_SOURCEMOD_CHALFLIFE2_H_
|
|
|
|
#define _INCLUDE_SOURCEMOD_CHALFLIFE2_H_
|
|
|
|
|
|
|
|
#include <sh_list.h>
|
|
|
|
#include "sm_trie.h"
|
|
|
|
#include "sm_globals.h"
|
|
|
|
#include "dt_send.h"
|
|
|
|
#include "server_class.h"
|
|
|
|
|
|
|
|
using namespace SourceHook;
|
|
|
|
|
|
|
|
struct DataTableInfo
|
|
|
|
{
|
|
|
|
ServerClass *sc;
|
|
|
|
Trie *lookup;
|
|
|
|
};
|
|
|
|
|
2007-04-11 17:05:56 +02:00
|
|
|
class CHalfLife2 : public SMGlobalClass
|
2007-03-01 02:02:47 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
CHalfLife2();
|
|
|
|
~CHalfLife2();
|
|
|
|
public:
|
2007-04-11 17:05:56 +02:00
|
|
|
void OnSourceModStartup(bool late);
|
|
|
|
/*void OnSourceModAllShutdown();*/
|
2007-03-01 02:02:47 +01:00
|
|
|
public:
|
|
|
|
SendProp *FindInSendTable(const char *classname, const char *offset);
|
2007-03-01 05:18:23 +01:00
|
|
|
ServerClass *FindServerClass(const char *classname);
|
|
|
|
private:
|
|
|
|
DataTableInfo *_FindServerClass(const char *classname);
|
|
|
|
private:
|
2007-03-01 02:02:47 +01:00
|
|
|
Trie *m_pClasses;
|
|
|
|
List<DataTableInfo *> m_Tables;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern CHalfLife2 g_HL2;
|
|
|
|
|
|
|
|
#endif //_INCLUDE_SOURCEMOD_CHALFLIFE2_H_
|