mutesound N/mutesound N 1 (=unmute)

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3429 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
flowtron
2008-11-06 21:20:08 +00:00
parent 88d49f553d
commit 3eace44505
2 changed files with 6 additions and 4 deletions
+5 -4
View File
@@ -1731,18 +1731,19 @@ void unmuteallsounds()
loopv(gamesounds) gamesounds[i].muted = false;
}
void mutesound(int n)
void mutesound(int n, int off)
{
bool mute = (off == 0);
if(!gamesounds.inrange(n))
{
conoutf("\f3could not silence sound no %d", n);
conoutf("\f3could not %s sound no %d", mute ? "silence" : "unmute", n);
return;
}
gamesounds[n].muted = true;
gamesounds[n].muted = mute;
}
COMMAND(unmuteallsounds, ARG_NONE);
COMMAND(mutesound, ARG_1INT);
COMMAND(mutesound, ARG_2INT);
VARP(maxsoundsatonce, 0, 10, 100);