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

Allow disabling chat #239

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/usage.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ setdesc "bloodsize" "sets the size of blood splatter" "value"
setdesc "chatconsize" "sets the amount of lines to show in the chat console, this does not include overflow lines" "value"
setdesc "chatconblend" "sets the opacity of the chat console" "value"
setdesc "chatconscale" "determines the scaling of the chat console text" "value"
setdesc "chatdisabled" "disables the chat" "value"
setdesc "commandscale" "determines the scaling of the command and chat input text" "value"
setdesc "conblend" "sets the opacity of the console, this does not include obituaries and affinity events! (flag, bomb)" "value"
setdesc "concenter" "toggles alignment of console;^n0 = console is in top left, 1 = console is centered" "value"
Expand Down
11 changes: 6 additions & 5 deletions src/game/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1162,11 +1162,12 @@ namespace client
}
if((!(flags&SAY_TEAM) || f->team == game::player1.team) && (!(flags&SAY_WHISPER) || f == &game::player1 || t == &game::player1))
{
conoutft(CON_CHAT, "%s", line);

if (snd >= 0 && !issound(f->cschan))
{
playsound(snd, f->o, f, snd != S_CHAT ? 0 : SND_DIRECT, -1, -1, -1, &f->cschan);
if (hud::chatdisabled != 1) {
conoutft(CON_CHAT, "%s", line);
if (snd >= 0 && !issound(f->cschan))
{
playsound(snd, f->o, f, snd != S_CHAT ? 0 : SND_DIRECT, -1, -1, -1, &f->cschan);
}
}
}
ai::scanchat(f, t, flags, text);
Expand Down
2 changes: 1 addition & 1 deletion src/game/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,7 @@ namespace hud
*flagtakentex, *bombdroptex, *bombtakentex, *attacktex, *warningtex, *inventorytex, *indicatortex, *crosshairtex, *hithairtex,
*spree1tex, *spree2tex, *spree3tex, *spree4tex, *multi1tex, *multi2tex, *multi3tex, *headshottex, *dominatetex, *revengetex,
*firstbloodtex, *breakertex;
extern int hudwidth, hudheight, hudsize, lastteam, damageresidue, damageresiduefade, shownotices, showevents, radaraffinitynames,
extern int hudwidth, hudheight, hudsize, lastteam, damageresidue, damageresiduefade, shownotices, showevents, radaraffinitynames, chatdisabled,
inventorygame, inventoryscore, inventoryscorespec, inventoryscorebg, inventoryscoreinfo, inventoryscorename, inventoryscorepos, inventoryscorebreak, inventoryracestyle,
teamhurthud, teamhurttime, teamhurtdist;
extern float noticescale, eventscale, inventoryblend, inventoryskew, radaraffinityblend, radarblipblend, radaraffinitysize,
Expand Down
1 change: 1 addition & 0 deletions src/game/hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ namespace hud
FVAR(IDF_PERSIST, chatconblend, 0, 1, 1);
FVAR(IDF_PERSIST, chatconscale, FVAR_NONZERO, 1, FVAR_MAX);
SVAR(IDF_PERSIST, chatcondateformat, "%H:%M:%S");
VAR(IDF_PERSIST, chatdisabled, 0, 0, 1);

FVAR(IDF_PERSIST, selfconblend, 0, 1, 1);
FVAR(IDF_PERSIST, fullconblend, 0, 1, 1);
Expand Down