diff --git a/source/src/command.cpp b/source/src/command.cpp index ec83468d..1eb8d6db 100644 --- a/source/src/command.cpp +++ b/source/src/command.cpp @@ -869,6 +869,8 @@ void writecfg() extern int lowfps, highfps; fprintf(f, "fpsrange %d %d\n", lowfps, highfps); fprintf(f, "\n"); + writesoundconfig(f); + fprintf(f, "\n"); enumerate(*idents, ident, id, if(!id.persist) continue; switch(id.type) diff --git a/source/src/protos.h b/source/src/protos.h index 4b3eca18..4ca99419 100644 --- a/source/src/protos.h +++ b/source/src/protos.h @@ -577,6 +577,7 @@ extern void detachsounds(playerent *owner); extern void updateaudio(); extern void preloadmapsound(entity &e); extern void preloadmapsounds(); +extern void writesoundconfig(FILE *f); // rendermodel extern void rendermodel(const char *mdl, int anim, int tex, float rad, const vec &o, float yaw, float pitch, float speed = 0, int basetime = 0, playerent *d = NULL, modelattach *a = NULL, float scale = 1.0f); diff --git a/source/src/sound.cpp b/source/src/sound.cpp index faa4baad..bff64efe 100644 --- a/source/src/sound.cpp +++ b/source/src/sound.cpp @@ -1754,6 +1754,11 @@ void mutesound(int n, int off) COMMAND(unmuteallsounds, ARG_NONE); COMMAND(mutesound, ARG_2INT); +void writesoundconfig(FILE *f) +{ + loopv(gamesounds) if(gamesounds[i].muted) fprintf(f, "mutesound %d\n", i); +} + VARP(maxsoundsatonce, 0, 10, 100); location *playsound(int n, const worldobjreference &r, int priority, float offset, bool loop)