menu fix/saved.cfg cleanup
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7260 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -579,7 +579,7 @@ muteitem [Die 1] 32
|
||||
muteitem [Die 2] 33
|
||||
muteitem [Gib sounds] 48
|
||||
muteitem [Tinnitus] 62
|
||||
menuitemcheckbox [Heartbeat] "(! $heartbeat)" [ if $arg1 [ oldheartbeat = $heartbeat; heartbeat 0 ] [ heartbeat $oldheartbeat ] ]
|
||||
menuitemcheckbox [Heartbeat] "$heartbeat" [ if (! $arg1) [ oldheartbeat = $heartbeat; heartbeat 0 ] [ heartbeat $oldheartbeat ] ]
|
||||
|
||||
newmenu [Mute movement sounds]
|
||||
|
||||
|
||||
@@ -398,7 +398,19 @@ int audiomanager::soundmuted(int n)
|
||||
|
||||
void audiomanager::writesoundconfig(stream *f)
|
||||
{
|
||||
loopv(gamesounds) if(gamesounds[i].muted) f->printf("mutesound %d\n", i);
|
||||
bool wrotesound = false;
|
||||
loopv(gamesounds)
|
||||
{
|
||||
if(gamesounds[i].muted)
|
||||
{
|
||||
if(!wrotesound)
|
||||
{
|
||||
f->printf("// sound settings\n\n");
|
||||
wrotesound = true;
|
||||
}
|
||||
f->printf("mutesound %d\n", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void voicecom(char *sound, char *text)
|
||||
|
||||
@@ -1435,6 +1435,7 @@ void writecfg()
|
||||
stream *f = openfile(path("config/saved.cfg", true), "w");
|
||||
if(!f) return;
|
||||
f->printf("// automatically written on exit, DO NOT MODIFY\n// delete this file to have defaults.cfg overwrite these settings\n// modify settings in game, or put settings in autoexec.cfg to override anything\n\n");
|
||||
f->printf("// basic settings\n\n");
|
||||
f->printf("name \"%s\"\n", player1->name);
|
||||
extern const char *crosshairnames[CROSSHAIR_NUM];
|
||||
extern Texture *crosshairs[CROSSHAIR_NUM];
|
||||
@@ -1456,10 +1457,10 @@ void writecfg()
|
||||
{
|
||||
const char *fragmsg = killmessage(i, false);
|
||||
const char *gibmsg = killmessage(i, true);
|
||||
f->printf("\nfragmessage %d \"%s\"", i, fragmsg);
|
||||
f->printf("\ngibmessage %d \"%s\"", i, gibmsg);
|
||||
f->printf("\nfragmessage %d [%s]", i, fragmsg);
|
||||
f->printf("\ngibmessage %d [%s]", i, gibmsg);
|
||||
}
|
||||
f->printf("\n");
|
||||
f->printf("\n\n// client variables\n\n");
|
||||
enumerate(*idents, ident, id,
|
||||
if(!id.persist) continue;
|
||||
switch(id.type)
|
||||
@@ -1469,14 +1470,14 @@ void writecfg()
|
||||
case ID_SVAR: f->printf("%s [%s]\n", id.name, *id.storage.s); break;
|
||||
}
|
||||
);
|
||||
f->printf("\n");
|
||||
f->printf("\n// weapon settings\n\n");
|
||||
loopi(NUMGUNS) if(guns[i].isauto)
|
||||
{
|
||||
f->printf("burstshots %d %d\n", i, burstshotssettings[i]);
|
||||
}
|
||||
f->printf("\n");
|
||||
f->printf("\n// key binds\n\n");
|
||||
writebinds(f);
|
||||
f->printf("\n");
|
||||
f->printf("\n// aliases\n\n");
|
||||
enumerate(*idents, ident, id,
|
||||
if(id.type==ID_ALIAS && id.persist && id.action[0])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user