diff --git a/config/menus_settings.cfg b/config/menus_settings.cfg index 2f932836..27f66696 100644 --- a/config/menus_settings.cfg +++ b/config/menus_settings.cfg @@ -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... diff --git a/source/src/main.cpp b/source/src/main.cpp index 7a2f15e2..682ba923 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -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)