|
|
@ -43,7 +43,9 @@ extern int g_teamplay; |
|
|
|
|
|
|
|
|
|
|
|
float g_flIntermissionStartTime = 0; |
|
|
|
float g_flIntermissionStartTime = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef NO_VOICEGAMEMGR |
|
|
|
CVoiceGameMgr g_VoiceGameMgr; |
|
|
|
CVoiceGameMgr g_VoiceGameMgr; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
class CMultiplayGameMgrHelper : public IVoiceGameMgrHelper |
|
|
|
class CMultiplayGameMgrHelper : public IVoiceGameMgrHelper |
|
|
|
{ |
|
|
|
{ |
|
|
@ -63,13 +65,16 @@ public: |
|
|
|
}; |
|
|
|
}; |
|
|
|
static CMultiplayGameMgrHelper g_GameMgrHelper; |
|
|
|
static CMultiplayGameMgrHelper g_GameMgrHelper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//*********************************************************
|
|
|
|
//*********************************************************
|
|
|
|
// Rules for the half-life multiplayer game.
|
|
|
|
// Rules for the half-life multiplayer game.
|
|
|
|
//*********************************************************
|
|
|
|
//*********************************************************
|
|
|
|
|
|
|
|
|
|
|
|
CHalfLifeMultiplay :: CHalfLifeMultiplay() |
|
|
|
CHalfLifeMultiplay :: CHalfLifeMultiplay() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
#ifndef NO_VOICEGAMEMGR |
|
|
|
g_VoiceGameMgr.Init(&g_GameMgrHelper, gpGlobals->maxClients); |
|
|
|
g_VoiceGameMgr.Init(&g_GameMgrHelper, gpGlobals->maxClients); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
RefreshSkillData(); |
|
|
|
RefreshSkillData(); |
|
|
|
m_flIntermissionEndTime = 0; |
|
|
|
m_flIntermissionEndTime = 0; |
|
|
@ -116,8 +121,10 @@ CHalfLifeMultiplay :: CHalfLifeMultiplay() |
|
|
|
|
|
|
|
|
|
|
|
BOOL CHalfLifeMultiplay::ClientCommand( CBasePlayer *pPlayer, const char *pcmd ) |
|
|
|
BOOL CHalfLifeMultiplay::ClientCommand( CBasePlayer *pPlayer, const char *pcmd ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
#ifndef NO_VOICEGAMEMGR |
|
|
|
if(g_VoiceGameMgr.ClientCommand(pPlayer, pcmd)) |
|
|
|
if(g_VoiceGameMgr.ClientCommand(pPlayer, pcmd)) |
|
|
|
return TRUE; |
|
|
|
return TRUE; |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
return CGameRules::ClientCommand(pPlayer, pcmd); |
|
|
|
return CGameRules::ClientCommand(pPlayer, pcmd); |
|
|
|
} |
|
|
|
} |
|
|
@ -186,7 +193,9 @@ extern cvar_t mp_chattime; |
|
|
|
//=========================================================
|
|
|
|
//=========================================================
|
|
|
|
void CHalfLifeMultiplay :: Think ( void ) |
|
|
|
void CHalfLifeMultiplay :: Think ( void ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
#ifndef NO_VOICEGAMEMGR |
|
|
|
g_VoiceGameMgr.Update(gpGlobals->frametime); |
|
|
|
g_VoiceGameMgr.Update(gpGlobals->frametime); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
///// Check game rules /////
|
|
|
|
///// Check game rules /////
|
|
|
|
static int last_frags; |
|
|
|
static int last_frags; |
|
|
@ -397,7 +406,9 @@ BOOL CHalfLifeMultiplay :: GetNextBestWeapon( CBasePlayer *pPlayer, CBasePlayerI |
|
|
|
//=========================================================
|
|
|
|
//=========================================================
|
|
|
|
BOOL CHalfLifeMultiplay :: ClientConnected( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ] ) |
|
|
|
BOOL CHalfLifeMultiplay :: ClientConnected( edict_t *pEntity, const char *pszName, const char *pszAddress, char szRejectReason[ 128 ] ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
#ifndef NO_VOICEGAMEMGR |
|
|
|
g_VoiceGameMgr.ClientConnected(pEntity); |
|
|
|
g_VoiceGameMgr.ClientConnected(pEntity); |
|
|
|
|
|
|
|
#endif |
|
|
|
return TRUE; |
|
|
|
return TRUE; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|