From 4656bb246ecf777a3ccc6de75470f1db7298449f Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Thu, 11 Mar 2004 12:35:13 +0000 Subject: [PATCH] possible fix of the events bug --- amxmodx/CEvent.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/amxmodx/CEvent.cpp b/amxmodx/CEvent.cpp index 756c9c26..494e30f6 100755 --- a/amxmodx/CEvent.cpp +++ b/amxmodx/CEvent.cpp @@ -196,8 +196,10 @@ void EventsMngr::parserInit(int msg_type, float* timer, CPlayer* pPlayer, int in m_ParsePos = 0; m_ParseVault[m_ParsePos].type = MSG_INTEGER; m_ParseVault[m_ParsePos].iValue = index; + m_ParseFun = &m_Events[msg_type]; } - m_ParseFun = &m_Events[msg_type]; + else + m_ParseFun = NULL; } void EventsMngr::parseValue(int iValue) @@ -328,7 +330,7 @@ void EventsMngr::parseValue(const char *sz) switch(condIter->second.type) { case '=': if (!strcmp(sz, condIter->second.sValue.c_str())) skip=true; break; - case '!': if (!strstr(sz, condIter->second.sValue.c_str())) skip=true; break; + case '!': if (strcmp(sz, condIter->second.sValue.c_str())) skip=true; break; case '&': if (strstr(sz, condIter->second.sValue.c_str())) skip=true; break; } if (skip) @@ -378,6 +380,8 @@ void EventsMngr::executeEvents() UTIL_Log( "[AMXX] fatal error at event execution"); } #endif // #ifdef ENABLEEXEPTIONS + + m_ParseFun = NULL; } int EventsMngr::getArgNum()