Skip to content

Commit 34bea4d

Browse files
committed
Made CMapEventManager and CMapEvent shared
Added the ability to remove all event handlers without passing a callback function
1 parent 4735bab commit 34bea4d

21 files changed

+618
-1103
lines changed

Client/mods/deathmatch/logic/CClientEntity.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,12 @@ bool CClientEntity::DeleteEvent ( CLuaMain* pLuaMain, const char* szName, const
841841
}
842842

843843

844+
bool CClientEntity::DeleteEvent ( CLuaMain* pLuaMain, const char* szName )
845+
{
846+
return m_pEventManager->Delete ( pLuaMain, szName );
847+
}
848+
849+
844850
void CClientEntity::DeleteEvents ( CLuaMain* pLuaMain, bool bRecursive )
845851
{
846852
// Delete it from our events

Client/mods/deathmatch/logic/CClientEntity.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ class CClientEntity : public CClientEntityBase
251251
void CallEventNoParent ( const char* szName, const CLuaArguments& Arguments, CClientEntity* pSource );
252252
void CallParentEvent ( const char* szName, const CLuaArguments& Arguments, CClientEntity* pSource );
253253
bool DeleteEvent ( CLuaMain* pLuaMain, const char* szName, const CLuaFunctionRef& iLuaFunction );
254+
bool DeleteEvent ( CLuaMain* pLuaMain, const char* szName );
254255
void DeleteEvents ( CLuaMain* pLuaMain, bool bRecursive );
255256
void DeleteAllEvents ( void );
256257

Client/mods/deathmatch/logic/CMapEvent.cpp

Lines changed: 0 additions & 54 deletions
This file was deleted.

Client/mods/deathmatch/logic/CMapEvent.h

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)