Update CS:GO team score gamedata.
3 * =============================================================================
4 * SourceMod SDKTools Extension
5 * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.
6 * =============================================================================
8 * This program is free software; you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, version 3.0, as published by the
10 * Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * You should have received a copy of the GNU General Public License along with
18 * this program. If not, see <http://www.gnu.org/licenses/>.
20 * As a special exception, AlliedModders LLC gives you permission to link the
21 * code of this program (as well as its derivative works) to "Half-Life 2," the
22 * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
23 * by the Valve Corporation. You must obey the GNU General Public License in
24 * all respects for all other code used. Additionally, AlliedModders LLC grants
25 * this exception to all derivative works. AlliedModders LLC defines further
26 * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
27 * or <http://www.sourcemod.net/license.php>.
32 #ifndef _INCLUDE_SOURCEMOD_TEMPENTS_H_
33 #define _INCLUDE_SOURCEMOD_TEMPENTS_H_
35 #include "extension.h"
36 #include <irecipientfilter.h>
38 #include <sh_string.h>
44 TempEntityInfo(const char *name, void *me);
46 const char *GetName();
47 ServerClass *GetServerClass();
48 bool IsValidProp(const char *name);
49 bool TE_SetEntData(const char *name, int value);
50 bool TE_SetEntDataFloat(const char *name, float value);
51 bool TE_SetEntDataVector(const char *name, float vector[3]);
52 bool TE_SetEntDataFloatArray(const char *name, cell_t *array, int size);
53 bool TE_GetEntData(const char *name, int *value);
54 bool TE_GetEntDataFloat(const char *name, float *value);
55 bool TE_GetEntDataVector(const char *name, float vector[3]);
56 void Send(IRecipientFilter &filter, float delay);
58 int _FindOffset(const char *name, int *size=NULL);
62 SourceHook::String m_Name;
65 class TempEntityManager
68 TempEntityManager() : m_NameOffs(0), m_NextOffs(0), m_GetClassNameOffs(0), m_Loaded(false) {}
74 TempEntityInfo *GetTempEntityInfo(const char *name);
75 const char *GetNameFromThisPtr(void *me);
78 void DumpProps(FILE *fp);
80 SourceHook::List<TempEntityInfo *> m_TEList;
81 IBasicTrie *m_TempEntInfo;
85 int m_GetClassNameOffs;
92 SourceHook::List<IPluginFunction *> lst;
95 class TempEntHooks : public IPluginsListener
97 public: //IPluginsListener
98 void OnPluginUnloaded(IPlugin *plugin);
102 bool AddHook(const char *name, IPluginFunction *pFunc);
103 bool RemoveHook(const char *name, IPluginFunction *pFunc);
104 void OnPlaybackTempEntity(IRecipientFilter &filter, float delay, const void *pSender, const SendTable *pST, int classID);
106 void _IncRefCounter();
107 void _DecRefCounter();
108 size_t _FillInPlayers(int *pl_array, IRecipientFilter *pFilter);
110 IBasicTrie *m_TEHooks;
111 SourceHook::List<TEHookInfo *> m_HookInfo;
115 extern TempEntityManager g_TEManager;
116 extern TempEntHooks s_TempEntHooks;
118 #endif //_INCLUDE_SOURCEMOD_TEMPENTS_H_