mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2024-12-27 07:05:38 +03:00
Moved reg cvar sv_alltalk, voice_serverdebug into GameDLLInit
This commit is contained in:
parent
0318c364dd
commit
519a73179f
@ -276,4 +276,8 @@ void EXT_FUNC GameDLLInit()
|
|||||||
Bot_RegisterCVars();
|
Bot_RegisterCVars();
|
||||||
Tutor_RegisterCVars();
|
Tutor_RegisterCVars();
|
||||||
Hostage_RegisterCVars();
|
Hostage_RegisterCVars();
|
||||||
|
|
||||||
|
#ifdef REGAMEDLL_FIXES
|
||||||
|
VoiceGameMgr_RegisterCVars();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,16 @@ CVoiceGameMgr::~CVoiceGameMgr()
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void VoiceGameMgr_RegisterCVars()
|
||||||
|
{
|
||||||
|
// register voice_serverdebug if it hasn't been registered already
|
||||||
|
if (!CVAR_GET_POINTER("voice_serverdebug"))
|
||||||
|
CVAR_REGISTER(&voice_serverdebug);
|
||||||
|
|
||||||
|
if (!CVAR_GET_POINTER("sv_alltalk"))
|
||||||
|
CVAR_REGISTER(&sv_alltalk);
|
||||||
|
}
|
||||||
|
|
||||||
bool CVoiceGameMgr::Init(IVoiceGameMgrHelper *pHelper, int maxClients)
|
bool CVoiceGameMgr::Init(IVoiceGameMgrHelper *pHelper, int maxClients)
|
||||||
{
|
{
|
||||||
m_pHelper = pHelper;
|
m_pHelper = pHelper;
|
||||||
@ -54,12 +64,9 @@ bool CVoiceGameMgr::Init(IVoiceGameMgrHelper *pHelper, int maxClients)
|
|||||||
m_msgPlayerVoiceMask = REG_USER_MSG("VoiceMask", VOICE_MAX_PLAYERS_DW * 4 * 2);
|
m_msgPlayerVoiceMask = REG_USER_MSG("VoiceMask", VOICE_MAX_PLAYERS_DW * 4 * 2);
|
||||||
m_msgRequestState = REG_USER_MSG("ReqState", 0);
|
m_msgRequestState = REG_USER_MSG("ReqState", 0);
|
||||||
|
|
||||||
// register voice_serverdebug if it hasn't been registered already
|
#ifndef REGAMEDLL_FIXES
|
||||||
if (!CVAR_GET_POINTER("voice_serverdebug"))
|
VoiceGameMgr_RegisterCVars();
|
||||||
CVAR_REGISTER(&voice_serverdebug);
|
#endif
|
||||||
|
|
||||||
if (!CVAR_GET_POINTER("sv_alltalk"))
|
|
||||||
CVAR_REGISTER(&sv_alltalk);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -84,4 +84,5 @@ private:
|
|||||||
|
|
||||||
extern cvar_t sv_alltalk;
|
extern cvar_t sv_alltalk;
|
||||||
|
|
||||||
|
void VoiceGameMgr_RegisterCVars();
|
||||||
void VoiceServerDebug(const char *pFmt, ...);
|
void VoiceServerDebug(const char *pFmt, ...);
|
||||||
|
Loading…
Reference in New Issue
Block a user