autosave/dyngamma fixes
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7184 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+3
-3
@@ -3,12 +3,12 @@ checkinit mapstartalways [ if $autosavemap autoSaveCheck; numAutoSaves = 0 ]
|
||||
checkinit onNewMap [ if $autosavemap autoSaveCheck; numAutoSaves = 0 ]
|
||||
check2init autosavemap 0 // Autosavemap system disabled by default
|
||||
check2init timeBetAutoSaves 300000 // Once every 5 minutes.
|
||||
check2init numAutoSaveBackups 12 // Make a map .bak every 12 autosaves by default
|
||||
check2init numAutoSaveBackups 3 // Make a map .bak every 3 autosaves (15 minutes) by default
|
||||
|
||||
const autoSaveCheck [ sleep $timeBetAutoSaves [ doAutoSave ] 1 ]
|
||||
|
||||
const execAutoSave [
|
||||
+= numAutoSaves 1
|
||||
++ numAutoSaves
|
||||
oldmapbackups = $mapbackupsonsave
|
||||
if (|| (!= $numAutoSaveBackups $numAutoSaves) (= $numAutoSaveBackups 0)) [ mapbackupsonsave 0 ] [ numAutoSaves = 0 ] // Temporarily turn off map backups to avoid clutter.
|
||||
savemap (curmap 1)
|
||||
@@ -20,7 +20,7 @@ const doAutoSave [
|
||||
if $autosavemap [
|
||||
if (&& (! (strstr $defaultmaps (curmap 1))) (strlen (curmap 1))) [
|
||||
if $editing execAutoSave [
|
||||
if (= $gamemode (coop -1)) execAutoSave
|
||||
if (= $gamemode (modenum coop)) execAutoSave
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ if (! (checkalias ofc_gamma_list)) [
|
||||
// setgamma - allows clients to set custom gamma values for each official map, disabling/enabling the entire system
|
||||
// can be done with the dyngamma variable.
|
||||
const setgamma [
|
||||
if (&& (<= $arg1 300) (>= $arg1 30)) [
|
||||
if (checkrange $arg1 30 300) [
|
||||
if (strstr $defaultmaps (curmap 1)) [
|
||||
tmp_gamma_list = $ofc_gamma_list
|
||||
ofc_gamma_list = []
|
||||
|
||||
Reference in New Issue
Block a user