From 5f4e1688d25727bc51ecee6600c9752fa8f847b7 Mon Sep 17 00:00:00 2001 From: Bukz Date: Tue, 7 Jun 2011 15:36:33 +0000 Subject: [PATCH] updates git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6515 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- changelog.txt | 2 +- config/survival.cfg | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/changelog.txt b/changelog.txt index c7695f1e..c7e61baf 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,5 @@ AssaultCube ChangeLog -1.1.0.4 -> 1.1.0.5/6? +1.1.0.4 -> SVN TRUNK --------------------- Please add all commited changes to the SVN trunk from last release here, check TODO's. diff --git a/config/survival.cfg b/config/survival.cfg index d2f2a12d..d3b20abb 100644 --- a/config/survival.cfg +++ b/config/survival.cfg @@ -24,9 +24,11 @@ genSurvDifStr = [ ] ] +genSurvAvgStr = [ if (listlen $arg1) [ tmp_sum = 0; loop gsl (listlen $arg1) [ += tmp_sum (at $arg1 $gsl) ]; result (divf $tmp_sum (listlen $arg1)) ] ] + survival = [ - tmpSurvSets = $survNumBots; curSurvDifficulty = 0; resetSurvAliases - if (|| (! (checkalias onKill)) (! (strstr $onKill survKills))) [ add2alias onKill [ += survKills 1 ] ] + kickallbots; tmpSurvSets = $survNumBots; curSurvDifficulty = 0; survLastKill = ""; survTimeBetKills = ""; resetSurvAliases + if (! (checkalias onKill)) [ onKill = "" ]; if (! (strstr $onKill survKills)) [ add2alias onKill [ if $startedSurvival [ += survKills 1; if (! (listlen $survTimeBetKills)) [ survTimeBetKills = (- (millis) $startSurvMillis) ] [ add2list survTimeBetKills (- (millis) $survLastKill) ]; survLastKill = (millis) ] ] ] add2alias mapstartonce [ startPreSurvMillis = (millis) echo (genSurvDifStr) (c 2)Bot survival mode prepared, gather items and find the arena to start! (c 9)You have (c 5) (div $timeUntilTele 1000) (c 9)seconds to prepare! @@ -89,8 +91,8 @@ setOfcZones = [ ] findCenter = [ - midZoneX = (+f (divf (-f (at $tmpSurvZone 1) (at $tmpSurvZone 0)) 2.00) (at $tmpSurvZone 0)) - midZoneY = (+f (divf (-f (at $tmpSurvZone 3) (at $tmpSurvZone 2)) 2.00) (at $tmpSurvZone 2)) + midZoneX = (+f (divf (-f (at $tmpSurvZone 1) (at $tmpSurvZone 0)) 2) (at $tmpSurvZone 0)) + midZoneY = (+f (divf (-f (at $tmpSurvZone 3) (at $tmpSurvZone 2)) 2) (at $tmpSurvZone 2)) tmpZoneCenter = (concat $midZoneX $midZoneY) ] @@ -111,7 +113,7 @@ checkzone = [ if (&& (! $startedSurvival) (>= (- (millis) $startPreSurvMillis) $timeUntilTele)) [ teleportPlayer ] if (&& (>= (- (millis) $lastCheckPoint) $timeBetChkPts) (&& $startedSurvival $gotCheckPoint)) [ increaseDifficulty ] if (&& (! $startedOBCount) (&& (! (isInZone)) $startedSurvival)) [ startOBCount ] - if (&& $startedSurvival (&& (! (alive)) (>= (- (millis) $startSurvMillis) 500))) [ finalSurvMillis = (- (millis) $startSurvMillis); endSurvival (concatword (genSurvDifStr) (c 3) " You survived for " (c 5) (divf $finalSurvMillis 1000) (c 3) " seconds, and killed " (c 5) $survKills (c 3) " enemies.") ] + if (&& $startedSurvival (&& (! (alive)) (>= (- (millis) $startSurvMillis) 500))) [ finalSurvMillis = (- (millis) $startSurvMillis); endSurvival (concatword (genSurvDifStr) (c 3) " You survived for " (c 5) (divf $finalSurvMillis 1000) (c 3) " seconds, and killed " (c 5) $survKills (c 3) " enemies. Average: " (c 5) (divf (genSurvAvgStr $survTimeBetKills) 1000) (c 3) " seconds between kills.") ] if (&& (! (curteam)) (! $startedSurvival)) [ team RVSF ]; sleep 0 [ checkzone ] ] ] @@ -136,6 +138,6 @@ endSurvival = [ ] // List of aliases that need to be cleared from saved.cfg on quit: -survAliases = (concat $survResetAliases "backInZone checkzone curSurvDifficulty endSurvival finalSurvMillis increaseDifficulty isInZone midZoneX midZoneY onKill resetSurvAliases setOfcZones setzone startOBCount startOBMillis startSurvival survMapIndex survOfcZones tmpSCtr tmpSurvCtr tmpSurvInt tmpSurvSets tmp_survstr tmpSurvZone tmpZoneCenter zone aliasinit survResetAliases survAliases") +survAliases = (concat $survResetAliases "backInZone checkzone curSurvDifficulty endSurvival finalSurvMillis genSurvDifStr genSurvAvgStr increaseDifficulty isInZone midZoneX midZoneY onKill resetSurvAliases setOfcZones setzone startOBCount startOBMillis startSurvival survLastKill survMapIndex survOfcZones survTimeBetKills tmpSCtr tmpSurvCtr tmpSurvInt tmpSurvSets tmp_sum tmp_survstr tmpSurvZone tmpZoneCenter zone aliasinit survResetAliases survAliases") addListOnQuit $survAliases \ No newline at end of file