From 2c0f598c6d7990b2e1ae1af6178aa4b9e6d82cf6 Mon Sep 17 00:00:00 2001 From: mittorn Date: Sun, 12 Jun 2016 20:43:32 +0000 Subject: [PATCH] Disable CVoiceGameMgr --- dlls/Android.mk | 6 +++--- dlls/client.cpp | 6 +++++- dlls/multiplay_gamerules.cpp | 11 +++++++++++ dlls/teamplay_gamerules.cpp | 9 +++++++-- 4 files changed, 26 insertions(+), 6 deletions(-) diff --git a/dlls/Android.mk b/dlls/Android.mk index e0266879..495abd6a 100644 --- a/dlls/Android.mk +++ b/dlls/Android.mk @@ -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 diff --git a/dlls/client.cpp b/dlls/client.cpp index 02ba4582..14646a32 100644 --- a/dlls/client.cpp +++ b/dlls/client.cpp @@ -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; diff --git a/dlls/multiplay_gamerules.cpp b/dlls/multiplay_gamerules.cpp index d79a4128..9b505549 100644 --- a/dlls/multiplay_gamerules.cpp +++ b/dlls/multiplay_gamerules.cpp @@ -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; } diff --git a/dlls/teamplay_gamerules.cpp b/dlls/teamplay_gamerules.cpp index f8a337a1..c673d4c6 100644 --- a/dlls/teamplay_gamerules.cpp +++ b/dlls/teamplay_gamerules.cpp @@ -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" ) ) {