added getCurrentMsgType member

This commit is contained in:
Pavol Marko 2004-04-03 19:15:43 +00:00
parent b9c9e9d100
commit 7d13e8cd01
2 changed files with 11 additions and 0 deletions

View File

@ -117,6 +117,7 @@ EventsMngr::EventsMngr()
{ {
m_ParseVault = NULL; m_ParseVault = NULL;
m_ParseVaultSize = 0; m_ParseVaultSize = 0;
m_CurrentMsgType = -1;
clearEvents(); 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) if (msg_type < 0 || msg_type > MAX_AMX_REG_MSG)
return; return;
m_CurrentMsgType = msg_type;
m_ParseNotDone = false; m_ParseNotDone = false;
m_Timer = timer; m_Timer = timer;
@ -427,6 +430,7 @@ void EventsMngr::executeEvents()
} }
#endif // #ifdef ENABLEEXEPTIONS #endif // #ifdef ENABLEEXEPTIONS
m_CurrentMsgType = -1;
m_ParseFun = NULL; m_ParseFun = NULL;
} }
@ -531,3 +535,8 @@ int EventsMngr::getEventId(const char* msg)
// find the id of the message // find the id of the message
return pos = GET_USER_MSG_ID(PLID, msg , 0 ); return pos = GET_USER_MSG_ID(PLID, msg , 0 );
} }
int EventsMngr::getCurrentMsgType()
{
return m_CurrentMsgType;
}

View File

@ -132,6 +132,7 @@ private:
ClEvent* getValidEvent(ClEvent* a ); ClEvent* getValidEvent(ClEvent* a );
int m_CurrentMsgType;
public: public:
EventsMngr(); EventsMngr();
~EventsMngr(); ~EventsMngr();
@ -150,6 +151,7 @@ public:
float getArgFloat(int a) const; float getArgFloat(int a) const;
void clearEvents(void); void clearEvents(void);
static int getEventId( const char* msg ); static int getEventId( const char* msg );
int getCurrentMsgType();
}; };
#endif // #ifdef __CEVENTS_H__ #endif // #ifdef __CEVENTS_H__