From 7d13e8cd01e0ba99cedc6783ab365af3087f9f2a Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Sat, 3 Apr 2004 19:15:43 +0000 Subject: [PATCH] added getCurrentMsgType member --- amxmodx/CEvent.cpp | 9 +++++++++ amxmodx/CEvent.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/amxmodx/CEvent.cpp b/amxmodx/CEvent.cpp index 875acd10..9c642f52 100755 --- a/amxmodx/CEvent.cpp +++ b/amxmodx/CEvent.cpp @@ -117,6 +117,7 @@ EventsMngr::EventsMngr() { m_ParseVault = NULL; m_ParseVaultSize = 0; + m_CurrentMsgType = -1; clearEvents(); } @@ -204,6 +205,8 @@ void EventsMngr::parserInit(int msg_type, float* timer, CPlayer* pPlayer, int in if (msg_type < 0 || msg_type > MAX_AMX_REG_MSG) return; + m_CurrentMsgType = msg_type; + m_ParseNotDone = false; m_Timer = timer; @@ -427,6 +430,7 @@ void EventsMngr::executeEvents() } #endif // #ifdef ENABLEEXEPTIONS + m_CurrentMsgType = -1; m_ParseFun = NULL; } @@ -531,3 +535,8 @@ int EventsMngr::getEventId(const char* msg) // find the id of the message return pos = GET_USER_MSG_ID(PLID, msg , 0 ); } + +int EventsMngr::getCurrentMsgType() +{ + return m_CurrentMsgType; +} diff --git a/amxmodx/CEvent.h b/amxmodx/CEvent.h index c6a3e4f4..0a3f8ba0 100755 --- a/amxmodx/CEvent.h +++ b/amxmodx/CEvent.h @@ -132,6 +132,7 @@ private: ClEvent* getValidEvent(ClEvent* a ); + int m_CurrentMsgType; public: EventsMngr(); ~EventsMngr(); @@ -150,6 +151,7 @@ public: float getArgFloat(int a) const; void clearEvents(void); static int getEventId( const char* msg ); + int getCurrentMsgType(); }; #endif // #ifdef __CEVENTS_H__