fixed a bug where disconnected clients did not have their menus cancelled for radio style menus
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40852
This commit is contained in:
parent
0e8ba9ed15
commit
60386df00f
@ -16,6 +16,7 @@
|
||||
#include "sm_stringutil.h"
|
||||
#include "UserMessages.h"
|
||||
#include "GameConfigs.h"
|
||||
#include "PlayerManager.h"
|
||||
|
||||
extern const char *g_RadioNumTable[];
|
||||
CRadioStyle g_RadioMenuStyle;
|
||||
@ -26,6 +27,11 @@ CRadioStyle::CRadioStyle() : m_players(new CBaseMenuPlayer[256+1])
|
||||
{
|
||||
}
|
||||
|
||||
void CRadioStyle::OnSourceModAllInitialized()
|
||||
{
|
||||
g_Players.AddClientListener(this);
|
||||
}
|
||||
|
||||
void CRadioStyle::OnSourceModLevelChange(const char *mapName)
|
||||
{
|
||||
if (g_bRadioInit)
|
||||
@ -55,6 +61,7 @@ void CRadioStyle::OnSourceModLevelChange(const char *mapName)
|
||||
|
||||
void CRadioStyle::OnSourceModShutdown()
|
||||
{
|
||||
g_Players.RemoveClientListener(this);
|
||||
g_UserMsgs.UnhookUserMessage(g_ShowMenuId, this, false);
|
||||
|
||||
while (!m_FreeDisplays.empty())
|
||||
|
@ -37,6 +37,7 @@ class CRadioStyle :
|
||||
public:
|
||||
CRadioStyle();
|
||||
public: //SMGlobalClass
|
||||
void OnSourceModAllInitialized();
|
||||
void OnSourceModLevelChange(const char *mapName);
|
||||
void OnSourceModShutdown();
|
||||
public: //BaseMenuStyle
|
||||
|
Loading…
Reference in New Issue
Block a user