Now chat notify sound can be muted

This commit is contained in:
yvt 2013-12-07 17:11:26 +09:00
parent d31207c26f
commit 0581872b94
2 changed files with 4 additions and 1 deletions

View File

@ -629,6 +629,7 @@ namespace spades {
layouter.AddSliderField("Minimap size", "cg_minimapSize", 128, 256, 8,
ConfigNumberFormatter(0, " px"));
layouter.AddToggleField("Weapon Spread Guide", "cg_debugAim");
layouter.AddToggleField("Chat Notify Sounds", "cg_chatBeep");
layouter.FinishLayout();
// cg_fov, cg_minimapSize
}

View File

@ -77,6 +77,8 @@ SPADES_SETTING(cg_ejectBrass, "1");
SPADES_SETTING(cg_mouseSensitivity, "1");
SPADES_SETTING(cg_zoomedMouseSensScale, "0.6");
SPADES_SETTING(cg_chatBeep, "1");
SPADES_SETTING(cg_holdAimDownSight, "0");
SPADES_SETTING(cg_keyAttack, "LeftMouseButton");
@ -2594,7 +2596,7 @@ namespace spades {
world->GetTeam(p->GetTeamId()).name.c_str(),
msg.c_str());
if(!IsMuted()) {
if((!IsMuted()) && (int)cg_chatBeep) {
Handle<IAudioChunk> chunk = audioDevice->RegisterSound("Sounds/Feedback/Chat.wav");
audioDevice->PlayLocal(chunk, AudioParam());
}