saved.cfg cleanup, take two for alias "tmpClientData" :)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6546 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+2
-2
@@ -59,7 +59,7 @@ Rendering / HUD / ...
|
||||
[*] Fixed flag icon transparency.
|
||||
[*] Nearplane fix.
|
||||
[*] screenshotscale - in-engine scaling of screenshots.
|
||||
[*] showtargetname" - turns on/off showing the player name on the HUD when in your crosshair.
|
||||
[*] showtargetname - turns on/off showing the player name on the HUD when in your crosshair.
|
||||
|
||||
Physics
|
||||
---------------------
|
||||
@@ -176,7 +176,7 @@ CubeScript
|
||||
[*] Substr crash bug is fixed. Also the command can now use a negative position value.
|
||||
[*] New stat in (pstat_score) for teamkills. New list is: FLAGS FRAGS DEATHS POINTS TEAM TEAMKILLS NAME // TODO move to compatibility.cfg
|
||||
[*] on_quit.cfg for deleting aliases from saved.cfg upon quit.
|
||||
[*] Many aliases that were stored in saved.cfg are now being stored as a single alias (list) "tmpClientData" and being restored on start. (see on_quit.cfg) // Not yet, still buggy. :P
|
||||
[*] Many aliases that were stored in saved.cfg are now being stored as a single alias (list) "tmpClientData" and being restored on start. (see on_quit.cfg) // Should be working now, please report any problems like unknown alias lookup errors though!
|
||||
[*] Missing bracket ([], (), etc.) errors now also notify the client of what file the error resides in.
|
||||
[*] New automatically executed scripts folder in the root install directory of AC.
|
||||
[*] New delta_edit/game_# aliases for easily tweaking gamma/fov/flyspeed on-the-fly. (e.g. Hold F5 and scroll for gamma, F6 for fov, bind "domodifier 10" to a key for flyspeed)
|
||||
|
||||
+24
-1
@@ -1,6 +1,27 @@
|
||||
// Adds a list of aliases to be deleted (cleared from saved.cfg) on every quit.
|
||||
// Do not modify. (unless you really know what you're doing)
|
||||
|
||||
tmpClientList = "curname LANG nickhighlight soundqualityalias dyngamma __gibsgore gfxqualityalias poniesmodeon old_editbinds"
|
||||
tmpSurvList = "survMaxBots survDifficulty timeBetChkPts survNumBots nonSurvDefaults survBotsToAdd timeUntilTele survMap spamSurvMsgs"
|
||||
|
||||
addOnQuit [
|
||||
persistidents 1
|
||||
tmpClientData = ""; tmpSurvData = ""
|
||||
loop cql (listlen $tmpClientList) [ add2list tmpClientData (getalias (at $tmpClientList $cql))) ]
|
||||
loop oql (listlen $tmpSurvList) [ add2list tmpSurvData (getalias (at $tmpSurvList $oql)) ]
|
||||
]
|
||||
|
||||
add2alias afterinit [
|
||||
sleep 10 [
|
||||
if (&& (checkalias tmpClientData) (= (listlen $tmpClientData) (listlen $tmpClientList))) [
|
||||
loop cil (listlen $tmpClientData) [ (at $tmpClientList $cil) = (at $tmpClientData $cil) ]
|
||||
]
|
||||
if (&& (checkalias tmpSurvData) (= (listlen $tmpSurvData) (listlen $tmpSurvList))) [
|
||||
loop ail (listlen $tmpSurvData) [ (at $tmpSurvList $ail) = (at $tmpSurvData $ail) ]
|
||||
]
|
||||
] 1
|
||||
]
|
||||
|
||||
addListOnQuit = [ alias_list = $arg1; loop al (listlen $alias_list) [ addOnQuit (concat "delalias" (at $alias_list $al)) ] ]
|
||||
|
||||
on_quit_aliases = [
|
||||
@@ -42,4 +63,6 @@ on_quit_aliases = [
|
||||
on_quit_aliases
|
||||
]
|
||||
|
||||
addListOnQuit $on_quit_aliases; addOnQuit [ delalias alias_list ]
|
||||
addListOnQuit $on_quit_aliases
|
||||
addListOnQuit (concat $tmpClientList $tmpSurvList)
|
||||
addOnQuit [ delalias alias_list ]
|
||||
+4
-1
@@ -16,7 +16,10 @@ resetSurvAliases = [
|
||||
aliasinit survBotsToAdd 1; aliasinit "spamSurvMsgs survDifficulty" 0; aliasinit survNumBots 12; aliasinit survMaxBots 32; aliasinit timeBetChkPts 60000; aliasinit timeUntilTele 120000
|
||||
]
|
||||
|
||||
resetSurvAliases; if (! (checkalias afterinit)) [ afterinit = "" ]; if (! (strstr $afterinit survMap)) [ add2alias afterinit [ if (! (checkalias survMap)) [ survMap = (rnd (listlen $defaultmaps)) ] ] ]
|
||||
if (! (checkalias afterinit)) [ afterinit = "" ]
|
||||
if (! (strstr $afterinit resetSurvAliases)) [
|
||||
add2alias afterinit [ sleep 20 [ resetSurvAliases ] 1 ]
|
||||
]
|
||||
|
||||
genSurvDifStr = [
|
||||
if $nonSurvDefaults [ result "[CUSTOM]" ] [
|
||||
|
||||
Reference in New Issue
Block a user