Disable CVoiceGameMgr

This commit is contained in:
mittorn 2016-06-12 20:43:32 +00:00
parent fe4bedb0fb
commit 2c0f598c6d
4 changed files with 26 additions and 6 deletions

View File

@ -14,7 +14,7 @@ LOCAL_MODULE_FILENAME = libserver_hardfp
endif
LOCAL_CFLAGS += -D_LINUX -DCLIENT_WEAPONS -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf \
-fno-exceptions -w
-fno-exceptions -DNO_VOICEGAMEMGR -w
LOCAL_CPPFLAGS := $(LOCAL_CFLAGS) -frtti
@ -126,8 +126,8 @@ LOCAL_SRC_FILES := agrunt.cpp airtank.cpp \
zombie.cpp \
../pm_shared/pm_debug.c \
../pm_shared/pm_math.c \
../pm_shared/pm_shared.c \
../game_shared/voice_gamemgr.cpp
../pm_shared/pm_shared.c
# ../game_shared/voice_gamemgr.cpp
LOCAL_LDLIBS := -llog

View File

@ -204,9 +204,11 @@ void ClientPutInServer( edict_t *pEntity )
}
#ifndef NO_VOICEGAMEMGR
#include "voice_gamemgr.h"
extern CVoiceGameMgr g_VoiceGameMgr;
#endif
//// HOST_SAY
// String comes in as
// say blah blah blah
@ -313,9 +315,11 @@ void Host_Say( edict_t *pEntity, int teamonly )
if ( !(client->IsNetClient()) ) // Not a client ? (should never be true)
continue;
#ifndef NO_VOICEGAMEMGR
// can the receiver hear the sender? or has he muted him?
if ( g_VoiceGameMgr.PlayerHasBlockedPlayer( client, player ) )
continue;
#endif
if ( teamonly && g_pGameRules->PlayerRelationship(client, CBaseEntity::Instance(pEntity)) != GR_TEAMMATE )
continue;

View File

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

View File

@ -68,9 +68,10 @@ CHalfLifeTeamplay :: CHalfLifeTeamplay()
extern cvar_t timeleft, fragsleft;
#ifndef NO_VOICEGAMEMGR
#include "voice_gamemgr.h"
extern CVoiceGameMgr g_VoiceGameMgr;
#endif
void CHalfLifeTeamplay :: Think ( void )
{
///// Check game rules /////
@ -80,8 +81,9 @@ void CHalfLifeTeamplay :: Think ( void )
int frags_remaining = 0;
int time_remaining = 0;
#ifndef NO_VOICEGAMEMGR
g_VoiceGameMgr.Update(gpGlobals->frametime);
#endif
if ( g_fGameOver ) // someone else quit the game already
{
CHalfLifeMultiplay::Think();
@ -145,8 +147,11 @@ void CHalfLifeTeamplay :: Think ( void )
//=========================================================
BOOL CHalfLifeTeamplay :: ClientCommand( CBasePlayer *pPlayer, const char *pcmd )
{
#ifndef NO_VOICEGAMEMGR
if(g_VoiceGameMgr.ClientCommand(pPlayer, pcmd))
return TRUE;
#endif
if ( FStrEq( pcmd, "menuselect" ) )
{