fixed amb186 (state changing crashes)

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40683
This commit is contained in:
David Anderson 2007-04-11 15:05:56 +00:00
parent 3bec29a1fe
commit c889515263
3 changed files with 10 additions and 11 deletions

View File

@ -38,11 +38,17 @@ CHalfLife2::~CHalfLife2()
m_Tables.clear(); m_Tables.clear();
} }
#if 0 CSharedEdictChangeInfo *g_pSharedChangeInfo = NULL;
void CHalfLife2::OnSourceModStartup(bool late) void CHalfLife2::OnSourceModStartup(bool late)
{ {
if (!g_pSharedChangeInfo)
{
g_pSharedChangeInfo = engine->GetSharedEdictChangeInfo();
}
} }
#if 0
void CHalfLife2::OnSourceModAllShutdown() void CHalfLife2::OnSourceModAllShutdown()
{ {
} }

View File

@ -29,14 +29,14 @@ struct DataTableInfo
Trie *lookup; Trie *lookup;
}; };
class CHalfLife2 class CHalfLife2 : public SMGlobalClass
{ {
public: public:
CHalfLife2(); CHalfLife2();
~CHalfLife2(); ~CHalfLife2();
public: public:
/*void OnSourceModStartup(bool late); void OnSourceModStartup(bool late);
void OnSourceModAllShutdown();*/ /*void OnSourceModAllShutdown();*/
public: public:
SendProp *FindInSendTable(const char *classname, const char *offset); SendProp *FindInSendTable(const char *classname, const char *offset);
ServerClass *FindServerClass(const char *classname); ServerClass *FindServerClass(const char *classname);

View File

@ -464,8 +464,6 @@ IChangeInfoAccessor *CBaseEdict::GetChangeAccessor()
return engine->GetChangeAccessor( (const edict_t *)this ); return engine->GetChangeAccessor( (const edict_t *)this );
} }
CSharedEdictChangeInfo *g_pSharedChangeInfo = NULL;
static cell_t ChangeEdictState(IPluginContext *pContext, const cell_t *params) static cell_t ChangeEdictState(IPluginContext *pContext, const cell_t *params)
{ {
edict_t *pEdict = GetEdict(params[1]); edict_t *pEdict = GetEdict(params[1]);
@ -475,11 +473,6 @@ static cell_t ChangeEdictState(IPluginContext *pContext, const cell_t *params)
return pContext->ThrowNativeError("Edict %d is invalid", params[1]); return pContext->ThrowNativeError("Edict %d is invalid", params[1]);
} }
if (!g_pSharedChangeInfo)
{
g_pSharedChangeInfo = engine->GetSharedEdictChangeInfo();
}
if (params[2]) if (params[2])
{ {
pEdict->StateChanged(params[2]); pEdict->StateChanged(params[2]);