My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// map list
dm_maplist = "complex douze pgdm kffa fanatic_quake curvedm deathtek phosgene ruby dock justice curvy_castle duel8 industry park refuge kalking1 island powerplant wake5 killfactory shadowed corruption darkdeath"
capture_maplist = "nevil_c c_valley nmp9 urban_c face-capture reissen dust2 c_egypt capture_night nmp4 monastery hallo ph-capture hades abbey relic fc4 corruption asteroids akroseum campo killcore3 damnation arabic serenity"
flag_maplist = "tejen face-capture reissen forge authentic wdcd dust2 flagstone capture_night urban_c shipwreck l_ctf valhalla mach2 mercury akroseum europium abbey redemption damnation campo nitro recovery infamy tempest hallo"

// mode listw
dm_modelist = "0 2 3 4 5 6 7 8" // ffa insta eff, team
flag_modelist = "11 12 13 14 17 18"
capture_modelist = "9 10"
hold_modelist = "15 16 19"

nextmap = [
mode_ = (getmode)
map_ = ""
currmap = (getmap)
maplist = ""

if (isinlist $dm_modelist $mode_) [ maplist = $dm_maplist]
if (isinlist $flag_modelist $mode_) [ maplist = $flag_maplist]
if (isinlist $capture_modelist $mode_) [ maplist = $capture_maplist]
if (isinlist $hold_modelist $mode_) [ maplist = $capture_maplist]

// choose next map
orderlen = (- (listlen $maplist) 1) // order len to index system
mapindex = (indexof $maplist $currmap)
if (&& (!= $mapindex -1) (< $mapindex $orderlen)) [ // map in list and not last
map_ = (at $maplist (+ $mapindex 1))
] [
map_ = (at $maplist 0)
]

if (=s $map_ "") [ $map_ = $currmap ]
result $map_

//echo (format "Nextmap: %1 mode: %2" $map_ $mode_)
]

Change log

r86 by evilbunny.x on Feb 11, 2011   Diff
Critical map rotation fix, version.inc
Go to: 
Sign in to write a code review

Older revisions

r85 by evilbunny.x on Feb 11, 2011   Diff
Map rotation list, scripts fixes
r77 by evilbunny.x on Jan 17, 2011   Diff
Fixed not standart team names in CTF
mode, new cube script commands,
nextmap and allowvote new cube script
function variables
All revisions of this file

File info

Size: 1611 bytes, 36 lines
Powered by Google Project Hosting