mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Remove some redundant code
This commit is contained in:
parent
735dd26dc6
commit
e4094bc2a9
1 changed files with 4 additions and 11 deletions
15
src/d_main.c
15
src/d_main.c
|
|
@ -1083,6 +1083,10 @@ void D_SRB2Main(void)
|
||||||
// use user specific config file
|
// use user specific config file
|
||||||
#ifdef DEFAULTDIR
|
#ifdef DEFAULTDIR
|
||||||
snprintf(srb2home, sizeof srb2home, "%s" PATHSEP DEFAULTDIR, userhome);
|
snprintf(srb2home, sizeof srb2home, "%s" PATHSEP DEFAULTDIR, userhome);
|
||||||
|
#else
|
||||||
|
snprintf(srb2home, sizeof srb2home, "%s", userhome);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (dedicated)
|
if (dedicated)
|
||||||
snprintf(configfile, sizeof configfile, "%s" PATHSEP "d"CONFIGFILENAME, srb2home);
|
snprintf(configfile, sizeof configfile, "%s" PATHSEP "d"CONFIGFILENAME, srb2home);
|
||||||
else
|
else
|
||||||
|
|
@ -1090,17 +1094,6 @@ void D_SRB2Main(void)
|
||||||
|
|
||||||
// can't use sprintf since there is %u in savegamename
|
// can't use sprintf since there is %u in savegamename
|
||||||
strcatbf(savegamename, srb2home, PATHSEP);
|
strcatbf(savegamename, srb2home, PATHSEP);
|
||||||
|
|
||||||
#else
|
|
||||||
snprintf(srb2home, sizeof srb2home, "%s", userhome);
|
|
||||||
if (dedicated)
|
|
||||||
snprintf(configfile, sizeof configfile, "%s" PATHSEP "d"CONFIGFILENAME, userhome);
|
|
||||||
else
|
|
||||||
snprintf(configfile, sizeof configfile, "%s" PATHSEP CONFIGFILENAME, userhome);
|
|
||||||
|
|
||||||
// can't use sprintf since there is %u in savegamename
|
|
||||||
strcatbf(savegamename, userhome, PATHSEP);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configfile[sizeof configfile - 1] = '\0';
|
configfile[sizeof configfile - 1] = '\0';
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue