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 endif
LOCAL_CFLAGS += -D_LINUX -DCLIENT_WEAPONS -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf \ 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 LOCAL_CPPFLAGS := $(LOCAL_CFLAGS) -frtti
@ -126,8 +126,8 @@ LOCAL_SRC_FILES := agrunt.cpp airtank.cpp \
zombie.cpp \ zombie.cpp \
../pm_shared/pm_debug.c \ ../pm_shared/pm_debug.c \
../pm_shared/pm_math.c \ ../pm_shared/pm_math.c \
../pm_shared/pm_shared.c \ ../pm_shared/pm_shared.c
../game_shared/voice_gamemgr.cpp # ../game_shared/voice_gamemgr.cpp
LOCAL_LDLIBS := -llog LOCAL_LDLIBS := -llog

View File

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

View File

@ -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;
} }

View File

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