compatibility.cfg to keep compatibility with older "cubescripts"..
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6461 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -61,7 +61,6 @@ newmenu "Confirm tutorial"
|
||||
menuitem "Proceed with tutorial" [ tutstart 1 ]
|
||||
menuitem "3Cancel" [ closemenu "Confirm tutorial" ]
|
||||
|
||||
|
||||
new_gfx_quality = [
|
||||
if (= $arg1 6) [ // "INSANE!" gfx quality
|
||||
fsaa 8
|
||||
@@ -404,6 +403,7 @@ menuitemslider "Font type: " 0 2 "$__fontsetting" 1 [ "Default" "v104" "Mono" ]
|
||||
menuitemslider "Mini-map background style: " 0 2 "$showmapbackdrop" 1 [ "Fully Transparent" "Black" "White/Transparent" ] [ showmapbackdrop $arg1 ]
|
||||
menuitemslider "Grid/Selection style: " 0 1 "$oldselstyle" 1 [ "triangles" "squares (default)" ] [ oldselstyle $arg1 ]
|
||||
menuitemcheckbox "Enable per-official map dynamic gamma: " "$dyngamma" [ dyngamma = $arg1 ]
|
||||
menuitemcheckbox "Enable compatibility with older cubescripts " "$compatibilitymode" [ compatibilitymode $arg1; echo (c 3) "You'll need to restart AC to take this setting in account."; ]
|
||||
menuitemtextinput "Set default gamma for this map: " "(at $ofc_gamma_list (findlist $defaultmaps (curmap 1)))" [ setgamma $arg1 ]
|
||||
|
||||
// Reduced game violence mode...
|
||||
|
||||
@@ -936,6 +936,8 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw)
|
||||
}
|
||||
#endif
|
||||
|
||||
VARP(compatibilitymode, 0, 1, 1); // FIXME : find a better place to put this ?
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
extern struct servercommandline scl;
|
||||
@@ -1143,6 +1145,12 @@ int main(int argc, char **argv)
|
||||
firstrun = true;
|
||||
}
|
||||
if(identexists("afterinit")) execute("afterinit");
|
||||
if(compatibilitymode)
|
||||
{
|
||||
persistidents = false;
|
||||
exec("config/compatibility.cfg"); // exec after saved.cfg to get "compatibilitymode", but before user scripts..
|
||||
persistidents = true;
|
||||
}
|
||||
execfile("config/autoexec.cfg");
|
||||
execfile("config/auth.cfg");
|
||||
execute("addallfavcatmenus"); // exec here, to add all categories (including those defined in autoexec.cfg)
|
||||
|
||||
Reference in New Issue
Block a user