core/MenuStyle_Radio.cpp
changeset 846 b7abf6295b42
parent 840 5b83f1924e94
child 877 898c39fbfde9
     1.1 --- a/core/MenuStyle_Radio.cpp	Wed May 23 15:49:28 2007 +0000
     1.2 +++ b/core/MenuStyle_Radio.cpp	Wed May 23 16:56:24 2007 +0000
     1.3 @@ -16,6 +16,7 @@
     1.4  #include "sm_stringutil.h"
     1.5  #include "UserMessages.h"
     1.6  #include "GameConfigs.h"
     1.7 +#include "PlayerManager.h"
     1.8  
     1.9  extern const char *g_RadioNumTable[];
    1.10  CRadioStyle g_RadioMenuStyle;
    1.11 @@ -26,6 +27,11 @@
    1.12  {
    1.13  }
    1.14  
    1.15 +void CRadioStyle::OnSourceModAllInitialized()
    1.16 +{
    1.17 +	g_Players.AddClientListener(this);
    1.18 +}
    1.19 +
    1.20  void CRadioStyle::OnSourceModLevelChange(const char *mapName)
    1.21  {
    1.22  	if (g_bRadioInit)
    1.23 @@ -55,6 +61,7 @@
    1.24  
    1.25  void CRadioStyle::OnSourceModShutdown()
    1.26  {
    1.27 +	g_Players.RemoveClientListener(this);
    1.28  	g_UserMsgs.UnhookUserMessage(g_ShowMenuId, this, false);
    1.29  
    1.30  	while (!m_FreeDisplays.empty())