Skip to content

Commit 3972c38

Browse files
committed
feat: add ghost vc volume
1 parent 37eda58 commit 3972c38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Features/Demo/NetworkGhostPlayer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
Variable ghost_sync_countdown("ghost_sync_countdown", "3", 0, "The number of seconds of countdown to show at the start of every synced map. 0 to disable.\n");
2828
Variable ghost_spec_see_spectators("ghost_spec_see_spectators", "0", "Whether to see other spectators while spectating.\n");
2929
Variable ghost_show_spec_chat("ghost_show_spec_chat", "1", "Show chat messages from spectators when not spectating.\n");
30+
Variable ghost_volume("ghost_volume", "1.0", 0.f, 1.f, "Voice chat volume multiplier.\n");
3031

3132
#define DrawTxtRightAlign(font, x, y, clr, ...) \
3233
do { \
@@ -1072,7 +1073,7 @@ void NetworkManager::Treat(sf::Packet &packet, bool udp) {
10721073

10731074
// account for ingame vol.
10741075
static auto vol = Variable("volume");
1075-
stream->setVolume(vol.GetFloat() * 10000.f);
1076+
stream->setVolume(vol.GetFloat() * ghost_volume.GetFloat() * 10000.f);
10761077

10771078
// proximity.
10781079
auto player = client->GetPlayer(GET_SLOT() + 1);

0 commit comments

Comments
 (0)