Rev 4993 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4993 | Rev 5065 | ||
---|---|---|---|
Line 723... | Line 723... | ||
723 | }
|
723 | }
|
724 | }
|
724 | }
|
725 | 725 | ||
726 | SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "Executions",&ud.executions); |
726 | SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "Executions",&ud.executions); |
727 | 727 | ||
728 | // weapon choices are defaulted in G_CheckCommandLine, which may override them
|
- | |
729 | if (!g_forceWeaponChoice) |
- | |
730 | for (i=0; i<=FREEZE_WEAPON; i++) |
- | |
731 | {
|
- | |
732 | Bsprintf(buf,"WeaponChoice%d",i); |
- | |
733 | dummy = -1; |
- | |
734 | SCRIPT_GetNumber(ud.config.scripthandle, "Misc", buf, &dummy); |
- | |
735 | if (dummy >= 0 && dummy <= FREEZE_WEAPON) |
- | |
736 | g_player[0].wchoice[i] = dummy; |
- | |
737 | }
|
- | |
738 | - | ||
739 | #ifdef _WIN32
|
728 | #ifdef _WIN32
|
740 | SCRIPT_GetNumber(ud.config.scripthandle, "Updates", "CheckForUpdates", &ud.config.CheckForUpdates); |
729 | SCRIPT_GetNumber(ud.config.scripthandle, "Updates", "CheckForUpdates", &ud.config.CheckForUpdates); |
741 | SCRIPT_GetNumber(ud.config.scripthandle, "Updates", "LastUpdateCheck", &ud.config.LastUpdateCheck); |
730 | SCRIPT_GetNumber(ud.config.scripthandle, "Updates", "LastUpdateCheck", &ud.config.LastUpdateCheck); |
742 | #endif
|
731 | #endif
|
743 | 732 | ||
Line 856... | Line 845... | ||
856 | SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "WindowPosY", windowy, FALSE, FALSE); |
845 | SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "WindowPosY", windowy, FALSE, FALSE); |
857 | #ifdef RENDERTYPEWIN
|
846 | #ifdef RENDERTYPEWIN
|
858 | SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "MaxRefreshFreq", maxrefreshfreq, FALSE, FALSE); |
847 | SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "MaxRefreshFreq", maxrefreshfreq, FALSE, FALSE); |
859 | #endif
|
848 | #endif
|
860 | 849 | ||
861 | for (dummy=0; dummy<10; dummy++) |
- | |
862 | {
|
- | |
863 | Bsprintf(buf,"WeaponChoice%d",dummy); |
- | |
864 | SCRIPT_PutNumber(ud.config.scripthandle, "Misc",buf,g_player[myconnectindex].wchoice[dummy],FALSE,FALSE); |
- | |
865 | }
|
- | |
866 | - | ||
867 | if (!NAM) |
850 | if (!NAM) |
868 | {
|
851 | {
|
869 | SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "Out",ud.lockout,FALSE,FALSE); |
852 | SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "Out",ud.lockout,FALSE,FALSE); |
870 | SCRIPT_PutString(ud.config.scripthandle, "Screen Setup", "Password",ud.pwlockout); |
853 | SCRIPT_PutString(ud.config.scripthandle, "Screen Setup", "Password",ud.pwlockout); |
871 | }
|
854 | }
|
Line 873... | Line 856... | ||
873 | #ifdef _WIN32
|
856 | #ifdef _WIN32
|
874 | SCRIPT_PutNumber(ud.config.scripthandle, "Updates", "CheckForUpdates", ud.config.CheckForUpdates, FALSE, FALSE); |
857 | SCRIPT_PutNumber(ud.config.scripthandle, "Updates", "CheckForUpdates", ud.config.CheckForUpdates, FALSE, FALSE); |
875 | SCRIPT_PutNumber(ud.config.scripthandle, "Updates", "LastUpdateCheck", ud.config.LastUpdateCheck, FALSE, FALSE); |
858 | SCRIPT_PutNumber(ud.config.scripthandle, "Updates", "LastUpdateCheck", ud.config.LastUpdateCheck, FALSE, FALSE); |
876 | #endif
|
859 | #endif
|
877 | 860 | ||
- | 861 | if (ud.config.UseMouse) |
|
- | 862 | {
|
|
878 | for (dummy=0; dummy<MAXMOUSEBUTTONS; dummy++) |
863 | for (dummy=0; dummy<MAXMOUSEBUTTONS; dummy++) |
879 | {
|
864 | {
|
880 | if (CONFIG_FunctionNumToName(ud.config.MouseFunctions[dummy][0])) |
865 | if (CONFIG_FunctionNumToName(ud.config.MouseFunctions[dummy][0])) |
881 | {
|
866 | {
|
882 | Bsprintf(buf,"MouseButton%d",dummy); |
867 | Bsprintf(buf, "MouseButton%d", dummy); |
Line 916... | Line 901... | ||
916 | {
|
901 | {
|
917 | Bsprintf(buf,"MouseAnalogScale%d",dummy); |
902 | Bsprintf(buf, "MouseAnalogScale%d", dummy); |
918 | SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.MouseAnalogueScale[dummy], FALSE, FALSE); |
903 | SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.MouseAnalogueScale[dummy], FALSE, FALSE); |
919 | }
|
904 | }
|
920 | }
|
905 | }
|
- | 906 | }
|
|
921 | 907 | ||
922 | Bsprintf(tempbuf,"%.2f",CONTROL_MouseSensitivity); |
908 | if (ud.config.UseJoystick) |
923 | SCRIPT_PutString(ud.config.scripthandle, "Controls","Mouse_Sensitivity",tempbuf); |
- | |
924 | 909 | {
|
|
925 | for (dummy=0; dummy<MAXJOYBUTTONSANDHATS; dummy++) |
910 | for (dummy=0; dummy<MAXJOYBUTTONSANDHATS; dummy++) |
926 | {
|
911 | {
|
927 | if (CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][0])) |
912 | if (CONFIG_FunctionNumToName(ud.config.JoystickFunctions[dummy][0])) |
928 | {
|
913 | {
|
929 | Bsprintf(buf,"JoystickButton%d",dummy); |
914 | Bsprintf(buf, "JoystickButton%d", dummy); |
Line 972... | Line 957... | ||
972 | {
|
957 | {
|
973 | Bsprintf(buf,"JoystickAnalogSaturate%d",dummy); |
958 | Bsprintf(buf, "JoystickAnalogSaturate%d", dummy); |
974 | SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.JoystickAnalogueSaturate[dummy], FALSE, FALSE); |
959 | SCRIPT_PutNumber(ud.config.scripthandle, "Controls", buf, ud.config.JoystickAnalogueSaturate[dummy], FALSE, FALSE); |
975 | }
|
960 | }
|
976 | }
|
961 | }
|
- | 962 | }
|
|
977 | 963 | ||
978 | SCRIPT_PutString(ud.config.scripthandle, "Comm Setup","PlayerName",&szPlayerName[0]); |
964 | SCRIPT_PutString(ud.config.scripthandle, "Comm Setup","PlayerName",&szPlayerName[0]); |
- | 965 | ||
979 | if (g_rtsNamePtr == NULL) |
966 | if (g_rtsNamePtr == NULL) |
980 | SCRIPT_PutString(ud.config.scripthandle, "Comm Setup","RTSName",&ud.rtsname[0]); |
967 | SCRIPT_PutString(ud.config.scripthandle, "Comm Setup","RTSName",&ud.rtsname[0]); |
981 | 968 | ||
982 | {
|
- | |
983 | char commmacro[] = "CommbatMacro# "; |
969 | char commmacro[] = "CommbatMacro# "; |
984 | 970 | ||
985 | for (dummy = 0; dummy < MAXRIDECULE; dummy++) |
971 | for (dummy = 0; dummy < MAXRIDECULE; dummy++) |
986 | {
|
972 | {
|
987 | commmacro[13] = dummy+'0'; |
973 | commmacro[13] = dummy+'0'; |
988 | SCRIPT_PutString(ud.config.scripthandle, "Comm Setup",commmacro,&ud.ridecule[dummy][0]); |
974 | SCRIPT_PutString(ud.config.scripthandle, "Comm Setup",commmacro,&ud.ridecule[dummy][0]); |
989 | }
|
975 | }
|
990 | }
|
- | |
991 | 976 | ||
992 | SCRIPT_Save(ud.config.scripthandle, setupfilename); |
977 | SCRIPT_Save(ud.config.scripthandle, setupfilename); |
993 | 978 | ||
994 | if ((flags & 2) == 0) |
979 | if ((flags & 2) == 0) |
995 | SCRIPT_Free(ud.config.scripthandle); |
980 | SCRIPT_Free(ud.config.scripthandle); |