Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Novgui voice chat support #491

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
7 changes: 4 additions & 3 deletions cl_dll/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,13 @@ set (CLDLL_SOURCES
tri.cpp
util.cpp
view.cpp
../game_shared/voice_banmgr.cpp
../game_shared/vcs_info.cpp
)

if (USE_VGUI)
list(APPEND CLDLL_SOURCES
voice_status.cpp
vgui_int.cpp
vgui_ClassMenu.cpp
vgui_ConsolePanel.cpp
Expand All @@ -140,15 +142,13 @@ if (USE_VGUI)
vgui_TeamFortressViewport.cpp
vgui_SpectatorPanel.cpp
vgui_teammenu.cpp
voice_status.cpp
../game_shared/vgui_checkbutton2.cpp
../game_shared/vgui_grid.cpp
../game_shared/vgui_helpers.cpp
../game_shared/vgui_listbox.cpp
../game_shared/vgui_loadtga.cpp
../game_shared/vgui_scrollbar2.cpp
../game_shared/vgui_slider2.cpp
../game_shared/voice_banmgr.cpp
)
if (USE_NOVGUI_MOTD)
list(APPEND CLDLL_SOURCES MOTD.cpp)
Expand All @@ -159,7 +159,8 @@ if (USE_VGUI)
else()
list(APPEND CLDLL_SOURCES
MOTD.cpp
scoreboard.cpp)
scoreboard.cpp
novgui_voice_status.cpp)
endif()

include_directories (. hl/ ../dlls ../dlls/wpn_shared ../common ../engine ../pm_shared ../game_shared ../public)
Expand Down
6 changes: 2 additions & 4 deletions cl_dll/cdll_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,9 @@ Called by engine every frame that client .dll is loaded

void DLLEXPORT HUD_Frame( double time )
{
#if USE_VGUI
GetClientVoiceMgr()->Frame(time);
#elif USE_FAKE_VGUI

#if USE_FAKE_VGUI
if (!gViewPort)
gEngfuncs.VGui_ViewportPaintBackground(HUD_GetRect());
#else
Expand All @@ -374,9 +374,7 @@ Called when a player starts or stops talking.

void DLLEXPORT HUD_VoiceStatus( int entindex, qboolean bTalking )
{
#if USE_VGUI
GetClientVoiceMgr()->UpdateSpeakerStatus(entindex, bTalking);
#endif
}

/*
Expand Down
2 changes: 0 additions & 2 deletions cl_dll/entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,7 @@ void DLLEXPORT HUD_CreateEntities( void )
// Add in any game specific objects
Game_AddObjects();

#if USE_VGUI
GetClientVoiceMgr()->CreateEntities();
#endif
}

/*
Expand Down
4 changes: 2 additions & 2 deletions cl_dll/hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,8 @@ void CHud::Init( void )
m_StatusIcons.Init();
#if USE_VGUI
GetClientVoiceMgr()->Init(&g_VoiceStatusHelper, (vgui::Panel**)&gViewPort);
#else
GetClientVoiceMgr()->Init();
#endif

#if !USE_VGUI || USE_NOVGUI_MOTD
Expand Down Expand Up @@ -618,9 +620,7 @@ void CHud::VidInit( void )
m_AmmoSecondary.VidInit();
m_TextMessage.VidInit();
m_StatusIcons.VidInit();
#if USE_VGUI
GetClientVoiceMgr()->VidInit();
#endif
#if !USE_VGUI || USE_NOVGUI_MOTD
m_MOTD.VidInit();
#endif
Expand Down
2 changes: 2 additions & 0 deletions cl_dll/hud.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ struct HUDLIST
//-----------------------------------------------------
#if USE_VGUI
#include "voice_status.h" // base voice handling class
#else
#include "novgui_voice_status.h"
#endif
#include "hud_spectator.h"

Expand Down
Loading
Loading