move ++, --, ++f and --f to compatibility.cfg

useless, because of the "failing silently" behaviour

DOCREF ++ -- ++f --f
This commit is contained in:
ac-stef
2017-06-14 19:01:15 +02:00
parent d7277c1aa4
commit e1572dcdee
6 changed files with 14 additions and 12 deletions
+3 -3
View File
@@ -20,10 +20,10 @@ const startbotmatch [
if ($tmp_isbotteammode) [ // team botmode
tempalias numrvsf (div $tmp_numbots 2)
tempalias numcla (div $tmp_numbots 2)
if (= (player1 team) 0) [ -- numcla ] [
if (= (player1 team) 1) [ -- numrvsf ]
if (= (player1 team) 0) [ -= numcla 1 ] [
if (= (player1 team) 1) [ -= numrvsf 1 ]
]
if (&& (= $numrvsf $numcla) $needsswitch) [ -- numrvsf ]
if (&& (= $numrvsf $numcla) $needsswitch) [ -= numrvsf 1 ]
addnbot $numrvsf RVSF $tmp_botskill
addnbot $numcla CLA $tmp_botskill
] [ // bot FFA
+1 -1
View File
@@ -13,7 +13,7 @@ tempalias numAutoSaves 0
const autoSaveCheck [ if $autosavemap [ sleep $timeBetAutoSaves doAutoSave ] ]
const execAutoSave [
++ numAutoSaves
+= numAutoSaves 1
push oldmapbackups $mapbackupsonsave
if (|| (!= $numAutoSaveBackups $numAutoSaves) (= $numAutoSaveBackups 0)) [ mapbackupsonsave 0 ] [ numAutoSaves = 0 ] // Temporarily turn off map backups to avoid clutter.
savemap (curmap)
+6
View File
@@ -101,3 +101,9 @@ const seteditshow [
]
pop n
]
// commands to increment/decrement an alias - or to fail silently, if the alias doesn't exist
const ++ [ if (checkalias $arg1) [ += $arg1 1 ] ]
const -- [ if (checkalias $arg1) [ -= $arg1 1 ] ]
const ++f [ if (checkalias $arg1) [ +=f $arg1 1 ] ]
const --f [ if (checkalias $arg1) [ -=f $arg1 1 ] ]
+1 -1
View File
@@ -212,7 +212,7 @@ tempalias unclipentclippedmodels [
push h (at $slotinfo 1) // model clip height
looplist (enumentities clip) ci [
push clipinfo (editentity $ci)
if (&& (! (at $clipinfo 10)) (+ (at $clipinfo 5) (at $clipinfo 6))) [
if (&& (! (at $clipinfo 10)) (at $clipinfo 7)) [ // skip non-zero shapes
push cibot (+f (getcubedata (at $clipinfo 1) (at $clipinfo 2) floor) (at $clipinfo 4)) // clip bottom, float
push cih (at $clipinfo 7) // clip height, float
push clipped (&& (<=f $cibot $bot) (>= (+f $cibot $cih) (+f $bot $h))) // check height range
+2 -2
View File
@@ -63,7 +63,7 @@ const genSurvDifStr [
const survOnKill [
if (&& (= $arg1 (player1 cn)) (!= $arg1 $arg2)) [ // Player1 was actor and was not suicide
++ survKills // Increment enemies killed counter
+= survKills 1 // Increment enemies killed counter
if (! (listlen $survTimeBetKills)) [ // First kill
tempalias survTimeBetKills (- (millis) $startSurvMillis) //
] [ add2list survTimeBetKills (- (millis) $survLastKill) ] // Other kills
@@ -270,7 +270,7 @@ const increaseDifficulty [
tempalias lastCheckPoint (millis)
if (curmodeattr bot) [
if (<= (+ $survNumBots $survBotsToAdd) $survMaxBots) [ += survNumBots $survBotsToAdd; addnbot $survBotsToAdd CLA best ] [ tmpSurvInt = (- $survMaxBots $survNumBots); += survNumBots $tmpSurvInt; addnbot $tmpSurvInt CLA best ]
if (< $curSurvDifficulty 4) [ ++ curSurvDifficulty; botskillall (at [bad worse medium good best] $curSurvDifficulty) ]
if (< $curSurvDifficulty 4) [ += curSurvDifficulty 1 ; botskillall (at [bad worse medium good best] $curSurvDifficulty) ]
]
]
+1 -5
View File
@@ -291,11 +291,7 @@ const dlmap [ getmap $arg1 [ sleep 2500 (concat map $arg1) ] ]
const rndmap [ result (at $__defaultmaps (rnd (listlen $__defaultmaps))) ]
const rrnd [ + (rnd (- $arg2 $arg1)) $arg1 ]
const ++ [ if (checkalias $arg1) [ += $arg1 1 ] ]
const -- [ if (checkalias $arg1) [ -= $arg1 1 ] ]
const ++f [ if (checkalias $arg1) [ +=f $arg1 1 ] ]
const --f [ if (checkalias $arg1) [ -=f $arg1 1 ] ]
const listaverage [ if (listlen $arg1) [ tempalias tmp_sum 0; loop gsl (listlen $arg1) [ +=f tmp_sum (at $arg1 $gsl) ]; result (divf $tmp_sum (listlen $arg1)) ] ]
const listaverage [ push sum "" ; looplist $arg1 n [ +=f sum $n ] ; if (strlen $sum) [ div=f sum (listlen $arg1) ] ; result (pop sum) ]
forceinit [cp_entbuf cp_entstr] NULL
const get_ent_attrs [ cp_entbuf = (getenttype); loop gea $ENT_NUM_ATTRS [ add2list cp_entbuf (getentattr $gea) ] ]