cleanup config files
* moved compatibility.cfg and autosave.cfg to config/opt/ * firstrun.cfg merged into defaults.cfg DOCREF compatibilitymode alive currole curmode getclientmode curteam DOCREF findpn pstat_score orderscorecolumns
This commit is contained in:
@@ -1162,14 +1162,6 @@ void startmap(const char *name, bool reset, bool norespawn) // called just aft
|
||||
loopv(gmdescs) if(gmdescs[i].mode == gamemode) conoutf("\f1%s", gmdescs[i].desc);
|
||||
}
|
||||
|
||||
// run once
|
||||
if(firstrun)
|
||||
{
|
||||
per_idents = false;
|
||||
execfile("config/firstrun.cfg");
|
||||
per_idents = true;
|
||||
firstrun = false;
|
||||
}
|
||||
// execute mapstart event once
|
||||
const char *mapstartonce = getalias("mapstartonce");
|
||||
if(mapstartonce && mapstartonce[0])
|
||||
|
||||
+1
-10
@@ -897,7 +897,7 @@ void checkinput()
|
||||
VARF(gamespeed, 10, 100, 1000, if(multiplayer()) gamespeed = 100);
|
||||
VARF(paused, 0, 0, 1, if(multiplayer()) paused = 0);
|
||||
|
||||
bool firstrun = false, inmainloop = false;
|
||||
bool inmainloop = false;
|
||||
static int clockrealbase = 0, clockvirtbase = 0;
|
||||
static void clockreset() { clockrealbase = SDL_GetTicks(); clockvirtbase = totalmillis; }
|
||||
VARFP(clockerror, 990000, 1000000, 1010000, clockreset());
|
||||
@@ -1064,8 +1064,6 @@ void initclientlog() // rotate old logfiles and create new one
|
||||
DELETEP(bootclientlog);
|
||||
}
|
||||
|
||||
VARP(compatibilitymode, 0, 1, 1); // FIXME : find a better place to put this ?
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
ASSERT((GMMASK__BOT ^ GMMASK__MP ^ GMMASK__TEAM ^ GMMASK__FFA ^ GMMASK__TEAMSPAWN ^ GMMASK__FFASPAWN) == GMMASK__ALL);
|
||||
@@ -1297,16 +1295,9 @@ int main(int argc, char **argv)
|
||||
if(!execfile("config/saved.cfg"))
|
||||
{
|
||||
exec("config/defaults.cfg");
|
||||
firstrun = true;
|
||||
}
|
||||
autostartscripts("_aftersaved_");
|
||||
exechook(HOOK_SP_MP, "afterinit", "");
|
||||
if(compatibilitymode)
|
||||
{
|
||||
per_idents = false;
|
||||
exec("config/compatibility.cfg"); // exec after saved.cfg to get "compatibilitymode", but before user scripts..
|
||||
per_idents = true;
|
||||
}
|
||||
autostartscripts(""); // all remaining scripts
|
||||
execfile("config/autoexec.cfg");
|
||||
execfile("config/auth.cfg");
|
||||
|
||||
+1
-1
@@ -585,7 +585,7 @@ extern int colorbits, depthbits, stencilbits;
|
||||
|
||||
extern void keyrepeat(bool on);
|
||||
extern bool interceptkey(int sym);
|
||||
extern bool firstrun, inmainloop;
|
||||
extern bool inmainloop;
|
||||
|
||||
enum
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user